24#ifndef SUPER_GEOMETRY_FACES_2D_HH
25#define SUPER_GEOMETRY_FACES_2D_HH
36 :
SuperF2D<T>(indicatorF->getSuperStructure(), 5),
37 _indicatorF(std::move(indicatorF))
39 this->
getName() =
"superGeometryFaces";
55 this->getSuperStructure().communicate();
57 T blockOutput[5] = { };
58 for (
int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
62 for (
int iC = 0; iC < this->getSuperStructure().getLoadBalancer().size(); ++iC) {
63 this->getBlockF(iC)(blockOutput, input);
64 for (
int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
65 output[iDim] += blockOutput[iDim];
69#ifdef PARALLEL_MODE_MPI
70 for (
int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
77template <
typename T,
bool HLBM>
81 const int material, T deltaX)
82 :
GenericF<T,int>(5,0), _superGeometry(superGeometry), _indicator(indicator),
83 _material(material), _latticeL(deltaX)
85 this->
getName() =
"superGeometryFacesInd";
88template <
typename T,
bool HLBM>
91 _superGeometry.communicate();
92 for (
int iDim = 0; iDim < 5; ++iDim) {
95 for (
int iC = 0; iC < _superGeometry.getLoadBalancer().size(); ++iC) {
97 _indicator, _material, _latticeL);
100 for (
int iDim = 0; iDim < 5; ++iDim) {
101 output[iDim] += outputTmp[iDim];
104#ifdef PARALLEL_MODE_MPI
105 for (
int iDim = 0; iDim < 5; ++iDim) {
Smart pointer for managing the various ways of passing functors around.
GenericF is a base class, that can represent continuous as well as discrete functions.
int getTargetDim() const
read only access to member variable _n
std::string & getName()
read and write access to name
represents all functors that operate on a SuperStructure<T,2> in general
std::vector< std::unique_ptr< BlockF2D< W > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
SuperStructure< T, 2 > & getSuperStructure()
Accumulates the discrete surface of indicated cells facing unit directions and returns the individual...
SuperGeometryFaces2D(FunctorPtr< SuperIndicatorF2D< T > > &&indicatorF, T _latticeL)
Constructor accepting solid cell indicator and custom lattice length.
bool operator()(T output[], const int input[]) override
SuperGeometryFacesIndicator2D(SuperGeometry< T, 2 > &superGeometry, SmoothIndicatorF2D< T, T, HLBM > &indicator, const int material, T deltaX)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
Representation of a statistic for a parallel 2D geometry.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
void reduceAndBcast(T &reductVal, MPI_Op op, int root=0, MPI_Comm comm=MPI_COMM_WORLD)
Reduction operation, followed by a broadcast.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.