walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG > Class Template Referenceabstract

Detailed Description

template<typename T, uint_t F_SIZE_ARG = 1u>
class walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >

Interface that is used by VTKOutput in order to write data to VTK files.

For a detailed documentation see the documentation of class vtk::internal::BlockCellDataWriter.

Classes deriving from BlockCellDataWriter must implement a protected member function "evaluate(x,y,z,f)" and "configure()" [pure virtual function inherited from vtk::internal::BlockCellDataWriter]. They can also implement a second evaluate function used during resampling (if this function is not implemented nearest neighbor interpolation will be used for resampling the data).

#include <BlockCellDataWriter.h>

+ Inheritance diagram for walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >:

Public Types

using value_type = T
 

Public Member Functions

 BlockCellDataWriter (const std::string &id)
 
 ~BlockCellDataWriter () override=default
 
void push (std::ostream &os, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
void push (vtk::Base64Writer &b64, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
void push (std::ostream &os, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f, const real_t localXCell, const real_t localYCell, const real_t localZCell, const real_t globalX, const real_t globalY, const real_t globalZ, const real_t samplingDx, const real_t samplingDy, const real_t samplingDz) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
void push (Base64Writer &b64, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f, const real_t localXCell, const real_t localYCell, const real_t localZCell, const real_t globalX, const real_t globalY, const real_t globalZ, const real_t samplingDx, const real_t samplingDy, const real_t samplingDz) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
uint_t fSize () const override
 must return the size of the fourth dimension More...
 
std::string typeString () const override
 Every data type is assigned a specific string in VTK. More...
 
- Public Member Functions inherited from walberla::vtk::internal::BlockCellDataWriter
 BlockCellDataWriter (const std::string &id)
 
void configure (const IBlock &block, const StructuredBlockStorage &sbs)
 
uint_t xSize () const
 
uint_t ySize () const
 
uint_t zSize () const
 
const std::string & identifier () const
 

Static Public Attributes

static const uint_t F_SIZE = F_SIZE_ARG
 

Protected Member Functions

virtual T evaluate (const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f)=0
 
virtual T evaluate (const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f, const real_t localXCell, const real_t localYCell, const real_t localZCell, const real_t globalX, const real_t globalY, const real_t globalZ, const real_t samplingDx, const real_t samplingDy, const real_t samplingDz)
 
- Protected Member Functions inherited from walberla::vtk::internal::BlockCellDataWriter
virtual void configure ()=0
 Every time "configure( const IBlock& block, const StructuredBlockStorage& sbs )" is called, the block and its corresponding structured block storage assigned to the BlockCellDataWriter may change. More...
 
void setIdentifier (const std::string &id)
 

Additional Inherited Members

- Protected Attributes inherited from walberla::vtk::internal::BlockCellDataWriter
const IBlockblock_
 
const StructuredBlockStorageblockStorage_
 
std::string identifier_
 

Member Typedef Documentation

◆ value_type

template<typename T , uint_t F_SIZE_ARG = 1u>
using walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::value_type = T

Constructor & Destructor Documentation

◆ BlockCellDataWriter()

template<typename T , uint_t F_SIZE_ARG = 1u>
walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::BlockCellDataWriter ( const std::string &  id)
inline

◆ ~BlockCellDataWriter()

template<typename T , uint_t F_SIZE_ARG = 1u>
walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::~BlockCellDataWriter ( )
overridevirtualdefault

Member Function Documentation

◆ evaluate() [1/2]

template<typename T , uint_t F_SIZE_ARG = 1u>
virtual T walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::evaluate ( const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f 
)
protectedpure virtual

◆ evaluate() [2/2]

template<typename T , uint_t F_SIZE_ARG>
T walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::evaluate ( const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f,
const real_t  localXCell,
const real_t  localYCell,
const real_t  localZCell,
const real_t  globalX,
const real_t  globalY,
const real_t  globalZ,
const real_t  samplingDx,
const real_t  samplingDy,
const real_t  samplingDz 
)
inlineprotectedvirtual

◆ fSize()

template<typename T , uint_t F_SIZE_ARG = 1u>
uint_t walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::fSize ( ) const
inlineoverridevirtual

must return the size of the fourth dimension

(data fields storing scalar values return "1", data fields storing vector data return the size of the vector)

Implements walberla::vtk::internal::BlockCellDataWriter.

◆ push() [1/4]

template<typename T , uint_t F_SIZE_ARG = 1u>
void walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::push ( Base64Writer b64,
const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f,
const real_t  localXCell,
const real_t  localYCell,
const real_t  localZCell,
const real_t  globalX,
const real_t  globalY,
const real_t  globalZ,
const real_t  samplingDx,
const real_t  samplingDy,
const real_t  samplingDz 
)
inlineoverridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Reimplemented from walberla::vtk::internal::BlockCellDataWriter.

◆ push() [2/4]

template<typename T , uint_t F_SIZE_ARG = 1u>
void walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::push ( std::ostream &  os,
const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f 
)
inlineoverridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Implements walberla::vtk::internal::BlockCellDataWriter.

◆ push() [3/4]

template<typename T , uint_t F_SIZE_ARG = 1u>
void walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::push ( std::ostream &  os,
const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f,
const real_t  localXCell,
const real_t  localYCell,
const real_t  localZCell,
const real_t  globalX,
const real_t  globalY,
const real_t  globalZ,
const real_t  samplingDx,
const real_t  samplingDy,
const real_t  samplingDz 
)
inlineoverridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Reimplemented from walberla::vtk::internal::BlockCellDataWriter.

◆ push() [4/4]

template<typename T , uint_t F_SIZE_ARG = 1u>
void walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::push ( vtk::Base64Writer b64,
const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const cell_idx_t  f 
)
inlineoverridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Implements walberla::vtk::internal::BlockCellDataWriter.

◆ typeString()

template<typename T , uint_t F_SIZE_ARG = 1u>
std::string walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::typeString ( ) const
inlineoverridevirtual

Every data type is assigned a specific string in VTK.

This string must be returned by this function, which should always be implemented by calling the utility function "vtk::typeToString()":

std::string typeString() const { return vtk::typeToString< [DataType] >(); }

Implements walberla::vtk::internal::BlockCellDataWriter.

Member Data Documentation

◆ F_SIZE

template<typename T , uint_t F_SIZE_ARG = 1u>
const uint_t walberla::vtk::BlockCellDataWriter< T, F_SIZE_ARG >::F_SIZE = F_SIZE_ARG
static

The documentation for this class was generated from the following file:
std::string typeString() const override
Every data type is assigned a specific string in VTK.
Definition: BlockCellDataWriter.h:258