Houses flattened data represenation with multidimensional indexing
Return shape of data stored
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(in) | :: | this |
Return multidimensional value for given indexSet (should match array dimension)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in), | dimension(:) | :: | indexSet |
Return 1D slice of data at dimension given by sliceIndex and with the other indices set to indexSet
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in), | dimension(:) | :: | indexSet | ||
integer(kind=ik), | intent(in) | :: | sliceIndex |
Return 1D slice indices of data at dimension given by sliceIndex and with the other indices set to indexSet
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in), | dimension(:) | :: | indexSet | ||
integer(kind=ik), | intent(in) | :: | sliceIndex |
Initializes the data based on a deferred rank input array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(inout) | :: | this | |||
real(kind=rk), | intent(in), | dimension(..) | :: | array |
Initializes the data based on an already flat array. Requires dimensions/shape to be explicitly passed
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FlatNDData), | intent(inout) | :: | this | |||
real(kind=rk), | intent(in), | dimension(:) | :: | array | ||
integer(kind=ik), | intent(in), | dimension(:) | :: | dims |
Flat representation of multidimensional data allowing for multidimensional indexing using vector notation - i.e. dataObj%getValue([1,2,3]) = someData(1,2,3). Allows for dimensionality agnostic implementations of various algorithms.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
integer(kind=ik), | private, | allocatable, dimension(:) | :: | dims |
Dimension sizes of each dimension |
||
real(kind=rk), | public, | allocatable, dimension(:) | :: | data |
Flattened data array (in Fortran order!) |
procedure, public :: isDefined => isDefinedObject | |
procedure, public :: makeDefined => makeDefinedObject | |
procedure, public :: makeUndefined => makeUndefinedObject | |
procedure, public :: getValue | |
procedure, public :: get1DSlice | |
procedure, public :: get1DSliceIndices | |
procedure, public :: getDims | |
procedure, public :: init => initFlatNDData | |
procedure, public :: directInit |