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>
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 | |
StructuredBlockStorage & | structuredBlockStorage_ |
std::vector< BlockDataID > | scalarFieldID_ |
typedef Field_T::value_type walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::Value_T |
|
inline |
walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::ScalarFieldFromCellInterval | ( | StructuredBlockStorage & | blocks, |
std::vector< BlockDataID > | fieldId | ||
) |
|
virtual |
Initializes the scalar field using parameters of config block.
Implements walberla::geometry::initializer::Initializer.
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.
interval | the cell interval |
parser | a function parser which will have the variables x,y,z bound before it is evaluated |
id | which field to operate on (if operating on a vector of fields), defaults to 0 |
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.
interval | the cell interval |
value | which value to set in the field for all cells in the interval |
id | which field to operate on (if operating on a vector of fields), defaults to 0 |
void walberla::geometry::initializer::ScalarFieldFromCellInterval< Field_T >::init | ( | const Config::BlockHandle & | blockHandle | ) |
|
protected |
|
protected |