24#ifndef BLOCK_BASE_F_3D_H
25#define BLOCK_BASE_F_3D_H
42template <
typename T>
class BlockIndicatorF3D;
46class BlockF3D :
public GenericF<T,int> {
48 BlockF3D(BlockStructureD<3>& blockStructure,
int targetDim);
64template <
typename T,
typename BaseType>
65class BlockDataF3D :
public BlockF3D<BaseType> {
90 bool operator() (T output[],
const int input[])
override;
102 bool operator() (T output[],
const int input[]);
113 bool operator() (T output[],
const int input[])
override;
125 bool operator() (T output[],
const int input[]);
130template <
typename T,
typename T2>
136 bool operator() (T output[],
const int input[]);
140template <
typename T,
typename DESCRIPTOR>
156template <
typename T,
typename DESCRIPTOR>
162 bool operator() (T output[],
const int input[])
override;
167template <
typename T,
typename DESCRIPTOR>
181template <
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
189template <
typename T,
typename W = T>
192 const std::vector<W>
_c;
205 template <
unsigned Size>
209 bool operator() (W output[],
const int input[])
override;
215template <
typename T,
typename DESCRIPTOR>
222 std::function<bool(T*,
const int*)> _f;
233 template <
typename F>
236 _f([&,f](T* output, const int* input) -> bool {
237 auto cell = blockLattice.get(input);
238 if constexpr (std::is_invocable_v<F, T*,
decltype(cell)>) {
240 }
else if constexpr (std::is_invocable_v<F, T*,
decltype(cell), int,
const int*>) {
241 f(output, cell, _iC, input);
243 f(output, _iC, input);
249 bool operator() (T output[],
const int input[])
override {
250 return _f(output, input);
BlockConst3D(BlockStructureD< 3 > &blockStructure, Vector< W, Size > v)
Constructor template accepting vectors.
BlockConst3D(BlockStructureD< 3 > &blockStructure, std::vector< W > v)
Constructor accepting std::vector.
bool operator()(W output[], const int input[]) override
const std::vector< W > _c
bool operator()(BaseType output[], const int input[]) override
access to _blockData via its get()
BlockData< 3, T, BaseType > & getBlockData()
returns _blockData
BlockData< 3, T, BaseType > & _blockData
std::unique_ptr< BlockData< 3, T, BaseType > > _blockDataStorage
BlockDataF3D(int nx, int ny, int nz, int size=1)
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
BlockF3D< T > & operator-(BlockF3D< T > &rhs)
BlockF3D< T > & operator+(BlockF3D< T > &rhs)
BlockF3D< T > & operator/(BlockF3D< T > &rhs)
BlockF3D(BlockStructureD< 3 > &blockStructure, int targetDim)
BlockStructureD< 3 > & _blockStructure
virtual BlockStructureD< 3 > & getBlockStructure() const
~BlockF3D() override
virtual destructor for defined behaviour
BlockF3D< T > & operator*(BlockF3D< T > &rhs)
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)
BlockLattice< T, DESCRIPTOR > & _blockLattice
Generate a BlockLatticeF from an arbitrary function.
BlockLatticeFfromCallableF(BlockLattice< T, DESCRIPTOR > &blockLattice, unsigned iC, F &&f)
Generate a BlockLatticeF from an arbitrary function.
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)
represents all functors that operate on a DESCRIPTOR with output in Phys, e.g. physVelocity(),...
const UnitConverter< T, DESCRIPTOR > & _converter
BlockLatticePhysF3D(BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
represents all thermal functors that operate on a DESCRIPTOR with output in Phys, e....
BlockLatticeThermalPhysF3D(BlockLattice< T, TDESCRIPTOR > &blockLattice, const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > &converter, int targetDim)
const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > & _converter
perform explicit typecast from output type T2 to T
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.
Conversion between physical and lattice units, as well as discretization specialized for thermal appl...
Conversion between physical and lattice units, as well as discretization.
The description of a generic interface for all functor classes – header file.
Top level namespace for all of OpenLB.
constexpr std::vector< T > toStdVector(const ScalarVector< T, D, IMPL > &a)
Copies data into a standard vector.
std::conditional_t< DESCRIPTOR::d==2, BlockLatticeF2D< T, DESCRIPTOR >, BlockLatticeF3D< T, DESCRIPTOR > > BlockLatticeF
typename util::BaseTypeHelper< T >::type BaseType
Unit conversion handling – header file.