24#ifndef SUPER_GEOMETRY_FACES_3D_HH
25#define SUPER_GEOMETRY_FACES_3D_HH
36 :
SuperF3D<T>(indicatorF->getSuperStructure(), 7),
37 _indicatorF(std::move(indicatorF))
39 this->
getName() =
"superGeometryFaces";
55 this->getSuperStructure().communicate();
57 T blockOutput[7] = { };
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>(7,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 < 7; ++iDim) {
95 for (
int iC = 0; iC < _superGeometry.getLoadBalancer().size(); ++iC) {
97 _indicator, _material, _latticeL);
100 for (
int iDim = 0; iDim < 7; ++iDim) {
101 output[iDim] += outputTmp[iDim];
104#ifdef PARALLEL_MODE_MPI
105 for (
int iDim = 0; iDim < 7; ++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,3> in general
SuperStructure< T, 3 > & getSuperStructure()
std::vector< std::unique_ptr< BlockF3D< W > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
Accumulates the discrete surface of indicated cells facing unit directions and returns the individual...
SuperGeometryFaces3D(FunctorPtr< SuperIndicatorF3D< T > > &&indicatorF, T _latticeL)
Constructor accepting solid cell indicator and custom lattice length.
bool operator()(T output[], const int input[]) override
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
SuperGeometryFacesIndicator3D(SuperGeometry< T, 3 > &superGeometry, SmoothIndicatorF3D< T, T, HLBM > &indicator, const int material, T deltaX)
Representation of a statistic for a parallel 2D geometry.
Base indicator functor (discrete)
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.