OpenLB 1.7
|
Storage for a fixed set of static FIELDS and arbitrary custom fields. More...
#include <fieldArrayD.h>
Public Types | |
using | fields_t = meta::list<FIELDS...> |
Public Member Functions | |
MultiFieldArrayD (std::size_t count=1) | |
template<typename FIELD > | |
const FieldArrayD< T, DESCRIPTOR, PLATFORM, FIELD > & | get (meta::id< FIELD > field=meta::id< FIELD >()) const |
template<typename FIELD > | |
FieldArrayD< T, DESCRIPTOR, PLATFORM, FIELD > & | get (meta::id< FIELD > field=meta::id< FIELD >()) |
template<typename FIELD > | |
auto | getField (std::size_t iCell) const |
Return copy of FIELD data for cell iCell. | |
template<typename FIELD > | |
void | setField (std::size_t iCell, const FieldD< T, DESCRIPTOR, FIELD > &v) |
Set FIELD data at cell iCell. | |
template<typename FIELD > | |
const FIELD::template value_type< T > & | getFieldComponent (std::size_t iCell, unsigned iDim) const |
template<typename FIELD > | |
FIELD::template value_type< T > & | getFieldComponent (std::size_t iCell, unsigned iDim) |
template<typename FIELD > | |
auto | getFieldPointer (std::size_t iCell) const |
template<typename FIELD > | |
auto | getFieldPointer (std::size_t iCell) |
template<typename F > | |
void | forFields (F f) const |
Apply generic expression to each FIELD array. | |
template<typename F > | |
void | forFields (F f) |
template<typename F > | |
void | forFieldsAt (std::size_t idx, F f) |
Apply generic lambda expression to each FIELD of a cell. | |
void | resize (std::size_t newCount) |
Change number of rows. | |
void | swap (std::size_t i, std::size_t j) |
Swap contents of rows i and j. | |
void | setProcessingContext (ProcessingContext context) |
std::size_t | getNblock () const override |
Number of data blocks for the serializable interface. | |
std::size_t | getSerializableSize () const override |
Binary size for the serializer. | |
bool * | getBlock (std::size_t iBlock, std::size_t &sizeBlock, bool loadingMode) override |
Return a pointer to the memory of the current block and its size for the serializable interface. | |
Public Member Functions inherited from olb::Serializable | |
virtual | ~Serializable ()=default |
template<bool includeLogOutputDir = true> | |
bool | save (std::string fileName="", const bool enforceUint=false) |
Save Serializable into file fileName | |
template<bool includeLogOutputDir = true> | |
bool | load (std::string fileName="", const bool enforceUint=false) |
Load Serializable from file fileName | |
bool | save (std::uint8_t *buffer) |
Save Serializable into buffer of length getSerializableSize | |
bool | load (const std::uint8_t *buffer) |
Load Serializable from buffer of length getSerializableSize | |
virtual void | postLoad () |
Additional Inherited Members | |
Protected Member Functions inherited from olb::Serializable | |
template<typename DataType > | |
void | registerVar (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, const DataType &data, const size_t arrayLength=1) const |
Register primitive data types (int , double , ...) or arrays of those. | |
template<typename DataType > | |
void | registerSerializableOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false) |
Register Serializable object of constant size. | |
template<typename DataType > | |
void | registerSerializablesOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType *data, const size_t arrayLength, const bool loadingMode=false) |
Register an array of Serializable objects of constant size. | |
Storage for a fixed set of static FIELDS and arbitrary custom fields.
Actual field data is stored by individual FieldArrayD instances
This class is not tied to block-structured resp. list-like data concepts and may be used for both lattice and (resizable) particle data.
Definition at line 352 of file fieldArrayD.h.
using olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::fields_t = meta::list<FIELDS...> |
Definition at line 360 of file fieldArrayD.h.
|
inline |
Definition at line 362 of file fieldArrayD.h.
void olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFields | ( | F | f | ) |
Definition at line 60 of file fieldArrayD.hh.
void olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFields | ( | F | f | ) | const |
Apply generic expression to each FIELD array.
Definition at line 51 of file fieldArrayD.hh.
void olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFieldsAt | ( | std::size_t | idx, |
F | f ) |
Apply generic lambda expression to each FIELD of a cell.
Definition at line 69 of file fieldArrayD.hh.
|
inline |
Definition at line 377 of file fieldArrayD.h.
References olb::meta::contains().
|
inline |
Definition at line 370 of file fieldArrayD.h.
References olb::meta::contains().
|
overridevirtual |
Return a pointer to the memory of the current block and its size for the serializable interface.
Implements olb::Serializable.
Definition at line 89 of file fieldArrayD.hh.
References olb::meta::tuple_for_each().
|
inline |
Return copy of FIELD data for cell iCell.
Definition at line 385 of file fieldArrayD.h.
FIELD::template value_type< T > & olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::getFieldComponent | ( | std::size_t | iCell, |
unsigned | iDim ) |
Definition at line 44 of file fieldArrayD.hh.
const FIELD::template value_type< T > & olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::getFieldComponent | ( | std::size_t | iCell, |
unsigned | iDim ) const |
Definition at line 36 of file fieldArrayD.hh.
|
inline |
Definition at line 408 of file fieldArrayD.h.
|
inline |
Definition at line 403 of file fieldArrayD.h.
|
overridevirtual |
Number of data blocks for the serializable interface.
Implements olb::Serializable.
Definition at line 77 of file fieldArrayD.hh.
|
overridevirtual |
Binary size for the serializer.
Implements olb::Serializable.
Definition at line 83 of file fieldArrayD.hh.
|
inline |
Change number of rows.
Drops the last (newCount-_count) rows when shrinking
Definition at line 426 of file fieldArrayD.h.
References olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFields().
|
inline |
Set FIELD data at cell iCell.
Definition at line 392 of file fieldArrayD.h.
|
inline |
Definition at line 442 of file fieldArrayD.h.
References olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFields().
|
inline |
Swap contents of rows i and j.
Definition at line 435 of file fieldArrayD.h.
References olb::MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS >::forFields().