Houses composite derivation class where multiple derivation results get added
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(AdditiveDerivation), | intent(inout) | :: | this | |||
type(RealArray), | intent(in), | dimension(:) | :: | inputArray | ||
integer(kind=ik), | intent(in), | dimension(:) | :: | indices |
Initialize additive derivation object, allocating the expected number of derivation objects
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(AdditiveDerivation), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | numDerivs | |||
integer(kind=ik), | intent(in) | :: | expectedNumIndices | |||
real(kind=rk), | intent(in), | optional | :: | resultPower | ||
real(kind=rk), | intent(in), | optional, | dimension(:) | :: | linearCoefficients |
Adds derivation to additive derivation object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(AdditiveDerivation), | intent(inout) | :: | this | |||
class(Derivation), | intent(in) | :: | deriv | |||
integer(kind=ik), | intent(in), | dimension(:) | :: | activeIndices |
Entries of indices object passed to calculateAdditive to be passed to added derivation |
Composite derivation class containing a number of calculation rules applied additively. All derivations must return same length array
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
type(DerivationContainer), | private, | allocatable, dimension(:) | :: | derivs |
Derivation whose results to be added |
||
type(IntArray), | private, | allocatable, dimension(:) | :: | derivIndices |
Subset of indices vector passed to each derivation |
||
integer(kind=ik), | private | :: | numAddedDerivations |
Counter for keeping track of added derivations |
|||
integer(kind=ik), | private | :: | expectedNumIndices |
Expected size of indices array - for errorChecking |
|||
real(kind=rk), | private | :: | resultPower |
Optional power to which the result is raised = default 1 |
|||
real(kind=rk), | private, | allocatable, dimension(:) | :: | linearCoefficients |
Additive linear combination coefficients associated with each derivation. Defaults to ones. |
procedure, public :: isDefined => isDefinedObject | |
procedure, public :: makeDefined => makeDefinedObject | |
procedure, public :: makeUndefined => makeUndefinedObject | |
procedure, public :: init => initAdditiveDeriv | |
procedure, public :: addDerivation | |
procedure, public :: calculate => calculateAdditive |