template<typename Functor, uint_t glDecrease>
class walberla::field::GhostLayerFieldAdaptor< Functor, glDecrease >
Adaptor for walberla::field::GhostLayerField.
Motivation:
- assume you have a LBM PDF field and you want to print / view / process the velocities which can be (easily) computed from the values of the PDF field
- one could create a second field, filled with the velocities, that is updated every time the pdfs changed
- the storage saving solution would be to create an adaptor that behaves just as a field, but holds no data. Instead the data is computed when it is requested.
Features:
- The GhostLayerFieldAdaptor implements (almost) the same members as a GhostLayerField -> it can be passed to any templated function that expects a GhostLayerField
- The GhostLayerFieldAdaptor wraps one base-field, which in the example above would have been the pdf field
- the adaptor has automatically the same x,y,z size as the base-field.
- the adaptor can have a different fSize and a smaller or equal number of ghost layers
Usage
- The customization of the adaptor (i.e. what it should compute) is done using a AdaptorFunctor that has to implement the following concept:
class AdaptorFunctor
{
}
{
return (*this) ( basefield_t::Ptr( baseField, x,y,z,f ) );
}
};
|
|
bool | operator== (const OwnType &other) const |
|
bool | hasSameAllocSize (const OwnType &other) const |
|
bool | hasSameSize (const OwnType &other) const |
|
|
const_iterator | beginXYZ () const |
|
const_iterator | beginSlice (cell_idx_t xBeg, cell_idx_t yBeg, cell_idx_t zBeg, cell_idx_t fBeg, cell_idx_t xEnd, cell_idx_t yEnd, cell_idx_t zEnd, cell_idx_t fEnd) const |
|
const_iterator | beginSliceXYZ (const CellInterval &interval, cell_idx_t f=0) const |
|
const const_iterator | end () const |
|
const_iterator | beginWithGhostLayer () const |
|
const_iterator | beginWithGhostLayerXYZ () const |
|
const_iterator | beginGhostLayerOnly (stencil::Direction dir) const |
|
const_iterator | beginGhostLayerOnlyXYZ (stencil::Direction dir, cell_idx_t f=0) const |
|
const_iterator | beginSliceBeforeGhostLayer (stencil::Direction dir, cell_idx_t width=1) const |
|
const_iterator | beginSliceBeforeGhostLayerXYZ (stencil::Direction dir, cell_idx_t width=1, cell_idx_t f=0) const |
|
void | getGhostRegion (stencil::Direction dir, CellInterval &ci) const |
|
void | getSliceBeforeGhostLayer (stencil::Direction d, CellInterval &ci, cell_idx_t width=1) const |
|
|
|
uint_t | xSize () const |
|
uint_t | ySize () const |
|
uint_t | zSize () const |
|
uint_t | fSize () const |
|
uint_t | xAllocSize () const |
|
uint_t | yAllocSize () const |
|
uint_t | zAllocSize () const |
|
uint_t | fAllocSize () const |
|
uint_t | allocSize () const |
|
CellInterval | xyzSize () const |
|
CellInterval | xyzAllocSize () const |
|
bool | coordinatesValid (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const |
|
Layout | layout () const |
|
T | operator() (cell_idx_t x, cell_idx_t y, cell_idx_t z) const |
|
T | operator() (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const |
|
T | operator() (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f) const |
|
T | operator() (const Cell &c) const |
|
T | operator() (const Cell &c, cell_idx_t f) const |
|
T | operator() (const Cell &c, uint_t f) const |
|
T | get (cell_idx_t x, cell_idx_t y, cell_idx_t z) const |
|
T | get (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const |
|
T | get (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f) const |
|
T | get (const Cell &c) const |
|
T | get (const Cell &c, cell_idx_t f) const |
|
T | get (const Cell &c, uint_t f) const |
|