OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B > Class Template Reference

This class copies missing values in the external field from the neighbour in normal direction. More...

#include <advectionDiffusionBoundaryPostProcessor3D.h>

+ Inheritance diagram for olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >:
+ Collaboration diagram for olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >:

Public Member Functions

 ExtFieldBoundaryProcessor3D (int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
 
int extent () const override
 Extent of application area (0 for purely local operations)
 
int extent (int whichDirection) const override
 Extent of application area along a direction (0 or 1)
 
void process (BlockLattice< T, DESCRIPTOR > &blockLattice) override
 Execute post-processing step.
 
void processSubDomain (BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override
 Execute post-processing step on a sublattice.
 
- Public Member Functions inherited from olb::PostProcessor3D< T, DESCRIPTOR >
 PostProcessor3D ()
 
virtual ~PostProcessor3D ()
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
int getPriority () const
 read only access to priority
 

Additional Inherited Members

- Protected Attributes inherited from olb::PostProcessor3D< T, DESCRIPTOR >
int _priority
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename FIELD_A, typename FIELD_B>
class olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >

This class copies missing values in the external field from the neighbour in normal direction.

Therefore it is assumed this neighbour is a fluid cell.

Definition at line 84 of file advectionDiffusionBoundaryPostProcessor3D.h.

Constructor & Destructor Documentation

◆ ExtFieldBoundaryProcessor3D()

template<typename T , typename DESCRIPTOR , typename FIELD_A , typename FIELD_B >
olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >::ExtFieldBoundaryProcessor3D ( int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_,
int discreteNormalX_,
int discreteNormalY_,
int discreteNormalZ_ )

Definition at line 161 of file advectionDiffusionBoundaryPostProcessor3D.hh.

164 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_),
165 discreteNormalX(discreteNormalX_), discreteNormalY(discreteNormalY_),
166 discreteNormalZ(discreteNormalZ_)
167{
168 OLB_PRECONDITION(x0==x1 || y0==y1 || z0==z1);
169 this->getName() = "ExtFieldBoundaryProcessor3D";
170 tick = true;
171}
std::string & getName()
read and write access to name
#define OLB_PRECONDITION(COND)
Definition olbDebug.h:46

References olb::PostProcessor3D< T, DESCRIPTOR >::getName(), and OLB_PRECONDITION.

+ Here is the call graph for this function:

Member Function Documentation

◆ extent() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD_A , typename FIELD_B >
int olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 88 of file advectionDiffusionBoundaryPostProcessor3D.h.

89 {
90 return 0;
91 }

◆ extent() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD_A , typename FIELD_B >
int olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >::extent ( int direction) const
inlineoverridevirtual

Extent of application area along a direction (0 or 1)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 92 of file advectionDiffusionBoundaryPostProcessor3D.h.

93 {
94 return 0;
95 }

◆ process()

template<typename T , typename DESCRIPTOR , typename FIELD_A , typename FIELD_B >
void olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >::process ( BlockLattice< T, DESCRIPTOR > & blockLattice)
overridevirtual

Execute post-processing step.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 208 of file advectionDiffusionBoundaryPostProcessor3D.hh.

210{
211 processSubDomain(blockLattice, x0, x1, y0, y1, z0, z1);
212}
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override
Execute post-processing step on a sublattice.

◆ processSubDomain()

template<typename T , typename DESCRIPTOR , typename FIELD_A , typename FIELD_B >
void olb::ExtFieldBoundaryProcessor3D< T, DESCRIPTOR, FIELD_A, FIELD_B >::processSubDomain ( BlockLattice< T, DESCRIPTOR > & blockLattice,
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_ )
overridevirtual

Execute post-processing step on a sublattice.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 174 of file advectionDiffusionBoundaryPostProcessor3D.hh.

179{
180 int newX0, newX1, newY0, newY1, newZ0, newZ1;
181
182 if ( util::intersect (
183 x0, x1, y0, y1, z0, z1,
184 x0_, x1_, y0_, y1_, z0_, z1_,
185 newX0, newX1, newY0, newY1, newZ0, newZ1 ) ) {
186#ifdef PARALLEL_MODE_OMP
187 #pragma omp parallel for
188#endif
189 for (int iX=newX0; iX<=newX1; ++iX) {
190 for (int iY=newY0; iY<=newY1; ++iY) {
191 for (int iZ=newZ0; iZ<=newZ1; ++iZ) {
192 auto self = blockLattice.get(iX,iY,iZ);
193 auto neighbor = self.neighbor({discreteNormalX, discreteNormalY, discreteNormalZ});
194 if (tick) {
195 self.template setField<FIELD_A>(neighbor.template getField<FIELD_B>());
196 }
197 else {
198 self.template setField<FIELD_B>(neighbor.template getField<FIELD_A>());
199 }
200 }
201 }
202 }
203 }
204 tick = !tick;
205}
bool intersect(int x0, int x1, int y0, int y1, int x0_, int x1_, int y0_, int y1_, int &newX0, int &newX1, int &newY0, int &newY1)
Definition util.h:89

References olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::util::intersect().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: