![]() |
OpenLB 1.8.1
|
This class serializes the cells inside the geometry. More...
#include <serialization.h>
Public Member Functions | |
SimpleGeometrySerializer (CuboidDecomposition< S, dim > &cGeometry) | |
SimpleGeometrySerializer (SuperGeometry< S, dim > &sGeometry) | |
std::size_t | getSerializedCellIndex (const int latticeR[]) const override |
Compute serialized cell index from lattice coordinates. | |
LatticeR< dim+1 > | getLatticeR (std::size_t index) const override |
Get lattice coordinates from serialized cell index. | |
unsigned | getNoCells () const override |
![]() | |
std::size_t | getSerializedCellIndex (LatticeR< dim+1 > latticeR) const |
Compute serialized cell index from lattice coordinates. | |
std::size_t | getSerializedComponentIndex (const int latticeR[], unsigned iD, unsigned fieldDim) const |
Get index of field component from lattice coordinates and component index. | |
std::size_t | getSerializedComponentIndex (LatticeR< dim+1 > latticeR, unsigned iD, unsigned fieldDim) const |
Get index of field component from lattice coordinates and component index. | |
std::size_t | getSerializedComponentIndex (LatticeAndFieldR coords, unsigned fieldDim) const |
Get index of field component from lattice coordinates and component index. | |
LatticeAndFieldR | getLatticeAndFieldR (std::size_t index, unsigned fieldDim) const |
Get lattice coordinates and field component from serialized field index. | |
Protected Attributes | |
CuboidDecomposition< S, dim > & | _cGeometry |
const unsigned | _noCuboids |
This class serializes the cells inside the geometry.
Formula for serialized cell index (3d): cuboid_offset + NX*NY*z + NX*y + x Formula for serialized field component index: fieldDim * cellIndex + fieldComponent
This class is not intended to be used in performance-relevant context. Index computations could be accellerated if desired.
Definition at line 114 of file serialization.h.
|
inline |
Definition at line 126 of file serialization.h.
References olb::opti::SimpleGeometrySerializer< S, dim >::_cGeometry, olb::opti::SimpleGeometrySerializer< S, dim >::_noCuboids, olb::CuboidDecomposition< T, D >::get(), olb::Cuboid< T, D >::getLatticeVolume(), and olb::CuboidDecomposition< T, D >::getMotherCuboid().
|
inline |
Definition at line 148 of file serialization.h.
|
inlineoverridevirtual |
Get lattice coordinates from serialized cell index.
Implements olb::opti::GeometrySerializer< S, dim >.
Definition at line 171 of file serialization.h.
References olb::opti::SimpleGeometrySerializer< S, dim >::_cGeometry, and olb::CuboidDecomposition< T, D >::get().
|
inlineoverridevirtual |
Implements olb::opti::GeometrySerializer< S, dim >.
Definition at line 195 of file serialization.h.
|
inlineoverridevirtual |
Compute serialized cell index from lattice coordinates.
Implements olb::opti::GeometrySerializer< S, dim >.
Definition at line 153 of file serialization.h.
References olb::opti::SimpleGeometrySerializer< S, dim >::_cGeometry, and olb::CuboidDecomposition< T, D >::get().
|
protected |
Definition at line 117 of file serialization.h.
|
protected |
Definition at line 118 of file serialization.h.