24#ifndef LATTICE_DISCRETE_NORMAL_2D_HH
25#define LATTICE_DISCRETE_NORMAL_2D_HH
37template<
typename T,
typename DESCRIPTOR>
40 :
SuperLatticeF2D<T,DESCRIPTOR>(sLattice, DESCRIPTOR::d), _superGeometry(superGeometry),
41 _indicatorF(std::move(indicatorF))
43 this->
getName() =
"discreteNormal";
44 int maxC = this->
_sLattice.getLoadBalancer().size();
46 for (
int iC = 0; iC < maxC; iC++) {
49 this->_superGeometry.getBlockGeometry(iC),
50 indicatorF->getBlockIndicatorF(iC)) );
54template <
typename T,
typename DESCRIPTOR>
58 _blockGeometry(blockGeometry),
59 _indicatorF(indicatorF)
61 this->
getName() =
"discreteNormal";
64template <
typename T,
typename DESCRIPTOR>
67 if (_indicatorF(input)) {
68 std::vector<int> normalVector = _blockGeometry.getStatistics().getType(input);
69 output[0] = normalVector[1];
70 output[1] = normalVector[2];
80template<
typename T,
typename DESCRIPTOR>
83 :
SuperLatticeF2D<T,DESCRIPTOR>(sLattice, DESCRIPTOR::d), _superGeometry(superGeometry),
84 _indicatorF(std::move(indicatorF))
86 this->
getName() =
"discreteNormalType";
87 int maxC = this->
_sLattice.getLoadBalancer().size();
89 for (
int iC = 0; iC < maxC; iC++) {
92 this->_superGeometry.getBlockGeometry(iC),
93 indicatorF->getBlockIndicatorF(iC)) );
97template <
typename T,
typename DESCRIPTOR>
101 _blockGeometry(blockGeometry),
102 _indicatorF(indicatorF)
104 this->
getName() =
"discreteNormalType";
107template <
typename T,
typename DESCRIPTOR>
110 if (_indicatorF(input)) {
111 std::vector<int> normalVector = _blockGeometry.getStatistics().getType(input);
112 output[0] = normalVector[0];
Representation of a block geometry.
Base block indicator functor (discrete)
BlockLatticeDiscreteNormal2D returns pointwise the discrete normal vector of the local lattice bounda...
BlockLatticeDiscreteNormal2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 2 > &blockGeometry, BlockIndicatorF2D< T > &indicatorF)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeDiscreteNormalType2D returns pointwise the type of a discrete normal vector.
BlockLatticeDiscreteNormalType2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 2 > &blockGeometry, BlockIndicatorF2D< 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< BlockF2D< T > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
Representation of a statistic for a parallel 2D geometry.
SuperLatticeDiscreteNormal2D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, FunctorPtr< SuperIndicatorF2D< T > > &&indicatorF)
SuperLatticeDiscreteNormalType2D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, FunctorPtr< SuperIndicatorF2D< 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.
This file contains indicator functions.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.