fury_test_uom_aliases.f90 Source File

FURY test of uom.

This File Depends On

sourcefile~~fury_test_uom_aliases.f90~~EfferentGraph sourcefile~fury_test_uom_aliases.f90 fury_test_uom_aliases.f90 sourcefile~fury.f90 fury.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_aliases.f90 sourcefile~fury_system_si32.f90 fury_system_si32.F90 sourcefile~fury_system_si32.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol32.f90 fury_uom_symbol32.F90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury.f90 sourcefile~fury_mixed_kinds.f90 fury_mixed_kinds.F90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom32.f90 fury_uom32.F90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_uom32.f90 sourcefile~fury_uom_reference32.f90 fury_uom_reference32.F90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_uom_reference32.f90 sourcefile~fury_uom128.f90 fury_uom128.F90 sourcefile~fury_uom128.f90->sourcefile~fury.f90 sourcefile~fury_system_si128.f90 fury_system_si128.F90 sourcefile~fury_uom128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_uom128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal128.f90 fury_qreal128.F90 sourcefile~fury_uom128.f90->sourcefile~fury_qreal128.f90 sourcefile~fury_system_abstract128.f90 fury_system_abstract128.F90 sourcefile~fury_uom128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_uom_reference64.f90 fury_uom_reference64.F90 sourcefile~fury_uom_reference64.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_system_abstract64.f90 fury_system_abstract64.F90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_uom64.f90 fury_uom64.F90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_uom64.f90 sourcefile~stringifor.f90 stringifor.F90 sourcefile~stringifor.f90->sourcefile~fury.f90 sourcefile~stringifor.f90->sourcefile~fury_system_si32.f90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol32.f90 sourcefile~stringifor.f90->sourcefile~fury_uom128.f90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference64.f90 sourcefile~fury_system_si64.f90 fury_system_si64.F90 sourcefile~stringifor.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_uom_symbol64.f90 fury_uom_symbol64.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol64.f90 sourcefile~stringifor.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_uom_reference128.f90 fury_uom_reference128.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference128.f90 sourcefile~stringifor.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_system_abstract32.f90 fury_system_abstract32.F90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract32.f90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_uom_symbol128.f90 fury_uom_symbol128.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol128.f90 sourcefile~fury_qreal64.f90 fury_qreal64.F90 sourcefile~stringifor.f90->sourcefile~fury_qreal64.f90 sourcefile~stringifor.f90->sourcefile~fury_qreal128.f90 sourcefile~stringifor.f90->sourcefile~fury_uom32.f90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract128.f90 sourcefile~stringifor.f90->sourcefile~fury_uom64.f90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference32.f90 sourcefile~fury_qreal32.f90 fury_qreal32.F90 sourcefile~stringifor.f90->sourcefile~fury_qreal32.f90 sourcefile~fury_system_si64.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_uom_reference64.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_uom64.f90 sourcefile~fury_system_si128.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_uom128.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_mixed_kinds.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract32.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_system_abstract64.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_uom128.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_uom_reference128.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal64.f90->sourcefile~fury.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_qreal128.f90->sourcefile~fury.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_uom32.f90->sourcefile~fury.f90 sourcefile~fury_uom32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_uom32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom32.f90->sourcefile~fury_system_abstract32.f90 sourcefile~fury_uom32.f90->sourcefile~fury_qreal32.f90 sourcefile~fury_system_abstract128.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_uom64.f90->sourcefile~fury.f90 sourcefile~fury_uom64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_uom64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_uom64.f90->sourcefile~fury_qreal64.f90 sourcefile~fury_uom_converter.f90 fury_uom_converter.F90 sourcefile~fury_uom_converter.f90->sourcefile~fury.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_symbol32.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom128.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_reference64.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_symbol64.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_reference128.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_symbol128.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom32.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom64.f90 sourcefile~fury_uom_converter.f90->sourcefile~fury_uom_reference32.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_system_abstract32.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_uom32.f90 sourcefile~penf.f90 penf.F90 sourcefile~penf.f90->sourcefile~fury.f90 sourcefile~penf.f90->sourcefile~fury_system_si32.f90 sourcefile~penf.f90->sourcefile~fury_uom_symbol32.f90 sourcefile~penf.f90->sourcefile~fury_uom128.f90 sourcefile~penf.f90->sourcefile~fury_uom_reference64.f90 sourcefile~penf.f90->sourcefile~stringifor.f90 sourcefile~penf.f90->sourcefile~fury_system_si64.f90 sourcefile~penf.f90->sourcefile~fury_uom_symbol64.f90 sourcefile~penf.f90->sourcefile~fury_system_si128.f90 sourcefile~penf.f90->sourcefile~fury_uom_reference128.f90 sourcefile~penf.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~penf.f90->sourcefile~fury_system_abstract32.f90 sourcefile~penf.f90->sourcefile~fury_system_abstract64.f90 sourcefile~penf.f90->sourcefile~fury_uom_symbol128.f90 sourcefile~penf.f90->sourcefile~fury_qreal64.f90 sourcefile~penf.f90->sourcefile~fury_qreal128.f90 sourcefile~penf.f90->sourcefile~fury_uom32.f90 sourcefile~penf.f90->sourcefile~fury_system_abstract128.f90 sourcefile~penf.f90->sourcefile~fury_uom64.f90 sourcefile~penf.f90->sourcefile~fury_uom_converter.f90 sourcefile~penf.f90->sourcefile~fury_uom_reference32.f90 sourcefile~penf.f90->sourcefile~fury_qreal32.f90 sourcefile~stringifor_string_t.f90 stringifor_string_t.F90 sourcefile~penf.f90->sourcefile~stringifor_string_t.f90 sourcefile~befor64.f90 befor64.F90 sourcefile~penf.f90->sourcefile~befor64.f90 sourcefile~befor64_pack_data_m.f90 befor64_pack_data_m.F90 sourcefile~penf.f90->sourcefile~befor64_pack_data_m.f90 sourcefile~fury_qreal32.f90->sourcefile~fury.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_system_abstract32.f90 sourcefile~stringifor_string_t.f90->sourcefile~stringifor.f90 sourcefile~befor64.f90->sourcefile~stringifor_string_t.f90 sourcefile~befor64_pack_data_m.f90->sourcefile~befor64.f90 sourcefile~penf_b_size.f90 penf_b_size.F90 sourcefile~penf_b_size.f90->sourcefile~penf.f90 sourcefile~penf_stringify.f90 penf_stringify.F90 sourcefile~penf_b_size.f90->sourcefile~penf_stringify.f90 sourcefile~penf_global_parameters_variables.f90 penf_global_parameters_variables.F90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf.f90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf_b_size.f90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf_stringify.f90 sourcefile~penf_stringify.f90->sourcefile~penf.f90
Help


Source Code

!< FURY test of [[uom]].
program fury_test_uom_aliases
!-----------------------------------------------------------------------------------------------------------------------------------
!< FURY test of [[uom]].
!<
!< @TODO fix to success
!-----------------------------------------------------------------------------------------------------------------------------------
use fury
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
type(uom64)           :: si_frequency     !< SI frequency unit.
type(uom64)           :: si_pressure      !< SI pressure unit.
type(uom64)           :: a_unit           !< A unit.
type(uom_reference64) :: a_unit_reference !< A unit reference.
logical               :: test_passed(9)   !< List of passed tests.
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
! test_passed = .false.
test_passed = .true.
print "(A,L1)", new_line('a')//'Are all tests passed? ', all(test_passed)
stop

a_unit = uom64('Pa[pressure] {pascal}')
si_pressure = uom64('kg [mass].m-1 [length-1].s-2 [time-2] (Pa[pressure]) {pascal}')
test_passed(1) = a_unit == si_pressure
print "(A,L1)", 'Pa = '//si_pressure%stringify()//', is correct? ', test_passed(1)

a_unit_reference = uom_reference64('kg')
test_passed(2) = si_pressure%has_reference(reference=a_unit_reference)
print "(A,L1)", si_pressure%stringify(with_aliases=.true.)//' has symbol kg, is correct? ', test_passed(2)

si_frequency = uom64('Hz [frequency]')
call a_unit%unset
a_unit = uom64('s-1 = Hz = hertz [frequency]') / si_frequency
test_passed(3) = a_unit%stringify()=='s0'
print "(A,L1)", 's-1/Hz = '//a_unit%stringify()//', is correct? ', test_passed(3)

call a_unit%unset
a_unit = si_frequency / uom64('s-1 = Hz = hertz [frequency]')
test_passed(4) = a_unit%stringify()=='Hz0'
print "(A,L1)", 'Hz/s-1 = '//a_unit%stringify()//', is correct? ', test_passed(4)

call a_unit%unset
a_unit = uom64('kHz = 1000 * hertz = 1000 * s-1 [frequency]')
test_passed(5) = a_unit%stringify(with_aliases=.true.)==&
                 'kHz = +0.100000000000000E+004 * hertz = +0.100000000000000E+004 * s-1'
print "(A,L1)", 'kHz = 1000 * hertz = 1000 * s-1 [frequency] == '//a_unit%stringify(with_aliases=.true., compact_reals=.true.)//&
  ', is correct? ', test_passed(5)

call a_unit%unset
a_unit = si_frequency / uom64('kHz = 1000 * Hz [frequency]')
test_passed(6) = a_unit%stringify()=='+0.100000000000000E-002 * Hz0'
print "(A,L1)", 'Hz/kHz == '//a_unit%stringify(compact_reals=.true.)//', is correct? ', test_passed(6)

call a_unit%unset
a_unit = uom64('kHz = 1000 * Hz [frequency]') / si_frequency
test_passed(7) = a_unit%stringify()=='kHz0'
print "(A,L1)", 'kHz/Hz == '//a_unit%stringify()//', is correct? ', test_passed(7)

call a_unit%unset
a_unit = si_frequency * uom64('kHz = 1000 * Hz [frequency]')
test_passed(8) = a_unit%stringify()=='+0.100000000000000E+004 * Hz2'
print "(A,L1)", 'Hz*kHz == '//a_unit%stringify(compact_reals=.true.)//', is correct? ', test_passed(8)

call a_unit%unset
a_unit = uom64('kHz = 1000 * Hz [frequency]') * si_frequency
test_passed(9) = a_unit%stringify()=='kHz2'
print "(A,L1)", 'kHz*Hz == '//a_unit%stringify()//', is correct? ', test_passed(9)

print "(A,L1)", new_line('a')//'Are all tests passed? ', all(test_passed)
stop
!-----------------------------------------------------------------------------------------------------------------------------------
endprogram fury_test_uom_aliases

assignments.f90 basename_dir.f90 befor64.F90 befor64.F90 befor64_pack_data_m.F90 befor64_pack_data_m.F90 camelcase.f90 capitalize.f90 compact_real.f90 compact_real.f90 compact_real.f90 concatenation.f90 csv_naive_parser.f90 decode.f90 encode.f90 equal.f90 escape.f90 extension.f90 fill.f90 free.f90 fury.f90 fury_mixed_kinds.F90 fury_qreal128.F90 fury_qreal32.F90 fury_qreal64.F90 fury_system_abstract128.F90 fury_system_abstract32.F90 fury_system_abstract64.F90 fury_system_si128.F90 fury_system_si32.F90 fury_system_si64.F90 fury_test_bolt32.f90 fury_test_bolt64.f90 fury_test_qreal_add.f90 fury_test_qreal_add_aliases_failure.f90 fury_test_qreal_add_failure.f90 fury_test_qreal_add_mixed.f90 fury_test_qreal_add_mixed_failure.f90 fury_test_qreal_aliases.f90 fury_test_qreal_assign.f90 fury_test_qreal_conversions_complex.f90 fury_test_qreal_conversions_si.f90 fury_test_qreal_conversions_simple.f90 fury_test_qreal_div.f90 fury_test_qreal_div_mixed.f90 fury_test_qreal_eq.f90 fury_test_qreal_eq_mixed.f90 fury_test_qreal_mul.f90 fury_test_qreal_mul_mixed.f90 fury_test_qreal_not_eq.f90 fury_test_qreal_not_eq_mixed.f90 fury_test_qreal_pow.f90 fury_test_qreal_sub.f90 fury_test_qreal_sub_failure.f90 fury_test_qreal_sub_mixed.f90 fury_test_qreal_sub_mixed_failure.f90 fury_test_system_si.f90 fury_test_uom_add.f90 fury_test_uom_add_failure.f90 fury_test_uom_aliases.f90 fury_test_uom_assign.f90 fury_test_uom_assign_failure.f90 fury_test_uom_div.f90 fury_test_uom_mul.f90 fury_test_uom_parse_failure.f90 fury_test_uom_pow.f90 fury_test_uom_sub.f90 fury_test_uom_sub_failure.f90 fury_uom128.F90 fury_uom32.F90 fury_uom64.F90 fury_uom_converter.F90 fury_uom_reference128.F90 fury_uom_reference32.F90 fury_uom_reference64.F90 fury_uom_symbol128.F90 fury_uom_symbol32.F90 fury_uom_symbol64.F90 greater_equal_than.f90 greater_than.f90 insert.f90 io_basic.F90 io_listdirected.F90 is_digit.f90 is_integer.f90 is_number.f90 is_real.f90 join.f90 lower_equal_than.f90 lower_than.f90 not_equal.f90 partition.f90 penf.F90 penf.F90 penf.F90 penf.F90 penf.F90 penf_b_size.F90 penf_global_parameters_variables.F90 penf_stringify.F90 read_file.f90 read_line.f90 read_lines.f90 replace.f90 reverse.f90 sadjustlr.f90 scount.f90 search.f90 sindex.f90 slen.f90 slice.f90 snakecase.f90 split.f90 srepeat.f90 sscan.f90 start_end.f90 startcase.f90 strim.f90 stringifor.F90 stringifor_string_t.F90 strip.f90 sverify.f90 swapcase.f90 test_all.F90 test_all.f90 test_all.f90 Test_Driver.f90 to_number.f90 unescape.f90 unique.f90 upper_lower.f90 write_file.f90 write_lines.f90