![]() |
OpenLB 1.8.1
|
List of cell indices and associated field data. More...
#include <cellIndexListD.h>
Inheritance diagram for olb::CellIndexListD< T, DESCRIPTOR, FIELDS >:
Collaboration diagram for olb::CellIndexListD< T, DESCRIPTOR, FIELDS >:Public Member Functions | |
| CellIndexListD (std::size_t capacity=64) | |
| CellIndexListD (std::vector< CellID > &&indices) | |
| std::size_t | size () const |
| std::size_t | append (std::size_t iCell) |
| Append cell index and allocate attached field data. | |
| void | sort () |
| Ascending sort of cell indices. | |
| template<typename FIELD > | |
| auto | getFieldPointer (std::size_t index) |
| Return pointer to FIELD at index. | |
| template<typename FIELD > | |
| auto | getField (std::size_t index) const |
| Return copy of FIELD data at index. | |
| template<typename FIELD > | |
| void | setField (std::size_t index, const FieldD< T, DESCRIPTOR, FIELD > &v) |
| Set FIELD data at index. | |
| template<typename FIELD > | |
| const auto & | getFieldArray () const |
| std::size_t | getNblock () const override |
| Returns the number of blocks. | |
| std::size_t | getSerializableSize () const override |
| Returns the binary size of the data to be saved. | |
| bool * | getBlock (std::size_t iBlock, std::size_t &sizeBlock, bool loadingMode) override |
| Returns the address of the i-th block and its size. | |
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. | |
List of cell indices and associated field data.
To be used as a possible input for upcoming Operators.
e.g. a velocity boundary operator accepts such a CellIndexListD containing the indices of boundary cells together with the velocity field to be applied.
Definition at line 49 of file cellIndexListD.h.
|
inline |
Definition at line 56 of file cellIndexListD.h.
|
inline |
Definition at line 62 of file cellIndexListD.h.
| std::size_t olb::CellIndexListD< T, DESCRIPTOR, FIELDS >::append | ( | std::size_t | iCell | ) |
Append cell index and allocate attached field data.
Definition at line 118 of file cellIndexListD.h.
|
overridevirtual |
Returns the address of the i-th block and its size.
| iBlock | Index of the block to be returned |
| sizeBlock | Reference to the size of the returned block |
Each getBlock() method should look like this:
std::size_t currentBlock = 0; bool* dataPtr = nullptr; // ... register methods... return dataPtr;
Implements olb::Serializable.
Definition at line 169 of file cellIndexListD.h.
|
inline |
Return copy of FIELD data at index.
Definition at line 94 of file cellIndexListD.h.
References olb::CellIndexListD< T, DESCRIPTOR, FIELDS >::getField().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 106 of file cellIndexListD.h.
|
inline |
Return pointer to FIELD at index.
Definition at line 87 of file cellIndexListD.h.
|
overridevirtual |
Returns the number of blocks.
All Serializable classes have to implement this method.
Implements olb::Serializable.
Definition at line 155 of file cellIndexListD.h.
|
overridevirtual |
Returns the binary size of the data to be saved.
This method must be overloaded by all child classes.
Implements olb::Serializable.
Definition at line 162 of file cellIndexListD.h.
|
inline |
Set FIELD data at index.
Definition at line 100 of file cellIndexListD.h.
References olb::CellIndexListD< T, DESCRIPTOR, FIELDS >::setField().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 71 of file cellIndexListD.h.
| void olb::CellIndexListD< T, DESCRIPTOR, FIELDS >::sort | ( | ) |
Ascending sort of cell indices.
Attached data is moved accordingly. Only useful for when processing chunks of sequential cell indices.
Definition at line 129 of file cellIndexListD.h.