system_si Derived Type

type, public, extends(system_abstract) :: system_si

type~~system_si~3~~InheritsGraph type~system_si~3 system_si type~qreal~3 qreal type~qreal~3->type~system_si~3 constants type~system_abstract~3 system_abstract type~qreal~3->type~system_abstract~3 constants type~uom_reference~3 uom_reference type~uom_reference~3->type~system_si~3 prefixes type~uom~3 uom type~uom_reference~3->type~uom~3 alias, references type~uom_reference~3->type~system_abstract~3 prefixes type~uom~3->type~system_si~3 units type~uom~3->type~qreal~3 unit type~uom~3->type~system_abstract~3 units type~uom_symbol~3 uom_symbol type~uom_symbol~3->type~uom_reference~3 aliases, dimensions type~uom_converter uom_converter type~uom_converter->type~uom_symbol~3 convert_ type~string string type~string->type~uom_symbol~3 symbol_ type~system_abstract~3->type~system_si~3
Help


International System of Units.



Components

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

Units system acronym, e.g. "SI" for the International System.

type(qreal), public, allocatable:: constants(:)

Defined constants.

integer(kind=I_P), public :: constants_number =0_I_P

Number of constants.

type(uom), public, allocatable:: units(:)

Defined units.

integer(kind=I_P), public :: units_number =0_I_P

Number of units.

type(uom_reference), public, allocatable:: prefixes(:)

Prefixes.

integer(kind=I_P), public :: prefixes_number =0_I_P

Number of prefixes.


Type-Bound Procedures

generic, public :: add_constant => add_constant_qreal

Add a new constant.

  • private subroutine add_constant_qreal(self, source)

    Add a new constant from qreal input.

    Arguments

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

    The system.

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

    Constant source.

generic, public :: add_prefix => add_prefix_string, add_prefix_uom_reference

Add a new prefix.

  • private subroutine add_prefix_string(self, source)

    Add a new prefix from string input.

    Arguments

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

    The system.

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

    Prefix source.

  • private subroutine add_prefix_uom_reference(self, source)

    Add a new prefix from uom_reference input.

    Arguments

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

    The system.

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

    Prefix source.

generic, public :: add_unit => add_unit_string, add_unit_uom

Add a new unit.

  • private subroutine add_unit_string(self, source)

    Add a new unit from string input.

    Arguments

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

    The system.

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

    Unit source.

  • private subroutine add_unit_uom(self, source)

    Add a new unit from uom input.

    Arguments

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

    The system.

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

    Unit source.

procedure, public, pass(self) :: const

Return an instance of the queried constant (if defined).

  • private function const(self, c) result(const_)

    Return an instance of the queried constant (if defined).

    Arguments

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

    The system.

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

    Constant name.

    Return Value type(qreal)

    The queried constant.

procedure, public, pass(self) :: free

Free the units system.

  • private elemental subroutine free(self)

    Free the units system.

    Arguments

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

    The system.

procedure, public, pass(self) :: list_constants

Return the list of defined constants.

  • private function list_constants(self, with_dimensions, with_aliases, with_name, compact_reals, prefix_string) result(raw)

    Return the list defined constants.

    Arguments

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

    The system.

    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 :: with_name

    Flag to activate name printing.

    logical, intent(in), optional :: compact_reals

    Flag to activate real numbers compacting.

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

    Prefix string.

    Return Value character(len=:), allocatable

    Raw characters data.

procedure, public, pass(self) :: list_prefixes

Return the list of defined prefixes.

  • private function list_prefixes(self, with_aliases, compact_reals, prefix_string) result(raw)

    Return the list defined prefixes.

    Arguments

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

    The system.

    logical, intent(in), optional :: with_aliases

    Flag to activate alias printing.

    logical, intent(in), optional :: compact_reals

    Flag to activate real numbers compacting.

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

    Prefix string.

    Return Value character(len=:), allocatable

    Raw characters data.

procedure, public, pass(self) :: list_units

Return the list of defined units.

  • private function list_units(self, with_dimensions, with_aliases, protect_aliases, with_name, compact_reals, prefix_string) result(raw)

    Return the list defined units.

    Arguments

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

    The system.

    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.

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

    Prefix string.

    Return Value character(len=:), allocatable

    Raw characters data.

procedure, public, pass(self) :: unit

Return an instance of the queried unit (if defined).

  • private function unit(self, u) result(unit_)

    Return an instance of the queried unit (if defined).

    Arguments

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

    The system.

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

    Unit name or main symbol alias.

    Return Value type(uom)

    The queried unit.

generic, public :: qunit => qunit_qreal

Return an instance of quantity with the queried unit.

  • private function qunit_qreal(self, u) result(qunit_)

    Return an instance of quantity (qreal) with the queried unit (if defined).

    Arguments

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

    The system.

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

    Unit name or main symbol alias.

    Return Value type(qreal)

    The queried quantity.

procedure, public, pass(self) :: initialize

Initialize the units system.

  • private subroutine initialize(self, acronym)

    Initialize the units system.

    Arguments

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

    The units system.

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

    Units system acronym, e.g. "SI" for the International System.