walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T > Class Template Reference

Detailed Description

template<typename Field_T>
class walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >

Initializes a scalar field using a CellInterval.

Example:

     <InitializerId> {
        CellInterval [ (3,1,5) ... (4,5,8) ];
        id           0;    // If given a vector of scalar fields, which one of them to operate on.
                           // Should be zero (the default value) if given a scalar field directly.
        value        3.14; // value to set on each cell in the interval
     }

or

     <InitializerId> {
        min < 3,1,5>;
        max < 4,5,8>;
        id           0;
        value        3.14;
     }

#include <ScalarFieldFromCellInterval.h>

+ Inheritance diagram for walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >:

Public Types

typedef Field_T::value_type Value_T
 

Public Member Functions

 ScalarFieldFromCellInterval (StructuredBlockStorage &blocks, BlockDataID fieldId)
 
 ScalarFieldFromCellInterval (StructuredBlockStorage &blocks, std::vector< BlockDataID > fieldId)
 
virtual void init (BlockStorage &blockStorage, const Config::BlockHandle &block)
 Initializes the scalar field using parameters of config block. More...
 
void init (const Config::BlockHandle &blockHandle)
 
void init (const CellInterval &interval, Value_T value, std::vector< BlockDataID >::size_type id=0)
 Function for manually setting a scalar field on a CellInterval. More...
 
void init (const CellInterval &interval, math::FunctionParser &parser, std::vector< BlockDataID >::size_type id=0)
 Function for manually setting a scalar field on a CellInterval. More...
 
- Public Member Functions inherited from walberla::geometry::initializer::Initializer
virtual ~Initializer ()=default
 

Protected Attributes

StructuredBlockStoragestructuredBlockStorage_
 
std::vector< BlockDataIDscalarFieldID_
 

Member Typedef Documentation

◆ Value_T

template<typename Field_T >
typedef Field_T::value_type walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::Value_T

Constructor & Destructor Documentation

◆ ScalarFieldFromCellInterval() [1/2]

template<typename Field_T >
walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::ScalarFieldFromCellInterval ( StructuredBlockStorage blocks,
BlockDataID  fieldId 
)
inline

◆ ScalarFieldFromCellInterval() [2/2]

template<typename Field_T >
walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::ScalarFieldFromCellInterval ( StructuredBlockStorage blocks,
std::vector< BlockDataID fieldId 
)

Member Function Documentation

◆ init() [1/4]

template<typename Field_T >
void walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::init ( BlockStorage blockStorage,
const Config::BlockHandle block 
)
virtual

Initializes the scalar field using parameters of config block.

Implements walberla::geometry::initializer::Initializer.

◆ init() [2/4]

template<typename Field_T >
void walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::init ( const CellInterval interval,
math::FunctionParser parser,
std::vector< BlockDataID >::size_type  id = 0 
)

Function for manually setting a scalar field on a CellInterval.

Parameters
intervalthe cell interval
parsera function parser which will have the variables x,y,z bound before it is evaluated
idwhich field to operate on (if operating on a vector of fields), defaults to 0

◆ init() [3/4]

template<typename Field_T >
void walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::init ( const CellInterval interval,
Value_T  value,
std::vector< BlockDataID >::size_type  id = 0 
)

Function for manually setting a scalar field on a CellInterval.

Parameters
intervalthe cell interval
valuewhich value to set in the field for all cells in the interval
idwhich field to operate on (if operating on a vector of fields), defaults to 0

◆ init() [4/4]

template<typename Field_T >
void walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::init ( const Config::BlockHandle blockHandle)

Member Data Documentation

◆ scalarFieldID_

template<typename Field_T >
std::vector<BlockDataID> walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::scalarFieldID_
protected

◆ structuredBlockStorage_

template<typename Field_T >
StructuredBlockStorage& walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::structuredBlockStorage_
protected

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