fury_uom64 Module

module~~fury_uom64~~UsesGraph module~fury_uom64 fury_uom64 module~fury_uom_symbol64 fury_uom_symbol64 module~fury_uom_symbol64->module~fury_uom64 module~fury_uom_reference64 fury_uom_reference64 module~fury_uom_symbol64->module~fury_uom_reference64 module~fury_uom_converter fury_uom_converter module~fury_uom_converter->module~fury_uom64 module~fury_uom_converter->module~fury_uom_symbol64 module~fury_uom_converter->module~fury_uom_reference64 module~stringifor stringifor module~stringifor->module~fury_uom64 module~stringifor->module~fury_uom_symbol64 module~stringifor->module~fury_uom_reference64 module~fury_uom_reference64->module~fury_uom64 iso_fortran_env iso_fortran_env iso_fortran_env->module~fury_uom64 iso_fortran_env->module~fury_uom_symbol64 iso_fortran_env->module~fury_uom_reference64 module~penf_stringify~3 penf_stringify iso_fortran_env->module~penf_stringify~3 module~penf~3 penf module~penf~3->module~fury_uom64 module~penf~3->module~fury_uom_symbol64 module~penf~3->module~fury_uom_converter module~penf~3->module~stringifor module~penf~3->module~fury_uom_reference64 module~stringifor_string_t stringifor_string_t module~penf~3->module~stringifor_string_t module~befor64 befor64 module~penf~3->module~befor64 module~befor64_pack_data_m~2 befor64_pack_data_m module~penf~3->module~befor64_pack_data_m~2 module~stringifor_string_t->module~stringifor module~befor64->module~stringifor_string_t module~befor64_pack_data_m~2->module~befor64 module~penf_global_parameters_variables penf_global_parameters_variables module~penf_global_parameters_variables->module~penf~3 module~penf_b_size~4 penf_b_size module~penf_global_parameters_variables->module~penf_b_size~4 module~penf_global_parameters_variables->module~penf_stringify~3 module~penf_b_size~4->module~penf~3 module~penf_b_size~4->module~penf_stringify~3 module~penf_stringify~3->module~penf~3
Help

FURY definition of unit of measure class with float64 real kind.

FURY implementation of unit of measure class of generic kind.

Used By

module~~fury_uom64~~UsedByGraph module~fury_uom64 fury_uom64 module~fury_system_si64 fury_system_si64 module~fury_uom64->module~fury_system_si64 module~fury_mixed_kinds fury_mixed_kinds module~fury_uom64->module~fury_mixed_kinds module~fury fury module~fury_uom64->module~fury module~fury_qreal64 fury_qreal64 module~fury_uom64->module~fury_qreal64 module~fury_system_abstract64 fury_system_abstract64 module~fury_uom64->module~fury_system_abstract64 module~fury_system_si64->module~fury module~fury_mixed_kinds->module~fury program~fury_test_qreal_div_mixed fury_test_qreal_div_mixed module~fury->program~fury_test_qreal_div_mixed program~fury_test_qreal_eq fury_test_qreal_eq module~fury->program~fury_test_qreal_eq program~fury_test_uom_div fury_test_uom_div module~fury->program~fury_test_uom_div program~fury_test_qreal_eq_mixed fury_test_qreal_eq_mixed module~fury->program~fury_test_qreal_eq_mixed program~fury_test_uom_mul fury_test_uom_mul module~fury->program~fury_test_uom_mul program~fury_test_qreal_mul fury_test_qreal_mul module~fury->program~fury_test_qreal_mul program~fury_test_bolt32 fury_test_bolt32 module~fury->program~fury_test_bolt32 program~fury_test_uom_sub_failure fury_test_uom_sub_failure module~fury->program~fury_test_uom_sub_failure program~fury_test_qreal_mul_mixed fury_test_qreal_mul_mixed module~fury->program~fury_test_qreal_mul_mixed program~fury_test_bolt64 fury_test_bolt64 module~fury->program~fury_test_bolt64 program~fury_test_qreal_not_eq fury_test_qreal_not_eq module~fury->program~fury_test_qreal_not_eq program~fury_test_system_si fury_test_system_si module~fury->program~fury_test_system_si program~fury_test_uom_sub fury_test_uom_sub module~fury->program~fury_test_uom_sub program~fury_test_qreal_not_eq_mixed fury_test_qreal_not_eq_mixed module~fury->program~fury_test_qreal_not_eq_mixed program~fury_test_qreal_sub_failure fury_test_qreal_sub_failure module~fury->program~fury_test_qreal_sub_failure program~fury_test_qreal_pow fury_test_qreal_pow module~fury->program~fury_test_qreal_pow program~fury_test_uom_aliases fury_test_uom_aliases module~fury->program~fury_test_uom_aliases program~fury_test_qreal_sub fury_test_qreal_sub module~fury->program~fury_test_qreal_sub program~fury_test_uom_parse_failure fury_test_uom_parse_failure module~fury->program~fury_test_uom_parse_failure program~fury_test_qreal_add_aliases_failure fury_test_qreal_add_aliases_failure module~fury->program~fury_test_qreal_add_aliases_failure program~fury_test_qreal_add_failure fury_test_qreal_add_failure module~fury->program~fury_test_qreal_add_failure module~dbm_to_mw_converter dBm_to_mW_converter module~fury->module~dbm_to_mw_converter program~fury_test_qreal_sub_mixed fury_test_qreal_sub_mixed module~fury->program~fury_test_qreal_sub_mixed program~fury_test_qreal_add_mixed fury_test_qreal_add_mixed module~fury->program~fury_test_qreal_add_mixed program~fury_test_qreal_add fury_test_qreal_add module~fury->program~fury_test_qreal_add program~fury_test_qreal_sub_mixed_failure fury_test_qreal_sub_mixed_failure module~fury->program~fury_test_qreal_sub_mixed_failure program~fury_test_qreal_add_mixed_failure fury_test_qreal_add_mixed_failure module~fury->program~fury_test_qreal_add_mixed_failure program~fury_test_qreal_aliases fury_test_qreal_aliases module~fury->program~fury_test_qreal_aliases program~fury_test_uom_add fury_test_uom_add module~fury->program~fury_test_uom_add program~fury_test_qreal_assign fury_test_qreal_assign module~fury->program~fury_test_qreal_assign program~fury_test_uom_add_failure fury_test_uom_add_failure module~fury->program~fury_test_uom_add_failure program~fury_test_uom_assign fury_test_uom_assign module~fury->program~fury_test_uom_assign program~fury_test_qreal_conversions_complex fury_test_qreal_conversions_complex module~fury->program~fury_test_qreal_conversions_complex program~fury_test_qreal_conversions_si fury_test_qreal_conversions_si module~fury->program~fury_test_qreal_conversions_si program~fury_test_uom_pow fury_test_uom_pow module~fury->program~fury_test_uom_pow program~fury_test_qreal_conversions_simple fury_test_qreal_conversions_simple module~fury->program~fury_test_qreal_conversions_simple program~fury_test_uom_assign_failure fury_test_uom_assign_failure module~fury->program~fury_test_uom_assign_failure program~fury_test_qreal_div fury_test_qreal_div module~fury->program~fury_test_qreal_div module~fury_qreal64->module~fury_system_si64 module~fury_qreal64->module~fury_mixed_kinds module~fury_qreal64->module~fury module~fury_qreal64->module~fury_system_abstract64 module~fury_system_abstract64->module~fury_system_si64 module~fury_system_abstract64->module~fury module~dbm_to_mw_converter->program~fury_test_qreal_conversions_complex
Help


Interfaces

public interface uom

Ovearloading uom name with a set of creator functions.

  • private function creator_from_string(source, alias, name) result(unit)

    Create an instance of uom from an input source string.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: source

    Source input string definition of the unit.

    type(uom_reference), intent(in), optional :: alias

    Alias of the unit, e.g Pa (kg.m-1.s-2) for Pascal [pressure].

    character(len=*), intent(in), optional :: name

    Unit name.

    Return Value type(uom)

    The unit.


Derived Types

type, public :: uom

Unit of measure (UOM) class.

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: name

Unit name.

type(uom_reference), private, allocatable:: alias

Alias of the unit, e.g Pa (kg.m-1.s-2) for Pascal.

type(uom_reference), private, allocatable:: references(:)

Reference units of the unit.

integer(kind=I_P), private :: references_number =0_I_P

References number.

Constructor

Ovearloading uom name with a set of creator functions.

private function creator_from_string(source, alias, name)

Create an instance of uom from an input source string.

Type-Bound Procedures

procedure, public, pass(self) :: get_alias

Return the alias.

procedure, public, pass(self) :: get_main_reference

Return the main reference.

procedure, public, pass(self) :: get_main_symbol

Return the main symbol.

procedure, public, pass(self) :: get_references

Return the references.

procedure, public, pass(self) :: has_alias

Check if the unit has an alias.

procedure, public, pass(self) :: has_name

Check if the unit has a name.

procedure, public, pass(self) :: has_reference

Check if the unit has a queried reference unit.

procedure, public, pass(self) :: is_defined

Check if the unit is defined.

procedure, public, pass(self) :: prefixed

Return prefixed unit.

procedure, public, pass(self) :: set

Set the unit.

procedure, public, pass(self) :: set_alias_conversion

Set alias conversion formula.

procedure, public, pass(self) :: stringify

Return a string representation of the unit.

procedure, public, pass(self) :: to

Convert magnitude with respect another unit.

procedure, public, pass(self) :: unset

unset the unit.

generic, public :: assignment(=) => assign_uom

Overloading = operator.

generic, public :: operator(+) => add

Overloading + operator.

generic, public :: operator(/) => div

Overloading / operator.

generic, public :: operator(*) => mul

Overloading * operator.

generic, public :: operator(-) => sub

Overloading - operator.

generic, public :: operator(**) => pow_R8P, pow_R4P, pow_I8P, pow_I4P, pow_I2P, pow_I1P

Overloading ** operator.

generic, public :: operator(==) => is_equal

Overloading == operator.

procedure, private, pass(self) :: add_reference

Add a reference unit to unit.

procedure, private, pass(self) :: is_equal

Check if unit is equal with another one.

procedure, private, pass(self) :: parse

Parse unit definition from an input string.

procedure, private, pass(self) :: parse_alias

Parse unit alias from an input string.

procedure, private, pass(self) :: parse_name

Parse unit name from an input string.

procedure, private, pass(self) :: parse_references

Parse reference units from an input string.

procedure, private, pass(self) :: update_references_number

Update reference units number counter.

procedure, private, pass(lhs) :: assign_uom

uom = uom assignment.

procedure, private, pass(lhs) :: add

uom + uom operator.

procedure, private, pass(lhs) :: div

uom / uom operator.

procedure, private, pass(lhs) :: mul

uom * uom operator.

procedure, private, pass(lhs) :: sub

uom - uom operator.

procedure, private, pass(lhs) :: pow_R16P

uom ** real(R16P) operator.

procedure, private, pass(lhs) :: pow_R8P

uom ** real(R8P) operator.

procedure, private, pass(lhs) :: pow_R4P

uom ** real(R4P) operator.

procedure, private, pass(lhs) :: pow_I8P

uom ** integer(I8P) operator.

procedure, private, pass(lhs) :: pow_I4P

uom ** integer(I4P) operator.

procedure, private, pass(lhs) :: pow_I2P

uom ** integer(I2P) operator.

procedure, private, pass(lhs) :: pow_I1P

uom ** integer(I1P) operator.


Functions

private function creator_from_string(source, alias, name) result(unit)

Create an instance of uom from an input source string.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: source

Source input string definition of the unit.

type(uom_reference), intent(in), optional :: alias

Alias of the unit, e.g Pa (kg.m-1.s-2) for Pascal [pressure].

character(len=*), intent(in), optional :: name

Unit name.

Return Value type(uom)

The unit.

private function get_main_symbol(self) result(symbol)

Return the main symbol, i.e. self%alias%aliases(1)%symbol_ if self%alias is defined or self%references(1)%aliases(1)%symbol_ if self has only 1 uom_reference.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The uom.

Return Value type(string)

Main alias symbol.

private pure function get_main_reference(self) result(reference)

Return the main reference, i.e. self%alias if self%alias is defined or self%references(1) if self has only 1 uom_reference.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The uom.

Return Value type(uom_reference)

Main uom reference.

private elemental function has_name(self)

Check if the unit has a name.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

Return Value logical

Name presence status.

private elemental function has_reference(self, reference)

Check if the unit has a queried reference unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

type(uom_reference), intent(in) :: reference

Reference unit to check the presence of.

Return Value logical

reference unit presence status.

private elemental function is_defined(self)

Check if the unit has been defined, namely it has defined references.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

Return Value logical

Definition status.

private function prefixed(self, prefixes)

Return prefixed unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

type(uom_reference), intent(in) :: prefixes

Prefixes data.

Return Value type(uom)

Prefixed unit.

private pure function stringify(self, with_dimensions, with_aliases, protect_aliases, with_name, compact_reals) result(raw)

Return a string representation of the unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

logical, intent(in), optional :: with_dimensions

Flag to activate dimensions printing.

logical, intent(in), optional :: with_aliases

Flag to activate aliases printing.

logical, intent(in), optional :: protect_aliases

Flag to activate aliases printing in protected mode.

logical, intent(in), optional :: with_name

Flag to activate name printing.

logical, intent(in), optional :: compact_reals

Flag to activate real numbers compacting.

Return Value character(len=:), allocatable

Raw characters data.

private elemental function to(self, other, magnitude) result(converted)

Convert magnitude with respect another unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The uom.

type(uom), intent(in) :: other

Other unit used for conversion.

real(kind=RKP), intent(in) :: magnitude

Magnitude to be converted.

Return Value real(kind=RKP)

Converted magnitude.

private elemental function has_alias(self)

Check if the unit has an alias.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

Return Value logical

Check result.

private elemental function is_equal(self, other)

Check if unit is equal (has the same references units) with another one.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The unit.

class(uom), intent(in) :: other

The other unit.

Return Value logical

Check result.

private function add(lhs, rhs) result(opr)

uom + uom operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

class(uom), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function div(lhs, rhs) result(opr)

uom / uom operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

class(uom), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function mul(lhs, rhs) result(opr)

uom * uom operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

class(uom), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function sub(lhs, rhs) result(opr)

uom - uom operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

class(uom), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_R16P(lhs, rhs) result(opr)

uom ** real(R16P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

real(kind=R16P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_R8P(lhs, rhs) result(opr)

uom ** real(R8P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

real(kind=R8P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_R4P(lhs, rhs) result(opr)

uom ** real(R4P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

real(kind=R4P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_I8P(lhs, rhs) result(opr)

uom ** integer(I8P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

integer(kind=I8P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_I4P(lhs, rhs) result(opr)

uom ** integer(I4P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

integer(kind=I4P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_I2P(lhs, rhs) result(opr)

uom ** integer(I2P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

integer(kind=I2P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.

private function pow_I1P(lhs, rhs) result(opr)

uom ** integer(I1P) operator.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: lhs

Left hand side.

integer(kind=I1P), intent(in) :: rhs

Right hand side.

Return Value type(uom)

Operator result.


Subroutines

private subroutine remove_reference(references, id)

Remove a reference from the list of references.

Arguments

Type IntentOptional AttributesName
type(uom_reference), intent(inout), allocatable:: references(:)

References list.

integer(kind=I_P), intent(in) :: id

Index of reference to remove.

private pure subroutine get_alias(self, alias)

Return the alias.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The uom.

type(uom_reference), intent(out) :: alias

Uom main alias.

private pure subroutine get_references(self, references)

Return the references.

Arguments

Type IntentOptional AttributesName
class(uom), intent(in) :: self

The uom.

type(uom_reference), intent(out), allocatable:: references(:)

Uom references.

private pure subroutine set(self, references, alias, name)

Set the unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

type(uom_reference), intent(in), optional :: references(1:)

Unit references of the unit.

type(uom_reference), intent(in), optional :: alias

Alias of the unit, e.g Pa (kg.m-1.s-2) for Pascal [pressure].

character(len=*), intent(in), optional :: name

Unit name.

private pure subroutine set_alias_conversion(self, reference_index, alias_index, convert)

Set alias conversion formula.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The uom reference.

integer(kind=I_P), intent(in) :: reference_index

Index of the reference to which set the conversion formula.

integer(kind=I_P), intent(in) :: alias_index

Index of the alias to which set the conversion formula.

class(uom_converter), intent(in) :: convert

Generic conversion alias formula user-supplied.

private elemental subroutine unset(self)

Unset the unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

private elemental subroutine add_reference(self, reference)

Add reference unit to unit.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

type(uom_reference), intent(in) :: reference

Unit reference to be added.

private subroutine parse(self, source)

Parse unit definition form an input string.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

character(len=*), intent(in) :: source

Input source string.

private subroutine parse_alias(self, source)

Parse unit alias form an input string and return also the source string without the alias data.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

type(string), intent(inout) :: source

Input source string.

private subroutine parse_name(self, source)

Parse unit name form an input string and return also the source string without the name data.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

type(string), intent(inout) :: source

Input source string.

private subroutine parse_references(self, source)

Parse references units form an input string.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

type(string), intent(in) :: source

Input source string.

private elemental subroutine update_references_number(self)

Update references number counter.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: self

The unit.

private subroutine assign_uom(lhs, rhs)

uom = uom assignment.

Arguments

Type IntentOptional AttributesName
class(uom), intent(inout) :: lhs

Left hand side.

class(uom), intent(in) :: rhs

Right hand side.