Information of a data-field. More...
#include <DataFieldInfo.h>
Public Member Functions | |
DataFieldInfo () | |
Default constructor. | |
DataFieldInfo (const boost::shared_ptr< FieldMetainfoImpl > &fieldMetainfoImpl) | |
Construct with FieldMetainfoImpl. | |
DataFieldInfo (const DataFieldInfo &other) | |
Copy constructor. | |
DataFieldInfo & | operator= (const DataFieldInfo &other) |
Assignment operator. | |
template<typename TDataField > | |
void | Init (const TDataField &dataField) |
Initialize with field. More... | |
template<typename TDataField > | |
void | Init (const TDataField &dataField, std::string name) |
Initializer with field and new name. More... | |
void | Init (std::string name, std::string type, int bytesPerElement, int rank, int iSize, int jSize, int kSize, int lSize, int iMinusHalo, int iPlusHalo, int jMinusHalo, int jPlusHalo, int kMinusHalo, int kPlusHalo, int lMinusHalo, int lPlusHalo) |
Initializer with sparse information. More... | |
const MetainfoSet & | metainfo () const |
Gives read-only access to the metainformation associated with the field. | |
std::string | name () const |
The field name. | |
std::string | type () const |
The field scalar type. | |
int | dataSize () const |
The size of the field data in bytes is returned. | |
int | bytesPerElement () const |
The dimension in bytes of a single element. | |
int | rank () const |
The number of dimensions of the field. | |
int | iSize () const |
The size of the field in i-direction, including the halo. | |
int | jSize () const |
The size of the field in j-direction, including the halo. | |
int | kSize () const |
The size of the field in k-direction, including the halo. | |
int | lSize () const |
The size of the field in l-direction, including the halo. | |
int | iMinusHaloSize () const |
The size of the halo in negative i-direction. | |
int | iPlusHaloSize () const |
The size of the halo in positive i-direction. | |
int | jMinusHaloSize () const |
The size of the halo in negative j-direction. | |
int | jPlusHaloSize () const |
The size of the halo in positive j-direction. | |
int | kMinusHaloSize () const |
The size of the halo in negative k-direction. | |
int | kPlusHaloSize () const |
The size of the halo in positive k-direction. | |
int | lMinusHaloSize () const |
The size of the halo in negative l-direction. | |
int | lPlusHaloSize () const |
The size of the halo in positive l-direction. | |
int | fieldLength () const |
The number of bytes occupied by the field. | |
IJKSize | calculationDomain () const |
The calculation domain of the field. | |
IJKSize | size () const |
The total storage of the field (calculation domain and boundary) | |
IJKBoundary | boundary () const |
The size of the halo of the field. | |
template<typename ValueType > | |
void | AddMetainfo (const std::string &key, const ValueType &value) |
Add new metainformation. | |
bool | operator== (const DataFieldInfo &other) const |
Comparator operator. | |
bool | operator!= (const DataFieldInfo &other) const |
Comparator operator. | |
std::string | ToString () const |
Gives a string representation of the object, useful for debugging. | |
void | setImpl (const boost::shared_ptr< FieldMetainfoImpl > &fieldMetainfoImpl) |
Set implementation pointer. | |
boost::shared_ptr< FieldMetainfoImpl > & | getImpl () |
Get implementation pointer. | |
const boost::shared_ptr< FieldMetainfoImpl > & | getImpl () const |
Information of a data-field.
Definition at line 31 of file DataFieldInfo.h.
|
inline |
Initialize with field.
This general-purpose initializer reads the information from a given data field.
dataField | The field of which the information must be read |
Definition at line 51 of file DataFieldInfo.h.
|
inline |
Initializer with field and new name.
This general-purpose initializer recovers the information from a given data field.
dataField | The field of which the information must be read |
name | The name of the field when serialized |
Definition at line 62 of file DataFieldInfo.h.
void serialbox::stella::DataFieldInfo::Init | ( | std::string | name, |
std::string | type, | ||
int | bytesPerElement, | ||
int | rank, | ||
int | iSize, | ||
int | jSize, | ||
int | kSize, | ||
int | lSize, | ||
int | iMinusHalo, | ||
int | iPlusHalo, | ||
int | jMinusHalo, | ||
int | jPlusHalo, | ||
int | kMinusHalo, | ||
int | kPlusHalo, | ||
int | lMinusHalo, | ||
int | lPlusHalo | ||
) |
Initializer with sparse information.
This initializer collects the information given in the multiple parameters.
name | The name of the field |
type | The data type of the field (e.g. "double") |
bytesPerElement | The size in bytes of a single entry |
rank | The number of dimensions of the field |
iSize | The size in i-direction (including of halo) |
jSize | The size in j-direction (including of halo) |
kSize | The size in k-direction (including of halo) |
lSize | The size in l-direction (including of halo) |
iMinusHalo | The dimension of the halo in negative i-direction |
iPlusHalo | The dimension of the halo in positive i-direction |
jMinusHalo | The dimension of the halo in negative j-direction |
jPlusHalo | The dimension of the halo in positive j-direction |
kMinusHalo | The dimension of the halo in negative k-direction |
kPlusHalo | The dimension of the halo in positive k-direction |
lMinusHalo | The dimension of the halo in negative l-direction |
lPlusHalo | The dimension of the halo in positive l-direction |
Definition at line 39 of file DataFieldInfo.cpp.