walberla::field::Field< T, fSize_ > Class Template Reference

Detailed Description

template<typename T, uint_t fSize_>
class walberla::field::Field< T, fSize_ >

A four dimensional field/lattice.

Implemented as a vector style container using consecutive memory to provide fixed time access to any member. The four coordinates are labeled x,y,z,f. Two memory layouts (linearization strategies) are offered, see Layout

Two possible field layouts

Template Parameters:

  • T type that is stored in the field
  • fSize size of the f coordinate

See also Overview of Field Module

#include <FieldIterator.h>

+ Inheritance diagram for walberla::field::Field< T, fSize_ >:

Public Member Functions

Construction & Destruction
 Field (uint_t xSize, uint_t ySize, uint_t zSize, const Layout &layout=fzyx, const shared_ptr< FieldAllocator< T > > &alloc=shared_ptr< FieldAllocator< T > >())
 Creates an uninitialized field of given size. More...
 
 Field (uint_t xSize, uint_t ySize, uint_t zSize, const T &initValue, const Layout &layout=fzyx, const shared_ptr< FieldAllocator< T > > &alloc=shared_ptr< FieldAllocator< T > >())
 Creates a field and initializes it with constant. More...
 
 Field (uint_t xSize, uint_t ySize, uint_t zSize, const std::vector< T > &fValues, const Layout &layout=fzyx, const shared_ptr< FieldAllocator< T > > &alloc=shared_ptr< FieldAllocator< T > >())
 Creates a field and initializes f coordinate with vector values. More...
 
virtual ~Field ()
 Destructor, using Allocator template parameter. More...
 
void init (uint_t xSize, uint_t ySize, uint_t zSize, const Layout &layout=fzyx, shared_ptr< FieldAllocator< T > > alloc=shared_ptr< FieldAllocator< T > >(), uint_t innerGhostLayerSizeForAlignedAlloc=0)
 Initializes the field with a given size, in a given layout. More...
 
virtual void resize (uint_t xSize, uint_t ySize, uint_t zSize)
 Deletes all stored data, and resizes the field. More...
 
Field< T, fSize_ > * clone () const
 Returns a deep copy of the current field. More...
 
Field< T, fSize_ > * cloneUninitialized () const
 Creates a new field that has equal size and layout as this field. More...
 
Field< T, fSize_ > * cloneShallowCopy () const
 Returns a shallow copy of the current field. More...
 
FlattenedFieldflattenedShallowCopy () const
 Returns a flattened shallow copy of the current field. More...
 
Element Access
T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z)
 get function with only (x,y,z) coordinates, assumes fSize=1 More...
 
const T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z) const
 get function with only (x,y,z) coordinates, assumes fSize=1 More...
 
T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f)
 Non-Const variant of get() More...
 
const T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const
 Accesses the value at given coordinate. More...
 
T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f)
 get() variant which takes a uint_t as last coordinate, as for example Stencil::toIdx() returns More...
 
const T & get (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f) const
 get() variant which takes a uint_t as last coordinate, as for example Stencil::toIdx() returns More...
 
T & get (const Cell &cell)
 get overload using a cell as input, only possible if fSize=1 More...
 
const T & get (const Cell &cell) const
 get overload using a cell as input, only possible if fSize=1 More...
 
T & get (const Cell &c, cell_idx_t f)
 
const T & get (const Cell &c, cell_idx_t f) const
 
T & get (const Cell &c, uint_t f)
 
const T & get (const Cell &c, uint_t f) const
 
T & get (const base_iterator &iter)
 get overload, where position is specified using an iterator of another field with equal size More...
 
const T & get (const base_iterator &iter) const
 get overload, where position is specified using an iterator of another field with equal size More...
 
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) 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, 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() (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f) const
 
T & operator() (const Cell &cell)
 
const T & operator() (const Cell &cell) const
 
T & operator() (const Cell &cell, cell_idx_t f)
 
const T & operator() (const Cell &cell, cell_idx_t f) const
 
T & operator() (const Cell &cell, uint_t f)
 
const T & operator() (const Cell &cell, uint_t f) const
 
T & operator() (const base_iterator &iter)
 
const T & operator() (const base_iterator &iter) const
 
T & getNeighbor (cell_idx_t x, cell_idx_t y, cell_idx_t z, stencil::Direction d)
 returns neighboring value of cell in the given direction More...
 
const T & getNeighbor (cell_idx_t x, cell_idx_t y, cell_idx_t z, stencil::Direction d) const
 returns neighboring value of cell in the given direction More...
 
T & getNeighbor (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f, stencil::Direction d)
 returns neighboring value of cell in the given direction More...
 
const T & getNeighbor (cell_idx_t x, cell_idx_t y, cell_idx_t z, uint_t f, stencil::Direction d) const
 returns neighboring value of cell in the given direction More...
 
T & getNeighbor (const Cell &cell, stencil::Direction d)
 get overload using a cell as input, only possible if fSize=1, with neighbor access More...
 
const T & getNeighbor (const Cell &cell, stencil::Direction d) const
 get overload using a cell as input, only possible if fSize=1, with neighbor access More...
 
T & getF (T *const xyz0, const cell_idx_t f)
 
const T & getF (const T *const xyz0, const cell_idx_t f) const
 
T & getF (T *const xyz0, const uint_t f)
 
const T & getF (const T *const xyz0, const uint_t f) const
 
void set (const T &value)
 Sets all entries of the field to given value. More...
 
void set (const std::vector< T > &fValues)
 Initializes the f coordinate to values from vector Sets the entry (x,y,z,f) to fValues[f]. More...
 
void set (const Field< T, fSize_ > &other)
 Copies all entries of the given field to this field. More...
 
void set (const Field< T, fSize_ > *other)
 
void swapDataPointers (Field< T, fSize_ > &other)
 Swap two fields efficiently by exchanging only values_ pointer The two fields have to have identical sizes and same layout. More...
 
void swapDataPointers (Field< T, fSize_ > *other)
 
Equality Checks
bool operator== (const Field< T, fSize_ > &other) const
 Equality operator compares element-wise. More...
 
bool operator!= (const Field< T, fSize_ > &other) const
 Inequality operator compares element-wise. More...
 
bool hasSameAllocSize (const Field< T, fSize_ > &other) const
 True if allocation sizes of all dimensions match. More...
 
bool hasSameSize (const Field< T, fSize_ > &other) const
 True if sizes of all dimensions match. More...
 
Iterators
iterator begin ()
 Returns iterator, which can iterate over complete field in a suitable order depending on layout. More...
 
const_iterator begin () const
 
iterator beginXYZ ()
 Iterates only over XYZ coordinate, f is always 0. More...
 
const_iterator beginXYZ () 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)
 Returns iterator which iterates over a sub-block of the field. More...
 
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 variant of beginSlice() More...
 
iterator beginSliceXYZ (const CellInterval &interval, cell_idx_t f=0)
 Returns iterator which iterates over a slice, but only in x,y,z coordinates. More...
 
const_iterator beginSliceXYZ (const CellInterval &interval, cell_idx_t f=0) const
 Const variant of beginSliceXYZ() More...
 
const iteratorend ()
 
const const_iteratorend () const
 
Reverse Iterators
reverse_iterator rbegin ()
 Returns reverse iterator, which can iterate over complete field in a suitable order depending on layout. More...
 
const_reverse_iterator rbegin () const
 
reverse_iterator rbeginXYZ ()
 Iterates only over XYZ coordinate, f is always 0. More...
 
const_reverse_iterator rbeginXYZ () const
 
const reverse_iteratorrend ()
 
const const_reverse_iteratorrend () const
 
Size and Layout Information
uint_t xSize () const
 
uint_t ySize () const
 
uint_t zSize () const
 
uint_t fSize () const
 
uint_t size (uint_t coord) 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
 
Layout layout () const
 
int64_t xStride () const
 
int64_t yStride () const
 
int64_t zStride () const
 
int64_t fStride () const
 
cell_idx_t xOff () const
 
cell_idx_t yOff () const
 
cell_idx_t zOff () const
 
bool coordinatesValid (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const
 
Slicing
Field< T, fSize_ > * getSlicedField (const CellInterval &interval) const
 Create a different "view" of the field, where the created field has the size of the given sliceInterval. More...
 
virtual void slice (const CellInterval &interval)
 Changes the coordinate system of the field. More...
 
virtual void shiftCoordinates (cell_idx_t cx, cell_idx_t cy, cell_idx_t cz)
 
Pointer to internal memory - use with care!


T * data ()
 
const T * data () const
 
T * dataAt (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f)
 
const T * dataAt (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const
 
T * dataInner ()
 
const T * dataInner () const
 
shared_ptr< FieldAllocator< T > > getAllocator () const
 Returns internal data allocator. More...
 

Protected Member Functions

Shallow Copy
 Field (const Field &other)
 Private copy constructor that creates a shallow copy i.e. More...
 
template<typename T2 , uint_t fSize2>
 Field (const Field< T2, fSize2 > &other)
 Private copy constructor that creates a flattened shallow copy i.e. More...
 
virtual uint_t referenceCount () const
 Returns the number of objects that internally use the same data. More...
 
virtual Field< T, fSize_ > * cloneShallowCopyInternal () const
 Does the same as cloneShallowCopy (but is virtual) More...
 
virtual FlattenedFieldflattenedShallowCopyInternal () const
 Does the same as flattenedShallowCopy (but is virtual) More...
 

Type Definitions

using value_type = T
 
using iterator = ForwardFieldIterator< T, fSize_ >
 
using const_iterator = ForwardFieldIterator< const T, fSize_ >
 
using reverse_iterator = ReverseFieldIterator< T, fSize_ >
 
using const_reverse_iterator = ReverseFieldIterator< const T, fSize_ >
 
using base_iterator = FieldIterator< T, fSize_ >
 
using const_base_iterator = FieldIterator< const T, fSize_ >
 
using Ptr = FieldPointer< Field< T, fSize_ >, Field< T, fSize_ >, T >
 
using ConstPtr = FieldPointer< Field< T, fSize_ >, const Field< T, fSize_ >, const T >
 
using FlattenedField = typename std::conditional< VectorTrait< T >::F_SIZE !=0, Field< typename VectorTrait< T >::OutputType, VectorTrait< T >::F_SIZE *fSize_ >, Field< T, fSize_ > >::type
 
static const uint_t F_SIZE = fSize_
 

Monitoring

using MonitorFunction = std::function< void(cell_idx_t, cell_idx_t, cell_idx_t, cell_idx_t, const T &)>
 
void addMonitoringFunction (const MonitorFunction &func)
 Registers a monitoring function. More...
 

Static cached end iterators

static const const_iterator staticConstEnd = ForwardFieldIterator<const T,fSize_>()
 Const end iterator, see end() More...
 
static const iterator staticEnd = ForwardFieldIterator<T,fSize_>()
 End iterator, can be used with begin() and beginBlock() More...
 
static const const_reverse_iterator staticConstREnd = ReverseFieldIterator<const T,fSize_>()
 Const end iterator, see end() More...
 
static const reverse_iterator staticREnd = ReverseFieldIterator<T,fSize_>()
 End iterator, can be used with begin() and beginBlock() More...
 
 Field ()
 Creates an uninitialized field of size zero (no allocated memory) More...
 

Changing Offsets

T * values_
 Linearized, 1-dimensional representation of the 4D data grid. More...
 
T * valuesWithOffset_
 set by setOffsets(), to allow derived classes to change the offset More...
 
cell_idx_t xOff_
 Offset of the xSize() to xAllocSize() More...
 
cell_idx_t yOff_
 Offset of the ySize() to yAllocSize() More...
 
cell_idx_t zOff_
 Offset of the zSize() to zAllocSize() More...
 
uint_t xSize_
 Number of cells in x-dimension (excluding padded cells) More...
 
uint_t ySize_
 Number of cells in y-dimension (excluding padded cells) More...
 
uint_t zSize_
 Number of cells in z-dimension (excluding padded cells) More...
 
uint_t xAllocSize_
 Number of cells in x-dimension (including padded cells) More...
 
uint_t yAllocSize_
 Number of cells in y-dimension (including padded cells) More...
 
uint_t zAllocSize_
 Number of cells in z-dimension (including padded cells) More...
 
uint_t fAllocSize_
 Number of cells in f-dimension (including padded cells) More...
 
Layout layout_
 Determines in which order the values are stored. More...
 
uint_t allocSize_
 The overall size of the T* (padding included) More...
 
int64_t ffact_
 Access multiplication factor for the f-dimension. More...
 
int64_t xfact_
 Access multiplication factor for the x-dimension. More...
 
int64_t yfact_
 Access multiplication factor for the y-dimension. More...
 
int64_t zfact_
 Access multiplication factor for the z-dimension. More...
 
shared_ptr< FieldAllocator< T > > allocator_
 Allocator for the field. More...
 
class FieldIterator< T, fSize_ >
 
class FieldIterator< const T, fSize_ >
 
template<typename T2 , uint_t fSize2>
class Field
 
void setOffsets (uint_t xOffset, uint_t xSize, uint_t yOffset, uint_t ySize, uint_t zOffset, uint_t zSizes)
 Moves the coordinate system of the field. More...
 
shared_ptr< FieldAllocator< T > > allocator () const
 
bool addressInsideAllocedSpace (const T *const value) const
 
void assertValidCoordinates (cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const
 
Fieldoperator= (const Field &)
 

Member Typedef Documentation

◆ base_iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::base_iterator = FieldIterator<T, fSize_>

◆ const_base_iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::const_base_iterator = FieldIterator<const T, fSize_>

◆ const_iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::const_iterator = ForwardFieldIterator<const T, fSize_>

◆ const_reverse_iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::const_reverse_iterator = ReverseFieldIterator<const T, fSize_>

◆ ConstPtr

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::ConstPtr = FieldPointer<Field<T, fSize_>, const Field<T, fSize_>, const T>

◆ FlattenedField

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::FlattenedField = typename std::conditional<VectorTrait<T>::F_SIZE != 0, Field<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE * fSize_>, Field<T, fSize_> >::type

◆ iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::iterator = ForwardFieldIterator<T, fSize_>

◆ MonitorFunction

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::MonitorFunction = std::function<void (cell_idx_t, cell_idx_t, cell_idx_t, cell_idx_t, const T &)>

◆ Ptr

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::Ptr = FieldPointer<Field<T, fSize_>, Field<T, fSize_>, T>

◆ reverse_iterator

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::reverse_iterator = ReverseFieldIterator<T, fSize_>

◆ value_type

template<typename T , uint_t fSize_>
using walberla::field::Field< T, fSize_ >::value_type = T

Constructor & Destructor Documentation

◆ Field() [1/6]

template<typename T , uint_t fSize_>
walberla::field::Field< T, fSize_ >::Field ( uint_t  _xSize,
uint_t  _ySize,
uint_t  _zSize,
const Layout l = fzyx,
const shared_ptr< FieldAllocator< T > > &  alloc = shared_ptr<FieldAllocator<T> >() 
)

Creates an uninitialized field of given size.

Parameters
_xSizesize of x dimension
_ySizesize of y dimension
_zSizesize of z dimension
lmemory layout of the field (see Field::Layout)
allocclass that describes how to allocate memory for the field, see FieldAllocator

◆ Field() [2/6]

template<typename T , uint_t fSize_>
walberla::field::Field< T, fSize_ >::Field ( uint_t  _xSize,
uint_t  _ySize,
uint_t  _zSize,
const T &  initVal,
const Layout l = fzyx,
const shared_ptr< FieldAllocator< T > > &  alloc = shared_ptr<FieldAllocator<T> >() 
)

Creates a field and initializes it with constant.

Parameters
_xSizesize of x dimension
_ySizesize of y dimension
_zSizesize of z dimension
initValevery element of the field is set to initVal
lmemory layout of the field (see Field::Layout)
allocclass that describes how to allocate memory for the field, see FieldAllocator

◆ Field() [3/6]

template<typename T , uint_t fSize_>
walberla::field::Field< T, fSize_ >::Field ( uint_t  _xSize,
uint_t  _ySize,
uint_t  _zSize,
const std::vector< T > &  fValues,
const Layout l = fzyx,
const shared_ptr< FieldAllocator< T > > &  alloc = shared_ptr<FieldAllocator<T> >() 
)

Creates a field and initializes f coordinate with vector values.

Parameters
_xSizesize of x dimension
_ySizesize of y dimension
_zSizesize of z dimension
fValuesinitializes f coordinate with values from vector (see set(std::vector&) )
lmemory layout of the field (see Field::Layout)
allocclass that describes how to allocate memory for the field, see FieldAllocator

◆ ~Field()

template<typename T , uint_t fSize>
walberla::field::Field< T, fSize >::~Field
virtual

Destructor, using Allocator template parameter.

◆ Field() [4/6]

template<typename T , uint_t fSize_>
walberla::field::Field< T, fSize_ >::Field
protected

Creates an uninitialized field of size zero (no allocated memory)

This field has to be initialized before it can be used using the init() method

◆ Field() [5/6]

template<typename T , uint_t fSize_>
walberla::field::Field< T, fSize_ >::Field ( const Field< T, fSize_ > &  other)
protected

Private copy constructor that creates a shallow copy i.e.

reuses the memory of the copied field

◆ Field() [6/6]

template<typename T , uint_t fSize_>
template<typename T2 , uint_t fSize2>
walberla::field::Field< T, fSize_ >::Field ( const Field< T2, fSize2 > &  other)
protected

Private copy constructor that creates a flattened shallow copy i.e.

reuses the memory of the copied field

Member Function Documentation

◆ addMonitoringFunction()

template<typename T , uint_t fSize>
void walberla::field::Field< T, fSize >::addMonitoringFunction ( const MonitorFunction func)

Registers a monitoring function.

Monitoring works only if compiled with WALBERLA_FIELD_MONITORED_ACCESS. When a field is accessed either by get() or operator() the monitoring function is called

◆ addressInsideAllocedSpace()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::addressInsideAllocedSpace ( const T *const  value) const
inlineprotected

◆ allocator()

template<typename T , uint_t fSize_>
shared_ptr<FieldAllocator<T> > walberla::field::Field< T, fSize_ >::allocator ( ) const
inlineprotected

◆ allocSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::allocSize ( ) const
inline

◆ assertValidCoordinates()

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::assertValidCoordinates ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
) const
protected

◆ begin() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_iterator walberla::field::Field< T, fSize_ >::begin
inline

Returns iterator, which can iterate over complete field in a suitable order depending on layout.

Returns const_iterator, see begin()

Use this when iterating over a complete field, faster than 4 nested loops and operator() calls in the innermost loop because no index calculations have to be done.

◆ begin() [2/2]

template<typename T , uint_t fSize_>
const_iterator walberla::field::Field< T, fSize_ >::begin ( ) const

◆ beginSlice() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::iterator walberla::field::Field< T, fSize_ >::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 
)
inline

Returns iterator which iterates over a sub-block of the field.

  • Iterator over block defined by ( xBeg <= x < xEnd, yBeg <= y < yEnd, ....)
  • layout aware

◆ beginSlice() [2/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_iterator walberla::field::Field< T, fSize_ >::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
inline

Const variant of beginSlice()

◆ beginSliceXYZ() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::iterator walberla::field::Field< T, fSize_ >::beginSliceXYZ ( const CellInterval ci,
cell_idx_t  f = 0 
)
inline

Returns iterator which iterates over a slice, but only in x,y,z coordinates.

Parameters
ffixed value of f coordinate, where iterator points to in each cell

◆ beginSliceXYZ() [2/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_iterator walberla::field::Field< T, fSize_ >::beginSliceXYZ ( const CellInterval ci,
cell_idx_t  f = 0 
) const
inline

Const variant of beginSliceXYZ()

◆ beginXYZ() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_iterator walberla::field::Field< T, fSize_ >::beginXYZ
inline

Iterates only over XYZ coordinate, f is always 0.

Const version of beginXYZ()

◆ beginXYZ() [2/2]

template<typename T , uint_t fSize_>
const_iterator walberla::field::Field< T, fSize_ >::beginXYZ ( ) const

◆ clone()

template<typename T , uint_t fSize_>
Field< T, fSize_ > * walberla::field::Field< T, fSize_ >::clone

Returns a deep copy of the current field.

The data is copied over.

Returns
a new field, that has to be freed by caller

◆ cloneShallowCopy()

template<typename T , uint_t fSize_>
Field< T, fSize_ > * walberla::field::Field< T, fSize_ >::cloneShallowCopy

Returns a shallow copy of the current field.

Shallow copy means, that the new field internally uses the same memory as this field.

Returns
a new field, that has to be freed by caller

◆ cloneShallowCopyInternal()

◆ cloneUninitialized()

template<typename T , uint_t fSize_>
Field< T, fSize_ > * walberla::field::Field< T, fSize_ >::cloneUninitialized

Creates a new field that has equal size and layout as this field.

The memory of the new field is uninitialized.

Returns
a new field, that has to be freed by caller

◆ coordinatesValid()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::coordinatesValid ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
) const

◆ data() [1/2]

template<typename T , uint_t fSize_>
T* walberla::field::Field< T, fSize_ >::data ( )
inline

◆ data() [2/2]

template<typename T , uint_t fSize_>
const T* walberla::field::Field< T, fSize_ >::data ( ) const
inline

◆ dataAt() [1/2]

template<typename T , uint_t fSize_>
T* walberla::field::Field< T, fSize_ >::dataAt ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
)
inline

◆ dataAt() [2/2]

template<typename T , uint_t fSize_>
const T* walberla::field::Field< T, fSize_ >::dataAt ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
) const
inline

◆ dataInner() [1/2]

template<typename T , uint_t fSize_>
T* walberla::field::Field< T, fSize_ >::dataInner ( )
inline

◆ dataInner() [2/2]

template<typename T , uint_t fSize_>
const T* walberla::field::Field< T, fSize_ >::dataInner ( ) const
inline

◆ end() [1/2]

template<typename T , uint_t fSize_>
const Field< T, fSize_ >::const_iterator & walberla::field::Field< T, fSize_ >::end
inline

◆ end() [2/2]

template<typename T , uint_t fSize_>
const const_iterator& walberla::field::Field< T, fSize_ >::end ( ) const
inline

◆ fAllocSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::fAllocSize ( ) const
inline

◆ flattenedShallowCopy()

template<typename T , uint_t fSize_>
Field< T, fSize_ >::FlattenedField * walberla::field::Field< T, fSize_ >::flattenedShallowCopy

Returns a flattened shallow copy of the current field.

Shallow copy means, that the new field internally uses the same memory as this field. Flattened means that any VectorTrait-compatible containers are absorbed into the fSize.

Returns
a new field, that has to be freed by caller

◆ flattenedShallowCopyInternal()

template<typename T , uint_t fSize_>
Field< T, fSize_ >::FlattenedField * walberla::field::Field< T, fSize_ >::flattenedShallowCopyInternal
protectedvirtual

◆ fSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::fSize ( ) const
inline

◆ fStride()

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::fStride ( ) const
inline

◆ get() [1/14]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z 
)
inline

get function with only (x,y,z) coordinates, assumes fSize=1

◆ get() [2/14]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z 
) const
inline

get function with only (x,y,z) coordinates, assumes fSize=1

◆ get() [3/14]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
)
inline

Non-Const variant of get()

◆ get() [4/14]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
) const
inline

Accesses the value at given coordinate.

When WALBERLA_FIELD_MONITORED_ACCESS is defined, all registered monitor functions are executed when get is called

Note
operator() is equivalent to this function

◆ get() [5/14]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f 
)
inline

get() variant which takes a uint_t as last coordinate, as for example Stencil::toIdx() returns

◆ get() [6/14]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::get ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f 
) const
inline

get() variant which takes a uint_t as last coordinate, as for example Stencil::toIdx() returns

◆ get() [7/14]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::get ( const base_iterator iter)
inline

get overload, where position is specified using an iterator of another field with equal size

Do not use this for iterator that belong to this field, here *iterator is more convenient

Parameters
iterIterator that belongs to another field that has equal size

◆ get() [8/14]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::get ( const base_iterator iter) const
inline

get overload, where position is specified using an iterator of another field with equal size

◆ get() [9/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::get ( const Cell c,
cell_idx_t  f 
)
inline

◆ get() [10/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::get ( const Cell c,
cell_idx_t  f 
) const
inline

◆ get() [11/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::get ( const Cell c,
uint_t  f 
)
inline

◆ get() [12/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::get ( const Cell c,
uint_t  f 
) const
inline

◆ get() [13/14]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::get ( const Cell cell)
inline

get overload using a cell as input, only possible if fSize=1

◆ get() [14/14]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::get ( const Cell cell) const
inline

get overload using a cell as input, only possible if fSize=1

◆ getAllocator()

template<typename T , uint_t fSize_>
shared_ptr< FieldAllocator< T > > walberla::field::Field< T, fSize_ >::getAllocator

Returns internal data allocator.

The allocator can for example be used to prevent free() on the field data when class is deleted. This is useful if you keep a pointer to the internal data, to make sure it remains valid ( also after possible swapDataPointers() etc. )

field->getAllocator()->incrementReferenceCount( field->data() ); Use the data pointer field->getAllocator()->decrementReferenceCount( field->data() );

◆ getF() [1/4]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::getF ( const T *const  xyz0,
const cell_idx_t  f 
) const
inline

◆ getF() [2/4]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::getF ( const T *const  xyz0,
const uint_t  f 
) const
inline

◆ getF() [3/4]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::getF ( T *const  xyz0,
const cell_idx_t  f 
)
inline

◆ getF() [4/4]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::getF ( T *const  xyz0,
const uint_t  f 
)
inline

◆ getNeighbor() [1/6]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::getNeighbor ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
stencil::Direction  d 
)
inline

returns neighboring value of cell in the given direction

◆ getNeighbor() [2/6]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::getNeighbor ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
stencil::Direction  d 
) const
inline

returns neighboring value of cell in the given direction

◆ getNeighbor() [3/6]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::getNeighbor ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f,
stencil::Direction  d 
)
inline

returns neighboring value of cell in the given direction

◆ getNeighbor() [4/6]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::getNeighbor ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f,
stencil::Direction  d 
) const
inline

returns neighboring value of cell in the given direction

◆ getNeighbor() [5/6]

template<typename T , uint_t fSize_>
T & walberla::field::Field< T, fSize_ >::getNeighbor ( const Cell cell,
stencil::Direction  d 
)
inline

get overload using a cell as input, only possible if fSize=1, with neighbor access

◆ getNeighbor() [6/6]

template<typename T , uint_t fSize_>
const T & walberla::field::Field< T, fSize_ >::getNeighbor ( const Cell cell,
stencil::Direction  d 
) const
inline

get overload using a cell as input, only possible if fSize=1, with neighbor access

◆ getSlicedField()

template<typename T , uint_t fSize_>
Field< T, fSize_ > * walberla::field::Field< T, fSize_ >::getSlicedField ( const CellInterval interval) const

Create a different "view" of the field, where the created field has the size of the given sliceInterval.

The ownership of the returned pointer is transfered to the caller i.e. the caller is responsible for deleting the returned object.

The returned field uses the same data as the original field. However the returned field has a different coordinate system defined by the given slice-interval. Modifying the returned slice field modifies also the original field! The sliced field has the size as given by the slice-interval.

◆ hasSameAllocSize()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::hasSameAllocSize ( const Field< T, fSize_ > &  other) const
inline

True if allocation sizes of all dimensions match.

◆ hasSameSize()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::hasSameSize ( const Field< T, fSize_ > &  other) const
inline

True if sizes of all dimensions match.

◆ init()

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::init ( uint_t  _xSize,
uint_t  _ySize,
uint_t  _zSize,
const Layout l = fzyx,
shared_ptr< FieldAllocator< T > >  alloc = shared_ptr<FieldAllocator<T> >(),
uint_t  innerGhostLayerSizeForAlignedAlloc = 0 
)

Initializes the field with a given size, in a given layout.

Must be called exactly once! This is automatically called by all constructors that take at least one argument

Parameters
_xSizesize of x dimension
_ySizesize of y dimension
_zSizesize of z dimension
lmemory layout of the field (see Field::Layout)
allocthe allocator to use. If a NULL shared pointer is given, a sensible default is selected, depending on layout
innerGhostLayerSizeForAlignedAllocThis parameter should be set to zero for field that have no ghost layers. This parameter is passed to the allocator and can there be used to ensure alignment of the first INNER cell in each line

◆ layout()

template<typename T , uint_t fSize_>
Layout walberla::field::Field< T, fSize_ >::layout ( ) const
inline

◆ operator!=()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::operator!= ( const Field< T, fSize_ > &  other) const
inline

Inequality operator compares element-wise.

◆ operator()() [1/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z 
)
inline

◆ operator()() [2/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z 
) const
inline

◆ operator()() [3/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
)
inline

◆ operator()() [4/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
cell_idx_t  f 
) const
inline

◆ operator()() [5/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f 
)
inline

◆ operator()() [6/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( cell_idx_t  x,
cell_idx_t  y,
cell_idx_t  z,
uint_t  f 
) const
inline

◆ operator()() [7/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( const base_iterator iter)
inline

◆ operator()() [8/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( const base_iterator iter) const
inline

◆ operator()() [9/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell)
inline

◆ operator()() [10/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell) const
inline

◆ operator()() [11/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell,
cell_idx_t  f 
)
inline

◆ operator()() [12/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell,
cell_idx_t  f 
) const
inline

◆ operator()() [13/14]

template<typename T , uint_t fSize_>
T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell,
uint_t  f 
)
inline

◆ operator()() [14/14]

template<typename T , uint_t fSize_>
const T& walberla::field::Field< T, fSize_ >::operator() ( const Cell cell,
uint_t  f 
) const
inline

◆ operator=()

template<typename T , uint_t fSize_>
Field& walberla::field::Field< T, fSize_ >::operator= ( const Field< T, fSize_ > &  )
private

◆ operator==()

template<typename T , uint_t fSize_>
bool walberla::field::Field< T, fSize_ >::operator== ( const Field< T, fSize_ > &  other) const
inline

Equality operator compares element-wise.

◆ rbegin() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_reverse_iterator walberla::field::Field< T, fSize_ >::rbegin
inline

Returns reverse iterator, which can iterate over complete field in a suitable order depending on layout.

Returns const_reverse_iterator, see begin()

◆ rbegin() [2/2]

template<typename T , uint_t fSize_>
const_reverse_iterator walberla::field::Field< T, fSize_ >::rbegin ( ) const

◆ rbeginXYZ() [1/2]

template<typename T , uint_t fSize_>
Field< T, fSize_ >::const_reverse_iterator walberla::field::Field< T, fSize_ >::rbeginXYZ
inline

Iterates only over XYZ coordinate, f is always 0.

Const version of beginXYZ()

◆ rbeginXYZ() [2/2]

template<typename T , uint_t fSize_>
const_reverse_iterator walberla::field::Field< T, fSize_ >::rbeginXYZ ( ) const

◆ referenceCount()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::referenceCount
protectedvirtual

Returns the number of objects that internally use the same data.

◆ rend() [1/2]

template<typename T , uint_t fSize_>
const Field< T, fSize_ >::const_reverse_iterator & walberla::field::Field< T, fSize_ >::rend
inline

◆ rend() [2/2]

template<typename T , uint_t fSize_>
const const_reverse_iterator& walberla::field::Field< T, fSize_ >::rend ( ) const
inline

◆ resize()

◆ set() [1/4]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::set ( const Field< T, fSize_ > &  other)
inline

Copies all entries of the given field to this field.

Only works when xSize(), ySize(), zSize() and allocSize() are equal Copies complete allocated region as specified by allocSize()

◆ set() [2/4]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::set ( const Field< T, fSize_ > *  other)
inline

◆ set() [3/4]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::set ( const std::vector< T > &  fValues)

Initializes the f coordinate to values from vector Sets the entry (x,y,z,f) to fValues[f].

Works only in the regions specified by size(), not in the complete allocated region as specified by allocSize()

◆ set() [4/4]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::set ( const T &  value)

Sets all entries of the field to given value.

Works only in the regions specified by size(), not in the complete allocated region as specified by allocSize()

◆ setOffsets()

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::setOffsets ( uint_t  xOffset,
uint_t  xs,
uint_t  yOffset,
uint_t  ys,
uint_t  zOffset,
uint_t  zs 
)
protected

Moves the coordinate system of the field.

Can be used by derived classes, to use only a subset of the field. The complete field remains accessible, but now has coordinates smaller than 0 or bigger than [xyzf]Size() This is used for example in the constructor of the GhostLayerField

Internally this is implementing by adding an offset to the values_ pointer, and by adapting the size_ members.

Parameters
xOffsetThe x coordinate that is afterwards mapped to zero
xsThe new size of the x coordinate. Has to be smaller than (old xSize())-xOffset
yOffsetThe y coordinate that is afterwards mapped to zero
ysThe new size of the y coordinate. Has to be smaller than (old ySize())-yOffset
zOffsetThe z coordinate that is afterwards mapped to zero
zsThe new size of the z coordinate. Has to be smaller than (old zSize())-zOffset

◆ shiftCoordinates()

◆ size()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::size ( uint_t  coord) const
inline

◆ slice()

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::slice ( const CellInterval interval)
virtual

Changes the coordinate system of the field.

The origin of the new coordinates is at the cell given by min() of the CellInterval. The new size of the field, is the size of the the CellInterval, however the alloc size does not change. Cells that are not in this cell interval can still be accessed ( by coordinates smaller 0, or bigger than [xyz]Size)

Reimplemented in walberla::field::GhostLayerField< T, fSize_ >, walberla::field::GhostLayerField< double, 27 >, walberla::field::GhostLayerField< real_t, LatticeModel_T::Stencil::Size >, walberla::field::GhostLayerField< double, 19 >, walberla::field::GhostLayerField< real_t, LatticeStorageSpecification_T::Stencil::Size >, walberla::field::GhostLayerField< T, 1 >, walberla::field::GhostLayerField< uint32_t, 1 >, walberla::field::GhostLayerField< Flag_T, 1 >, and walberla::field::GhostLayerField< flag_t, 1 >.

◆ swapDataPointers() [1/2]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::swapDataPointers ( Field< T, fSize_ > &  other)
inline

Swap two fields efficiently by exchanging only values_ pointer The two fields have to have identical sizes and same layout.

◆ swapDataPointers() [2/2]

template<typename T , uint_t fSize_>
void walberla::field::Field< T, fSize_ >::swapDataPointers ( Field< T, fSize_ > *  other)
inline

◆ xAllocSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::xAllocSize ( ) const
inline

◆ xOff()

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::xOff ( ) const
inline

◆ xSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::xSize ( ) const
inline

◆ xStride()

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::xStride ( ) const
inline

◆ xyzAllocSize()

template<typename T , uint_t fSize_>
CellInterval walberla::field::Field< T, fSize_ >::xyzAllocSize
inline

◆ xyzSize()

template<typename T , uint_t fSize_>
CellInterval walberla::field::Field< T, fSize_ >::xyzSize
inline

◆ yAllocSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::yAllocSize ( ) const
inline

◆ yOff()

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::yOff ( ) const
inline

◆ ySize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::ySize ( ) const
inline

◆ yStride()

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::yStride ( ) const
inline

◆ zAllocSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::zAllocSize ( ) const
inline

◆ zOff()

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::zOff ( ) const
inline

◆ zSize()

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::zSize ( ) const
inline

◆ zStride()

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::zStride ( ) const
inline

Friends And Related Function Documentation

◆ Field

template<typename T , uint_t fSize_>
template<typename T2 , uint_t fSize2>
friend class Field
friend

◆ FieldIterator< const T, fSize_ >

template<typename T , uint_t fSize_>
friend class FieldIterator< const T, fSize_ >
friend

◆ FieldIterator< T, fSize_ >

template<typename T , uint_t fSize_>
friend class FieldIterator< T, fSize_ >
friend

Member Data Documentation

◆ allocator_

template<typename T , uint_t fSize_>
shared_ptr<FieldAllocator<T> > walberla::field::Field< T, fSize_ >::allocator_
private

Allocator for the field.

◆ allocSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::allocSize_
private

The overall size of the T* (padding included)

◆ F_SIZE

template<typename T , uint_t fSize_>
const uint_t walberla::field::Field< T, fSize_ >::F_SIZE = fSize_
static

◆ fAllocSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::fAllocSize_
private

Number of cells in f-dimension (including padded cells)

◆ ffact_

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::ffact_
private

Access multiplication factor for the f-dimension.

◆ layout_

template<typename T , uint_t fSize_>
Layout walberla::field::Field< T, fSize_ >::layout_
private

Determines in which order the values are stored.

◆ staticConstEnd

template<typename T , uint_t fSize_>
const ForwardFieldIterator< const T, fSize_ > walberla::field::Field< T, fSize_ >::staticConstEnd = ForwardFieldIterator<const T,fSize_>()
static

Const end iterator, see end()

◆ staticConstREnd

template<typename T , uint_t fSize_>
const ReverseFieldIterator< const T, fSize_ > walberla::field::Field< T, fSize_ >::staticConstREnd = ReverseFieldIterator<const T,fSize_>()
static

Const end iterator, see end()

◆ staticEnd

template<typename T , uint_t fSize_>
const ForwardFieldIterator< T, fSize_ > walberla::field::Field< T, fSize_ >::staticEnd = ForwardFieldIterator<T,fSize_>()
static

End iterator, can be used with begin() and beginBlock()

◆ staticREnd

template<typename T , uint_t fSize_>
const ReverseFieldIterator< T, fSize_ > walberla::field::Field< T, fSize_ >::staticREnd = ReverseFieldIterator<T,fSize_>()
static

End iterator, can be used with begin() and beginBlock()

◆ values_

template<typename T , uint_t fSize_>
T* walberla::field::Field< T, fSize_ >::values_
private

Linearized, 1-dimensional representation of the 4D data grid.

◆ valuesWithOffset_

template<typename T , uint_t fSize_>
T* walberla::field::Field< T, fSize_ >::valuesWithOffset_
private

set by setOffsets(), to allow derived classes to change the offset

◆ xAllocSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::xAllocSize_
private

Number of cells in x-dimension (including padded cells)

◆ xfact_

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::xfact_
private

Access multiplication factor for the x-dimension.

◆ xOff_

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::xOff_
private

Offset of the xSize() to xAllocSize()

◆ xSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::xSize_
private

Number of cells in x-dimension (excluding padded cells)

◆ yAllocSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::yAllocSize_
private

Number of cells in y-dimension (including padded cells)

◆ yfact_

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::yfact_
private

Access multiplication factor for the y-dimension.

◆ yOff_

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::yOff_
private

Offset of the ySize() to yAllocSize()

◆ ySize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::ySize_
private

Number of cells in y-dimension (excluding padded cells)

◆ zAllocSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::zAllocSize_
private

Number of cells in z-dimension (including padded cells)

◆ zfact_

template<typename T , uint_t fSize_>
int64_t walberla::field::Field< T, fSize_ >::zfact_
private

Access multiplication factor for the z-dimension.

◆ zOff_

template<typename T , uint_t fSize_>
cell_idx_t walberla::field::Field< T, fSize_ >::zOff_
private

Offset of the zSize() to zAllocSize()

◆ zSize_

template<typename T , uint_t fSize_>
uint_t walberla::field::Field< T, fSize_ >::zSize_
private

Number of cells in z-dimension (excluding padded cells)


The documentation for this class was generated from the following files: