Skip to content

fury_qreal32 ​

FURY class definition of real (with float32 kind) quantity with associated unit of measure. FURY class implementation of real quantity of generic kind with associated unit of measure.

Source: src/lib/fury_qreal32.F90

Dependencies

Contents ​

Derived Types ​

qreal ​

Real quantity with associated unit of measure.

Components

NameTypeAttributesDescription
magnitudereal(kind=RKP)Magnitude of the quantity.
unitclass(uom)allocatableUnit of measure of the quantity.
namecharacter(len=:)allocatableQuantity name.

Type-Bound Procedures

NameAttributesDescription
allocate_unitpass(self)Allocate unit.
has_namepass(self)Check if the quantity has defined name.
has_same_unitpass(self)Check if the quantity has the same unit of another one.
is_unit_definedpass(self)Check if the unit has been defined.
setpass(self)Set quantity.
stringifypass(self)Return a string representation of the quantity with unit symbol.
topass(self)Convert quantity with respect another unit if its unit has a conversion alias.
unsetpass(self)Unset quantity.
assignment(=)Overloading = assignment. Generic: assign_qreal
operator(+)Overloading + operator. Generic: add, positive
operator(/)Overloading / operator. Generic: div, div_R8P, div_R4P, div_I8P, div_I4P, div_I2P, div_I1P
operator(*)Overloading * operator. Generic: mul, mul_R8P, mul_R4P, mul_I8P, mul_I4P, mul_I2P, mul_I1P, R8P_mul, R4P_mul, I8P_mul, I4P_mul, I2P_mul, I1P_mul
operator(-)Overloading - operator. Generic: sub, negative
operator(**)Overloading ** operator. Generic: pow_R8P, pow_R4P, pow_I8P, pow_I4P, pow_I2P, pow_I1P
operator(==)Overloading == operator. Generic: is_equal
operator(/=)Overloading /= operator. Generic: is_not_equal
is_equalpass(self)Check if qreal is equal with another one.
is_not_equalpass(self)Check if qreal is not equal with another one.
assign_qrealpass(lhs)qreal = qreal assignment.
addpass(lhs)qreal + qreal operator.
positivepass(self) + qreal unary operator.
divpass(lhs)qreal / qreal operator.
div_R16Ppass(lhs)qreal / real(R16P) operator.
div_R8Ppass(lhs)qreal / real(R8P) operator.
div_R4Ppass(lhs)qreal / real(R4P) operator.
div_I8Ppass(lhs)qreal / integer(I8P) operator.
div_I4Ppass(lhs)qreal / integer(I4P) operator.
div_I2Ppass(lhs)qreal / integer(I2P) operator.
div_I1Ppass(lhs)qreal / integer(I1P) operator.
mulpass(lhs)qreal * qreal operator.
mul_R16Ppass(lhs)qreal * real(R16P) operator.
mul_R8Ppass(lhs)qreal * real(R8P) operator.
mul_R4Ppass(lhs)qreal * real(R4P) operator.
mul_I8Ppass(lhs)qreal * integer(I8P) operator.
mul_I4Ppass(lhs)qreal * integer(I4P) operator.
mul_I2Ppass(lhs)qreal * integer(I2P) operator.
mul_I1Ppass(lhs)qreal * integer(I1P) operator.
R16P_mulpass(rhs)real(R16P) * qreal operator.
R8P_mulpass(rhs)real(R8P) * qreal operator.
R4P_mulpass(rhs)real(R4P) * qreal operator.
I8P_mulpass(rhs)integer(I8P) * qreal operator.
I4P_mulpass(rhs)integer(I4P) * qreal operator.
I2P_mulpass(rhs)integer(I2P) * qreal operator.
I1P_mulpass(rhs)integer(I1P) * qreal operator.
subpass(lhs)qreal - qreal operator.
negativepass(self) - qreal unary operator.
pow_R16Ppass(lhs)qreal ** real(R16P) operator.
pow_R8Ppass(lhs)qreal ** real(R8P) operator.
pow_R4Ppass(lhs)qreal ** real(R4P) operator.
pow_I8Ppass(lhs)qreal ** integer(I8P) operator.
pow_I4Ppass(lhs)qreal ** integer(I4P) operator.
pow_I2Ppass(lhs)qreal ** integer(I2P) operator.
pow_I1Ppass(lhs)qreal ** integer(I1P) operator.

Interfaces ​

qreal ​

Ovearloading qreal name with a creator function.

Module procedures: creator

operator(*) ​

Ovearloading operator *: number * uom generates qreal.

Module procedures: R8P_mul_uom, R4P_mul_uom, I8P_mul_uom, I4P_mul_uom, I2P_mul_uom, I1P_mul_uom

Subroutines ​

allocate_unit ​

allocate_unit.

Attributes: elemental

fortran
subroutine allocate_unit(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inoutThe quantity.

Call graph

set ​

Set quantity.

fortran
subroutine set(self, magnitude, unit, name)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inoutThe quantity.
magnitudereal(kind=RKP)inoptionalMagnitude of the quantity.
unitclass(uom)inoptionalUnit of measure of the quantity.
namecharacter(len=*)inoptionalQuantity name.

Call graph

unset ​

Unset quantity.

Attributes: elemental

fortran
subroutine unset(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inoutThe quantity.

Call graph

assign_qreal ​

qreal = qreal assignment.

fortran
subroutine assign_qreal(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inoutLeft hand side.
rhstype(qreal)inRight hand side.

Call graph

Functions ​

creator ​

Create an instance of qreal quantity.

fortran
 use fury
 type(qreal32)  :: metre32
 type(qreal64)  :: metre64
 type(qreal128) :: metre128
 logical        :: test_passed(3)
 metre32  = qreal32( magnitude=1._R_P, unit=uom32( source='m [length]', name='metre'))
 metre64  = qreal64( magnitude=1._R_P, unit=uom64( source='m [length]', name='metre'))
 metre128 = qreal128(magnitude=1._R_P, unit=uom128(source='m [length]', name='metre'))
 test_passed(1) = metre32%stringify( format='(F3.1)')=='1.0 m'
 test_passed(2) = metre64%stringify( format='(F3.1)')=='1.0 m'
 test_passed(3) = metre128%stringify(format='(F3.1)')=='1.0 m'
 print "(L1)", all(test_passed)

Returns: type(qreal)

fortran
function creator(magnitude, unit, name) result(quantity)

Arguments

NameTypeIntentAttributesDescription
magnitudereal(kind=RKP)inoptionalMagnitude of the quantity.
unitclass(uom)inoptionalUnit of measure of the quantity.
namecharacter(len=*)inoptionalQuantity name.

Call graph

R16P_mul_uom ​

real(R16P) * uom operator.

Returns: type(qreal)

fortran
function R16P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhstype(uom)inRight hand side.

R8P_mul_uom ​

real(R8P) * uom operator.

Returns: type(qreal)

fortran
function R8P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhstype(uom)inRight hand side.

R4P_mul_uom ​

real(R4P) * uom operator.

Returns: type(qreal)

fortran
function R4P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhstype(uom)inRight hand side.

I8P_mul_uom ​

integer(I8P) * uom operator.

Returns: type(qreal)

fortran
function I8P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhstype(uom)inRight hand side.

I4P_mul_uom ​

integer(I4P) * uom operator.

Returns: type(qreal)

fortran
function I4P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhstype(uom)inRight hand side.

I2P_mul_uom ​

integer(I2P) * uom operator.

Returns: type(qreal)

fortran
function I2P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhstype(uom)inRight hand side.

I1P_mul_uom ​

integer(I1P) * uom operator.

Returns: type(qreal)

fortran
function I1P_mul_uom(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhstype(uom)inRight hand side.

has_name ​

Check if the quantity has defined name.

Attributes: elemental

Returns: logical

fortran
function has_name(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.

Call graph

has_same_unit ​

Check if the quantity has the same unit of another one.

Attributes: elemental

Returns: logical

fortran
function has_same_unit(self, other)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.
othertype(qreal)inThe other quantity.

Call graph

is_unit_defined ​

Check if the unit has been defined.

Attributes: elemental

Returns: logical

fortran
function is_unit_defined(self) result(is_defined)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.

Call graph

stringify ​

Return a string representation of the quantity with unit symbol.

Returns: character(len=:)

fortran
function stringify(self, format, with_dimensions, with_aliases, with_name, compact_reals) result(raw)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.
formatcharacter(len=*)inoptionalFormat to string magnitude.
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.

Call graph

to ​

Convert quantity with respect another unit if its unit has a conversion alias.

Returns: type(qreal)

fortran
function to(self, unit) result(converted)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.
unittype(uom)inUnit of conversion.

Call graph

is_equal ​

Check if qreal is equal with another one.

Attributes: elemental

Returns: logical

fortran
function is_equal(self, other)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe unit.
othertype(qreal)inThe other unit.

Call graph

is_not_equal ​

Check if qreal is not equal with another one.

Attributes: elemental

Returns: logical

fortran
function is_not_equal(self, other)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe unit.
othertype(qreal)inThe other unit.

Call graph

add ​

qreal + qreal operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhstype(qreal)inRight hand side.

Call graph

positive ​

+ qreal unary operator.

Returns: type(qreal)

fortran
function positive(self) result(opr)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.

Call graph

div ​

qreal / qreal operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhstype(qreal)inRight hand side.

Call graph

div_R16P ​

qreal / real(R16P) operator.

Returns: type(qreal)

fortran
function div_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

div_R8P ​

qreal / real(R8P) operator.

Returns: type(qreal)

fortran
function div_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

div_R4P ​

qreal / real(R4P) operator.

Returns: type(qreal)

fortran
function div_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

div_I8P ​

qreal / integer(I8P) operator.

Returns: type(qreal)

fortran
function div_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

div_I4P ​

qreal / integer(I4P) operator.

Returns: type(qreal)

fortran
function div_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

div_I2P ​

qreal / integer(I2P) operator.

Returns: type(qreal)

fortran
function div_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

div_I1P ​

qreal / integer(I1P) operator.

Returns: type(qreal)

fortran
function div_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

mul ​

qreal * qreal operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhstype(qreal)inRight hand side.

Call graph

mul_R16P ​

qreal * real(R16P) operator.

Returns: type(qreal)

fortran
function mul_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

mul_R8P ​

qreal * real(R8P) operator.

Returns: type(qreal)

fortran
function mul_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

mul_R4P ​

qreal * real(R4P) operator.

Returns: type(qreal)

fortran
function mul_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

mul_I8P ​

qreal * integer(I8P) operator.

Returns: type(qreal)

fortran
function mul_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

mul_I4P ​

qreal * integer(I4P) operator.

Returns: type(qreal)

fortran
function mul_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

mul_I2P ​

qreal * integer(I2P) operator.

Returns: type(qreal)

fortran
function mul_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

mul_I1P ​

qreal * integer(I1P) operator.

Returns: type(qreal)

fortran
function mul_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

R16P_mul ​

real(R16P) * qreal operator.

Returns: type(qreal)

fortran
function R16P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(qreal)inRight hand side.

R8P_mul ​

real(R8P) * qreal operator.

Returns: type(qreal)

fortran
function R8P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(qreal)inRight hand side.

R4P_mul ​

real(R4P) * qreal operator.

Returns: type(qreal)

fortran
function R4P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(qreal)inRight hand side.

I8P_mul ​

integer(I8P) * qreal operator.

Returns: type(qreal)

fortran
function I8P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(qreal)inRight hand side.

I4P_mul ​

integer(I4P) * qreal operator.

Returns: type(qreal)

fortran
function I4P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(qreal)inRight hand side.

I2P_mul ​

integer(I2P) * qreal operator.

Returns: type(qreal)

fortran
function I2P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(qreal)inRight hand side.

I1P_mul ​

integer(I1P) * qreal operator.

Returns: type(qreal)

fortran
function I1P_mul(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(qreal)inRight hand side.

sub ​

qreal - qreal operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhstype(qreal)inRight hand side.

Call graph

negative ​

- qreal unary operator.

Returns: type(qreal)

fortran
function negative(self) result(opr)

Arguments

NameTypeIntentAttributesDescription
selfclass(qreal)inThe quantity.

Call graph

pow_R16P ​

qreal ** real(R16P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

pow_R8P ​

qreal ** real(R8P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

pow_R4P ​

qreal ** real(R4P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

pow_I8P ​

qreal ** integer(I8P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

pow_I4P ​

qreal ** integer(I4P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

pow_I2P ​

qreal ** integer(I2P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

pow_I1P ​

qreal ** integer(I1P) operator.

Returns: type(qreal)

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

Arguments

NameTypeIntentAttributesDescription
lhsclass(qreal)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

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