fury_qreal64
FURY class definition of real (with float64 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_qreal64.F90
Dependencies
Contents
- qreal
- qreal
- operator(*)
- allocate_unit
- set
- unset
- assign_qreal
- creator
- R16P_mul_uom
- R8P_mul_uom
- R4P_mul_uom
- I8P_mul_uom
- I4P_mul_uom
- I2P_mul_uom
- I1P_mul_uom
- has_name
- has_same_unit
- is_unit_defined
- stringify
- to
- is_equal
- is_not_equal
- add
- positive
- div
- div_R16P
- div_R8P
- div_R4P
- div_I8P
- div_I4P
- div_I2P
- div_I1P
- mul
- mul_R16P
- mul_R8P
- mul_R4P
- mul_I8P
- mul_I4P
- mul_I2P
- mul_I1P
- R16P_mul
- R8P_mul
- R4P_mul
- I8P_mul
- I4P_mul
- I2P_mul
- I1P_mul
- sub
- negative
- pow_R16P
- pow_R8P
- pow_R4P
- pow_I8P
- pow_I4P
- pow_I2P
- pow_I1P
Derived Types
qreal
Real quantity with associated unit of measure.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
magnitude | real(kind=RKP) | Magnitude of the quantity. | |
unit | class(uom) | allocatable | Unit of measure of the quantity. |
name | character(len=:) | allocatable | Quantity name. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
allocate_unit | pass(self) | Allocate unit. |
has_name | pass(self) | Check if the quantity has defined name. |
has_same_unit | pass(self) | Check if the quantity has the same unit of another one. |
is_unit_defined | pass(self) | Check if the unit has been defined. |
set | pass(self) | Set quantity. |
stringify | pass(self) | Return a string representation of the quantity with unit symbol. |
to | pass(self) | Convert quantity with respect another unit if its unit has a conversion alias. |
unset | pass(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_equal | pass(self) | Check if qreal is equal with another one. |
is_not_equal | pass(self) | Check if qreal is not equal with another one. |
assign_qreal | pass(lhs) | qreal = qreal assignment. |
add | pass(lhs) | qreal + qreal operator. |
positive | pass(self) | + qreal unary operator. |
div | pass(lhs) | qreal / qreal operator. |
div_R16P | pass(lhs) | qreal / real(R16P) operator. |
div_R8P | pass(lhs) | qreal / real(R8P) operator. |
div_R4P | pass(lhs) | qreal / real(R4P) operator. |
div_I8P | pass(lhs) | qreal / integer(I8P) operator. |
div_I4P | pass(lhs) | qreal / integer(I4P) operator. |
div_I2P | pass(lhs) | qreal / integer(I2P) operator. |
div_I1P | pass(lhs) | qreal / integer(I1P) operator. |
mul | pass(lhs) | qreal * qreal operator. |
mul_R16P | pass(lhs) | qreal * real(R16P) operator. |
mul_R8P | pass(lhs) | qreal * real(R8P) operator. |
mul_R4P | pass(lhs) | qreal * real(R4P) operator. |
mul_I8P | pass(lhs) | qreal * integer(I8P) operator. |
mul_I4P | pass(lhs) | qreal * integer(I4P) operator. |
mul_I2P | pass(lhs) | qreal * integer(I2P) operator. |
mul_I1P | pass(lhs) | qreal * integer(I1P) operator. |
R16P_mul | pass(rhs) | real(R16P) * qreal operator. |
R8P_mul | pass(rhs) | real(R8P) * qreal operator. |
R4P_mul | pass(rhs) | real(R4P) * qreal operator. |
I8P_mul | pass(rhs) | integer(I8P) * qreal operator. |
I4P_mul | pass(rhs) | integer(I4P) * qreal operator. |
I2P_mul | pass(rhs) | integer(I2P) * qreal operator. |
I1P_mul | pass(rhs) | integer(I1P) * qreal operator. |
sub | pass(lhs) | qreal - qreal operator. |
negative | pass(self) | - qreal unary operator. |
pow_R16P | pass(lhs) | qreal ** real(R16P) operator. |
pow_R8P | pass(lhs) | qreal ** real(R8P) operator. |
pow_R4P | pass(lhs) | qreal ** real(R4P) operator. |
pow_I8P | pass(lhs) | qreal ** integer(I8P) operator. |
pow_I4P | pass(lhs) | qreal ** integer(I4P) operator. |
pow_I2P | pass(lhs) | qreal ** integer(I2P) operator. |
pow_I1P | pass(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
subroutine allocate_unit(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | inout | The quantity. |
Call graph
set
Set quantity.
subroutine set(self, magnitude, unit, name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | inout | The quantity. | |
magnitude | real(kind=RKP) | in | optional | Magnitude of the quantity. |
unit | class(uom) | in | optional | Unit of measure of the quantity. |
name | character(len=*) | in | optional | Quantity name. |
Call graph
unset
Unset quantity.
Attributes: elemental
subroutine unset(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | inout | The quantity. |
Call graph
assign_qreal
qreal = qreal assignment.
subroutine assign_qreal(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | inout | Left hand side. | |
rhs | type(qreal) | in | Right hand side. |
Call graph
Functions
creator
Create an instance of qreal quantity.
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)
function creator(magnitude, unit, name) result(quantity)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
magnitude | real(kind=RKP) | in | optional | Magnitude of the quantity. |
unit | class(uom) | in | optional | Unit of measure of the quantity. |
name | character(len=*) | in | optional | Quantity name. |
Call graph
R16P_mul_uom
real(R16P) * uom operator.
Returns: type(qreal)
function R16P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
R8P_mul_uom
real(R8P) * uom operator.
Returns: type(qreal)
function R8P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
R4P_mul_uom
real(R4P) * uom operator.
Returns: type(qreal)
function R4P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
I8P_mul_uom
integer(I8P) * uom operator.
Returns: type(qreal)
function I8P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
I4P_mul_uom
integer(I4P) * uom operator.
Returns: type(qreal)
function I4P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
I2P_mul_uom
integer(I2P) * uom operator.
Returns: type(qreal)
function I2P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
I1P_mul_uom
integer(I1P) * uom operator.
Returns: type(qreal)
function I1P_mul_uom(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | type(uom) | in | Right hand side. |
has_name
Check if the quantity has defined name.
Attributes: elemental
Returns: logical
function has_name(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. |
Call graph
has_same_unit
Check if the quantity has the same unit of another one.
Attributes: elemental
Returns: logical
function has_same_unit(self, other)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. | |
other | type(qreal) | in | The other quantity. |
Call graph
is_unit_defined
Check if the unit has been defined.
Attributes: elemental
Returns: logical
function is_unit_defined(self) result(is_defined)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. |
Call graph
stringify
Return a string representation of the quantity with unit symbol.
Returns: character(len=:)
function stringify(self, format, with_dimensions, with_aliases, with_name, compact_reals) result(raw)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. | |
format | character(len=*) | in | optional | Format to string magnitude. |
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. |
Call graph
to
Convert quantity with respect another unit if its unit has a conversion alias.
Returns: type(qreal)
function to(self, unit) result(converted)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. | |
unit | type(uom) | in | Unit of conversion. |
Call graph
is_equal
Check if qreal is equal with another one.
Attributes: elemental
Returns: logical
function is_equal(self, other)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The unit. | |
other | type(qreal) | in | The other unit. |
Call graph
is_not_equal
Check if qreal is not equal with another one.
Attributes: elemental
Returns: logical
function is_not_equal(self, other)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The unit. | |
other | type(qreal) | in | The other unit. |
Call graph
add
qreal + qreal operator.
Returns: type(qreal)
function add(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | type(qreal) | in | Right hand side. |
Call graph
positive
+ qreal unary operator.
Returns: type(qreal)
function positive(self) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. |
Call graph
div
qreal / qreal operator.
Returns: type(qreal)
function div(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | type(qreal) | in | Right hand side. |
Call graph
div_R16P
qreal / real(R16P) operator.
Returns: type(qreal)
function div_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
div_R8P
qreal / real(R8P) operator.
Returns: type(qreal)
function div_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
div_R4P
qreal / real(R4P) operator.
Returns: type(qreal)
function div_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
div_I8P
qreal / integer(I8P) operator.
Returns: type(qreal)
function div_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
div_I4P
qreal / integer(I4P) operator.
Returns: type(qreal)
function div_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
div_I2P
qreal / integer(I2P) operator.
Returns: type(qreal)
function div_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
div_I1P
qreal / integer(I1P) operator.
Returns: type(qreal)
function div_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
mul
qreal * qreal operator.
Returns: type(qreal)
function mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | type(qreal) | in | Right hand side. |
Call graph
mul_R16P
qreal * real(R16P) operator.
Returns: type(qreal)
function mul_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
mul_R8P
qreal * real(R8P) operator.
Returns: type(qreal)
function mul_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
mul_R4P
qreal * real(R4P) operator.
Returns: type(qreal)
function mul_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
mul_I8P
qreal * integer(I8P) operator.
Returns: type(qreal)
function mul_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
mul_I4P
qreal * integer(I4P) operator.
Returns: type(qreal)
function mul_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
mul_I2P
qreal * integer(I2P) operator.
Returns: type(qreal)
function mul_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
mul_I1P
qreal * integer(I1P) operator.
Returns: type(qreal)
function mul_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
R16P_mul
real(R16P) * qreal operator.
Returns: type(qreal)
function R16P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
R8P_mul
real(R8P) * qreal operator.
Returns: type(qreal)
function R8P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
R4P_mul
real(R4P) * qreal operator.
Returns: type(qreal)
function R4P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
I8P_mul
integer(I8P) * qreal operator.
Returns: type(qreal)
function I8P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
I4P_mul
integer(I4P) * qreal operator.
Returns: type(qreal)
function I4P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
I2P_mul
integer(I2P) * qreal operator.
Returns: type(qreal)
function I2P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
I1P_mul
integer(I1P) * qreal operator.
Returns: type(qreal)
function I1P_mul(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(qreal) | in | Right hand side. |
sub
qreal - qreal operator.
Returns: type(qreal)
function sub(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | type(qreal) | in | Right hand side. |
Call graph
negative
- qreal unary operator.
Returns: type(qreal)
function negative(self) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(qreal) | in | The quantity. |
Call graph
pow_R16P
qreal ** real(R16P) operator.
Returns: type(qreal)
function pow_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
pow_R8P
qreal ** real(R8P) operator.
Returns: type(qreal)
function pow_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
pow_R4P
qreal ** real(R4P) operator.
Returns: type(qreal)
function pow_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
pow_I8P
qreal ** integer(I8P) operator.
Returns: type(qreal)
function pow_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
pow_I4P
qreal ** integer(I4P) operator.
Returns: type(qreal)
function pow_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
pow_I2P
qreal ** integer(I2P) operator.
Returns: type(qreal)
function pow_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
pow_I1P
qreal ** integer(I1P) operator.
Returns: type(qreal)
function pow_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(qreal) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph