24#ifndef LATTICE_DISCRETE_NORMAL_3D_HH
25#define LATTICE_DISCRETE_NORMAL_3D_HH
36template<
typename T,
typename DESCRIPTOR>
38 :
SuperLatticeF3D<T, DESCRIPTOR>(sLattice, DESCRIPTOR::d), _superGeometry(superGeometry),
39 _indicatorF(std::move(indicatorF))
41 this->
getName() =
"discreteNormal";
42 int maxC = this->
_sLattice.getLoadBalancer().size();
44 for (
int iC = 0; iC < maxC; iC++) {
46 this->_superGeometry.getBlockGeometry(iC),
47 indicatorF->getBlockIndicatorF(iC) ));
51template<
typename T,
typename DESCRIPTOR>
54 _blockGeometry(blockGeometry),
55 _indicatorF(indicatorF)
57 this->
getName() =
"discreteNormal";
60template<
typename T,
typename DESCRIPTOR>
63 if (_indicatorF(input)) {
64 std::vector<int> normalVector = _blockGeometry.getStatistics().getType(input);
65 output[0] = normalVector[1];
66 output[1] = normalVector[2];
67 output[2] = normalVector[3];
78template<
typename T,
typename DESCRIPTOR>
80 :
SuperLatticeF3D<T, DESCRIPTOR>(sLattice, DESCRIPTOR::d), _superGeometry(superGeometry),
81 _indicatorF(std::move(indicatorF))
83 this->
getName() =
"discreteNormalType";
84 int maxC = this->
_sLattice.getLoadBalancer().size();
86 for (
int iC = 0; iC < maxC; iC++) {
88 this->_superGeometry.getBlockGeometry(iC),
89 indicatorF->getBlockIndicatorF(iC) ));
93template<
typename T,
typename DESCRIPTOR>
96 _blockGeometry(blockGeometry),
97 _indicatorF(indicatorF)
99 this->
getName() =
"discreteNormalType";
102template<
typename T,
typename DESCRIPTOR>
105 if (_indicatorF(input)) {
106 std::vector<int> normalVector = _blockGeometry.getStatistics().getType(input);
107 output[0] = normalVector[0];
Representation of a block geometry.
Base block indicator functor.
BlockLatticeDiscreteNormal3D returns pointwise the discrete normal vector of the local lattice bounda...
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeDiscreteNormal3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, BlockIndicatorF3D< T > &indicatorF)
BlockLatticeDiscreteNormalType3D returns pointwise the type of a discrete normal vector.
BlockLatticeDiscreteNormalType3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, BlockIndicatorF3D< T > &indicatorF)
bool operator()(T output[1], const int input[]) override
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
Platform-abstracted block lattice for external access and inter-block interaction.
Smart pointer for managing the various ways of passing functors around.
std::string & getName()
read and write access to name
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
Representation of a statistic for a parallel 2D geometry.
Base indicator functor (discrete)
SuperLatticeDiscreteNormal3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &superGeometry, FunctorPtr< SuperIndicatorF3D< T > > &&indicatorF)
SuperLatticeDiscreteNormalType3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &superGeometry, FunctorPtr< SuperIndicatorF3D< T > > &&indicatorF)
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
SuperLattice< T, DESCRIPTOR > & _sLattice
Super class maintaining block lattices for a cuboid decomposition.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.