24#ifndef BLOCK_BASE_F_2D_HH
25#define BLOCK_BASE_F_2D_HH
34 :
GenericF<T,int>(targetDim,2), _blockStructure(&blockStructure) { }
39 :
GenericF<T,int>(targetDim,2), _blockStructure(nullptr) { }
44 return *_blockStructure;
51 _blockStructure = blockStructure;
54template <
typename T,
typename BaseType>
57 _blockData(&blockData),
61template <
typename T,
typename BaseType>
63 :
BlockF2D<T>(f.getBlockStructure(), f.getTargetDim()),
68template <
typename T,
typename BaseType>
77template <
typename T,
typename BaseType>
85template <
typename T,
typename BaseType>
91template <
typename T,
typename BaseType>
94 for (
int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
95 output[iDim] = _blockData->
get(input, iDim);
103 :
BlockF2D<T>(f.getBlockStructure(),f.getTargetDim() ), _f(f)
106 std::swap(
_f._ptrCalcC, this->_ptrCalcC );
112 return _f(output,input);
118 :
BlockF2D<T>(f.getBlockStructure(),1 ), _f(f), _extractDim(extractDim)
132 std::vector<T> outTmp(_f.getTargetDim(), T{});
133 _f(outTmp.data(), input);
134 output[0] = outTmp[_extractDim];
143 _indicatorF(indicatorF)
152 if (_indicatorF(input)) {
162 :
BlockF2D<T>(f.getBlockStructure(), f.getTargetDim()),
164 _indicatorF(indicatorF)
172 for (
int i = 0; i < this->getTargetDim(); ++i) {
175 if (_indicatorF(input)) {
182template <
typename T,
typename DESCRIPTOR>
185 :
BlockF2D<T>(blockStructure, targetDim), _blockLattice(blockStructure)
200template <
typename T,
typename DESCRIPTOR>
203 return _blockLattice;
207template <
typename T,
typename DESCRIPTOR>
214 std::swap(
_f._ptrCalcC, this->_ptrCalcC );
217template <
typename T,
typename DESCRIPTOR>
220 return _f(output,input);
224template <
typename T,
typename DESCRIPTOR>
227 :
BlockLatticeF2D<T,DESCRIPTOR>(blockLattice, targetDim), _converter(converter)
230template <
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
233 :
BlockLatticeF2D<T,TDESCRIPTOR>(blockLattice, targetDim), _converter(converter)
bool operator()(BaseType output[], const int input[]) override
access to _blockData via its get()
BlockData< 2, T, BaseType > & getBlockData()
returns _blockData
BlockDataF2D(int nx, int ny, int size=1)
U & get(std::size_t iCell, int iD=0)
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
virtual BlockStructureD< 2 > & getBlockStructure()
virtual destructor for defined behaviour
BlockF2D(BlockStructureD< 2 > &blockStructure, int targetDim)
void setBlockStructure(BlockStructureD< 2 > *blockStructure)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockIdentity2D(BlockF2D< T > &f)
Base block indicator functor (discrete)
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
BlockLattice< T, DESCRIPTOR > & getBlock()
Copy Constructor.
BlockLatticeF2D(BlockLattice< T, DESCRIPTOR > &blockLattice, int targetDim)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeF2D< T, DESCRIPTOR > & _f
BlockLatticeIdentity2D(BlockLatticeF2D< T, DESCRIPTOR > &f)
BlockLatticePhysF2D(BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
BlockLatticeThermalPhysF2D(BlockLattice< T, TDESCRIPTOR > &blockLattice, const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > &converter, int targetDim)
Platform-abstracted block lattice for external access and inter-block interaction.
GenericF is a base class, that can represent continuous as well as discrete functions.
std::string & getName()
read and write access to name
Conversion between physical and lattice units, as well as discretization specialized for thermal appl...
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.
typename util::BaseTypeHelper< T >::type BaseType