24#ifndef BLOCK_BASE_F_3D_HH
25#define BLOCK_BASE_F_3D_HH
34 :
GenericF<T,int>(targetDim,3), _blockStructure(blockStructure) { }
39 return _blockStructure;
42template <
typename T,
typename BaseType>
44 :
BlockF3D<T>(blockData, blockData.getSize()),
48template <
typename T,
typename BaseType>
50 :
BlockF3D<T>(f.getBlockStructure(), f.getTargetDim()),
52 _blockData(*_blockDataStorage)
55template <
typename T,
typename BaseType>
61 _blockData(*_blockDataStorage)
64template <
typename T,
typename BaseType>
70template <
typename T,
typename BaseType>
73 for (
int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
74 output[iDim] = _blockData.
get(input, iDim);
82 :
BlockF3D<T>(f.getBlockStructure(),f.getTargetDim() ), _f(f)
85 std::swap(
_f._ptrCalcC, this->_ptrCalcC );
91 return _f(output,input);
97 :
BlockF3D<T>(f.getBlockStructure(),1 ), _f(f), _extractDim(extractDim)
111 std::vector<T> outTmp(_f.getTargetDim(), T{});
112 _f(outTmp.data(), input);
113 output[0] = outTmp[_extractDim];
122 _indicatorF(indicatorF)
131 if (_indicatorF(input)) {
141 :
BlockF3D<T>(f.getBlockStructure(), f.getTargetDim()),
143 _indicatorF(indicatorF)
151 for (
int i = 0; i < this->getTargetDim(); ++i) {
154 if (_indicatorF(input)) {
161template <
typename T,
typename T2>
163 :
BlockF3D<T>(f.getBlockStructure(), f.getTargetDim()),
169template <
typename T,
typename T2>
172 T2 result[this->getTargetDim()];
174 for (
int i = 0; i < this->getTargetDim(); ++i) {
175 output[i] =
static_cast<T
>(result[i]);
181template <
typename T,
typename DESCRIPTOR>
184 :
BlockF3D<T>(blockStructure, targetDim), _blockLattice(blockStructure)
199template <
typename T,
typename DESCRIPTOR>
202 return _blockLattice;
206template <
typename T,
typename DESCRIPTOR>
213 std::swap(
_f._ptrCalcC, this->_ptrCalcC );
216template <
typename T,
typename DESCRIPTOR>
219 return _f(output,input);
223template <
typename T,
typename DESCRIPTOR>
226 :
BlockLatticeF3D<T,DESCRIPTOR>(blockLattice, targetDim), _converter(converter)
229template <
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
232 :
BlockLatticeF3D<T,TDESCRIPTOR>(blockLattice, targetDim), _converter(converter)
bool operator()(BaseType output[], const int input[]) override
access to _blockData via its get()
BlockData< 3, T, BaseType > & getBlockData()
returns _blockData
BlockDataF3D(int nx, int ny, int nz, 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,...
BlockF3D(BlockStructureD< 3 > &blockStructure, int targetDim)
virtual BlockStructureD< 3 > & getBlockStructure() const
BlockIdentity3D(BlockF3D< T > &f)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
Base block indicator functor.
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
BlockLattice< T, DESCRIPTOR > & getBlock()
Copy Constructor.
BlockLatticeF3D(BlockLattice< T, DESCRIPTOR > &blockLattice, int targetDim)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeF3D< T, DESCRIPTOR > & _f
BlockLatticeIdentity3D(BlockLatticeF3D< T, DESCRIPTOR > &f)
BlockLatticePhysF3D(BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
BlockLatticeThermalPhysF3D(BlockLattice< T, TDESCRIPTOR > &blockLattice, const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > &converter, int targetDim)
Platform-abstracted block lattice for external access and inter-block interaction.
BlockTypecastF3D(BlockF3D< T2 > &f)
bool operator()(T output[], const int input[])
has to be implemented for 'every' derived class
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