Abstract units system class.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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. |
Initialize the units system.
Initialize the units system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The units system. |
||
| character(len=*), | intent(in), | optional | :: | acronym | Units system acronym, e.g. "SI" for the International System. |
Add a new constant.
Add a new constant from qreal input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(qreal), | intent(in) | :: | source | Constant source. |
Add a new prefix.
Add a new prefix from string input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | source | Prefix source. |
Add a new prefix from uom_reference input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(uom_reference), | intent(in) | :: | source | Prefix source. |
Add a new unit.
Add a new unit from string input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | source | Unit source. |
Add a new unit from uom input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(uom), | intent(in) | :: | source | Unit source. |
Return an instance of the queried constant (if defined).
Return an instance of the queried constant (if defined).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | c | Constant name. |
The queried constant.
Free the units system.
Free the units system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
Return the list of defined constants.
Return the list defined constants.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
Raw characters data.
Return the list of defined prefixes.
Return the list defined prefixes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
Raw characters data.
Return the list of defined units.
Return the list defined units.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
Raw characters data.
Return an instance of the queried unit (if defined).
Return an instance of the queried unit (if defined).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | u | Unit name or main symbol alias. |
The queried unit.
Return an instance of quantity with the queried unit.
Return an instance of quantity (qreal) with the queried unit (if defined).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | u | Unit name or main symbol alias. |
The queried quantity.
Add a new constant from qreal input.
Add a new constant from qreal input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(qreal), | intent(in) | :: | source | Constant source. |
Add a new prefix from string input.
Add a new prefix from string input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | source | Prefix source. |
Add a new prefix from uom_reference input.
Add a new prefix from uom_reference input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(uom_reference), | intent(in) | :: | source | Prefix source. |
Add a new unit from string input.
Add a new unit from string input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | source | Unit source. |
Add a new unit from uom input.
Add a new unit from uom input.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(inout) | :: | self | The system. |
||
| type(uom), | intent(in) | :: | source | Unit source. |
Check if a constant is present into the system.
Return an instance of the queried unit (if defined).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| type(qreal), | intent(in) | :: | const | Constant queried. |
Flag to check if queried constant has been found.
Check if a prefix is present into the system.
Check if a prefix is present into the system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| type(uom_reference), | intent(in) | :: | prefix | prefix queried. |
Flag to check if queried prefix has been found.
Check if a unit is present into the system.
Check if a unit is present into the system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| type(uom), | intent(in) | :: | unit | Unit queried. |
Flag to check if queried unit has been found.
Return an instance of quantity with the queried unit.
Return an instance of quantity (qreal) with the queried unit (if defined).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_abstract), | intent(in) | :: | self | The system. |
||
| character(len=*), | intent(in) | :: | u | Unit name or main symbol alias. |
The queried quantity.