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!) |
Getter for userDefined
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(in) | :: | this |
Set userDefined to .true.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(inout) | :: | this |
Set userDefined to .false.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(inout) | :: | 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 |
Return shape of data stored
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(FlatNDData), | intent(in) | :: | this |
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 |