Skip to content

fury_system_abstract64 ​

FURY definition of abstract units system with float64 kind. FURY implementation of abstract units system with generic kind.

Source: src/lib/fury_system_abstract64.F90

Dependencies

Contents ​

Derived Types ​

system_abstract ​

Abstract units system class.

Inheritance

Attributes: abstract

Components

NameTypeAttributesDescription
acronymcharacter(len=:)allocatableUnits system acronym, e.g. "SI" for the International System.
constantstype(qreal)allocatableDefined constants.
constants_numberinteger(kind=I_P)Number of constants.
unitstype(uom)allocatableDefined units.
units_numberinteger(kind=I_P)Number of units.
prefixestype(uom_reference)allocatablePrefixes.
prefixes_numberinteger(kind=I_P)Number of prefixes.

Type-Bound Procedures

NameAttributesDescription
initializepass(self)Initialize the units system.
add_constantAdd a new constant. Generic: add_constant_qreal
add_prefixAdd a new prefix. Generic: add_prefix_string, add_prefix_uom_reference
add_unitAdd a new unit. Generic: add_unit_string, add_unit_uom
constpass(self)Return an instance of the queried constant (if defined).
freepass(self)Free the units system.
list_constantspass(self)Return the list of defined constants.
list_prefixespass(self)Return the list of defined prefixes.
list_unitspass(self)Return the list of defined units.
unitpass(self)Return an instance of the queried unit (if defined).
qunitReturn an instance of quantity with the queried unit. Generic: qunit_qreal
add_constant_qrealpass(self)Add a new constant from qreal input.
add_prefix_stringpass(self)Add a new prefix from string input.
add_prefix_uom_referencepass(self)Add a new prefix from uom_reference input.
add_unit_stringpass(self)Add a new unit from string input.
add_unit_uompass(self)Add a new unit from uom input.
has_constantpass(self)Check if a constant is present into the system.
has_prefixpass(self)Check if a prefix is present into the system.
has_unitpass(self)Check if a unit is present into the system.
qunit_qrealpass(self)Return an instance of quantity with the queried unit.

Subroutines ​

free ​

Free the units system.

Attributes: elemental

fortran
subroutine free(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.

add_constant_qreal ​

Add a new constant from qreal input.

fortran
subroutine add_constant_qreal(self, source)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.
sourcetype(qreal)inConstant source.

Call graph

add_prefix_string ​

Add a new prefix from string input.

fortran
subroutine add_prefix_string(self, source)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.
sourcecharacter(len=*)inPrefix source.

Call graph

add_prefix_uom_reference ​

Add a new prefix from uom_reference input.

fortran
subroutine add_prefix_uom_reference(self, source)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.
sourcetype(uom_reference)inPrefix source.

Call graph

add_unit_string ​

Add a new unit from string input.

fortran
subroutine add_unit_string(self, source)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.
sourcecharacter(len=*)inUnit source.

Call graph

add_unit_uom ​

Add a new unit from uom input.

fortran
subroutine add_unit_uom(self, source)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inoutThe system.
sourcetype(uom)inUnit source.

Call graph

Functions ​

const ​

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

Returns: type(qreal)

fortran
function const(self, c) result(const_)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
ccharacter(len=*)inConstant name.

Call graph

list_constants ​

Return the list defined constants.

Returns: character(len=:)

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

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
with_dimensionslogicalinoptionalFlag to activate dimensions printing.
with_aliaseslogicalinoptionalFlag to activate aliases printing.
with_namelogicalinoptionalFlag to activate name printing.
compact_realslogicalinoptionalFlag to activate real numbers compacting.
prefix_stringcharacter(len=*)inoptionalPrefix string.

Call graph

list_prefixes ​

Return the list defined prefixes.

Returns: character(len=:)

fortran
function list_prefixes(self, with_aliases, compact_reals, prefix_string) result(raw)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
with_aliaseslogicalinoptionalFlag to activate alias printing.
compact_realslogicalinoptionalFlag to activate real numbers compacting.
prefix_stringcharacter(len=*)inoptionalPrefix string.

Call graph

list_units ​

Return the list defined units.

Returns: character(len=:)

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

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
with_dimensionslogicalinoptionalFlag to activate dimensions printing.
with_aliaseslogicalinoptionalFlag to activate aliases printing.
protect_aliaseslogicalinoptionalFlag to activate aliases printing in protected mode.
with_namelogicalinoptionalFlag to activate name printing.
compact_realslogicalinoptionalFlag to activate real numbers compacting.
prefix_stringcharacter(len=*)inoptionalPrefix string.

Call graph

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)

fortran
function unit(self, u) result(unit_)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
ucharacter(len=*)inUnit name or symbol.

Call graph

has_constant ​

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

Returns: logical

fortran
function has_constant(self, const) result(is_found)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
consttype(qreal)inConstant queried.

Call graph

has_prefix ​

Check if a prefix is present into the system.

Returns: logical

fortran
function has_prefix(self, prefix) result(is_found)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
prefixtype(uom_reference)inprefix queried.

Call graph

has_unit ​

Check if a unit is present into the system.

Returns: logical

fortran
function has_unit(self, unit) result(is_found)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
unittype(uom)inUnit queried.

Call graph

qunit_qreal ​

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

This is useful to build quantity by algebric expressions, e.g. q1 = 2.0 * system%qunit('metre').

Returns: type(qreal)

fortran
function qunit_qreal(self, u) result(qunit_)

Arguments

NameTypeIntentAttributesDescription
selfclass(system_abstract)inThe system.
ucharacter(len=*)inUnit name or main symbol alias.

Call graph

is_queried ​

Check if a unit is the queried one: by its name or by a synonym of its main symbol.

The synonyms are searched into the main alias of the unit (e.g. "N" of "kg.m.s-2 (N[force])") and into its reference when it is the only one (e.g. "min" of "minute = 60 * s = min (minute[time])"): a unit made of more references (e.g. "m [length].s-1 [time-1]") is matched by its alias or name only.

Returns: logical

fortran
function is_queried(unit, query)

Arguments

NameTypeIntentAttributesDescription
unittype(uom)inThe unit.
querycharacter(len=*)inUnit name or symbol.

Call graph

has_synonym ​

Check if a reference has a synonym of its main symbol equal to the query.

A synonym is an alias with the same exponent of the main symbol, without multiplicative factor, additive offset or user-supplied converter: "meter" is a synonym of "m = metre = meter", "s" is not a synonym of "Hz = s-1".

Returns: logical

fortran
function has_synonym(reference, query)

Arguments

NameTypeIntentAttributesDescription
referencetype(uom_reference)inThe reference.
querycharacter(len=*)inSymbol queried.

Call graph

Released under GPL v3, BSD 2-Clause, BSD 3-Clause or MIT, at your choice.