fury_system_si32
FURY definition of International System of Units with float32 kind. FURY implementation of International System of Units with generic kind.
Source: src/lib/fury_system_si32.F90
Dependencies
Contents
Derived Types
system_si
International System of Units.
Inheritance
Extends: system_abstract
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
acronym | character(len=:) | allocatable | Units system acronym, e.g. "SI" for the International System. |
constants | type(qreal) | allocatable | Defined constants. |
constants_number | integer(kind=I_P) | Number of constants. | |
units | type(uom) | allocatable | Defined units. |
units_number | integer(kind=I_P) | Number of units. | |
prefixes | type(uom_reference) | allocatable | Prefixes. |
prefixes_number | integer(kind=I_P) | Number of prefixes. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
add_constant | Add a new constant. Generic: add_constant_qreal | |
add_prefix | Add a new prefix. Generic: add_prefix_string, add_prefix_uom_reference | |
add_unit | Add a new unit. Generic: add_unit_string, add_unit_uom | |
const | pass(self) | Return an instance of the queried constant (if defined). |
free | pass(self) | Free the units system. |
list_constants | pass(self) | Return the list of defined constants. |
list_prefixes | pass(self) | Return the list of defined prefixes. |
list_units | pass(self) | Return the list of defined units. |
unit | pass(self) | Return an instance of the queried unit (if defined). |
qunit | Return an instance of quantity with the queried unit. Generic: qunit_qreal | |
initialize | pass(self) | Initialize the units system. |
system_si%const
Return an instance of the queried constant (if defined).
Returns: type(qreal)
function const(self, c) result(const_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | in | The system. | |
c | character(len=*) | in | Constant name. |
Call graph
system_si%free
Free the units system.
Attributes: elemental
subroutine free(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | inout | The system. |
system_si%list_constants
Return the list defined constants.
Returns: character(len=:)
function list_constants(self, with_dimensions, with_aliases, with_name, compact_reals, prefix_string) result(raw)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | in | The system. | |
with_dimensions | logical | in | optional | Flag to activate dimensions printing. |
with_aliases | logical | in | optional | Flag to activate aliases printing. |
with_name | logical | in | optional | Flag to activate name printing. |
compact_reals | logical | in | optional | Flag to activate real numbers compacting. |
prefix_string | character(len=*) | in | optional | Prefix string. |
Call graph
system_si%list_prefixes
Return the list defined prefixes.
Returns: character(len=:)
function list_prefixes(self, with_aliases, compact_reals, prefix_string) result(raw)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | in | The system. | |
with_aliases | logical | in | optional | Flag to activate alias printing. |
compact_reals | logical | in | optional | Flag to activate real numbers compacting. |
prefix_string | character(len=*) | in | optional | Prefix string. |
Call graph
system_si%list_units
Return the list defined units.
Returns: character(len=:)
function list_units(self, with_dimensions, with_aliases, protect_aliases, with_name, compact_reals, prefix_string) result(raw)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | in | The system. | |
with_dimensions | logical | in | optional | Flag to activate dimensions printing. |
with_aliases | logical | in | optional | Flag to activate aliases printing. |
protect_aliases | logical | in | optional | Flag to activate aliases printing in protected mode. |
with_name | logical | in | optional | Flag to activate name printing. |
compact_reals | logical | in | optional | Flag to activate real numbers compacting. |
prefix_string | character(len=*) | in | optional | Prefix string. |
Call graph
system_si%unit
Return an instance of the queried unit (if defined).
The query matches the unit name or a synonym of its main symbol, that is an alias with the same exponent, without multiplicative factor, additive offset or user-supplied converter (e.g. "meter" of "m = metre = meter"). The units obtained prefixing the system units by the system prefixes are queried too (e.g. "km", "kilometre"). The unit returned is undefined if the query matches no unit.
Returns: type(uom)
function unit(self, u) result(unit_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_abstract) | in | The system. | |
u | character(len=*) | in | Unit name or symbol. |
Call graph
Subroutines
initialize
Initialize the units system.
@todo Load from file.
subroutine initialize(self, acronym)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(system_si) | inout | The units system. | |
acronym | character(len=*) | in | optional | Units system acronym, e.g. "SI" for the International System. |
Call graph