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

#include <offBoundaryPostProcessors3D.h>

+ Inheritance diagram for olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >:
+ Collaboration diagram for olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >:

Public Member Functions

 VelocityBounceBackPostProcessor3D (int x_, int y_, int z_, int iPop_, T dist_)
 
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>
class olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >

Definition at line 103 of file offBoundaryPostProcessors3D.h.

Constructor & Destructor Documentation

◆ VelocityBounceBackPostProcessor3D()

template<typename T , typename DESCRIPTOR >
olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >::VelocityBounceBackPostProcessor3D ( int x_,
int y_,
int z_,
int iPop_,
T dist_ )

Definition at line 216 of file offBoundaryPostProcessors3D.hh.

218 : x(x_), y(y_), z(z_), iPop(iPop_), dist(dist_)
219{
220 this->getName() = "VelocityBounceBackPostProcessor3D";
221 this->_priority = -1;
222
223#ifndef QUIET
224 if (dist < 0 || dist > 1)
225 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "," << z << "): "
226 << dist << std::endl;
227#endif
228 typedef DESCRIPTOR L;
229 const Vector<int,3> c = descriptors::c<L>(iPop);
230 opp = descriptors::opposite<L>(iPop);
231 xN = x + c[0];
232 yN = y + c[1];
233 zN = z + c[2];
234
235 /*
236 std::cout << "Corner (" << x << "," << y << "," << z <<
237 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," << zN <<
238 "), dist: " << dist << std::endl;
239 */
240}
std::string & getName()
read and write access to name
platform_constant int c[Q][D]

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

+ Here is the call graph for this function:

Member Function Documentation

◆ extent() [1/2]

template<typename T , typename DESCRIPTOR >
int olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 106 of file offBoundaryPostProcessors3D.h.

107 {
108 return 1;
109 }

◆ extent() [2/2]

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

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

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 110 of file offBoundaryPostProcessors3D.h.

111 {
112 return 1;
113 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 252 of file offBoundaryPostProcessors3D.hh.

254{
255 auto* dynamics = static_cast<legacy::OffDynamics<T,DESCRIPTOR>*>(blockLattice.getDynamics(xN, yN, zN));
256 T u = dynamics->getVelocityCoefficient(iPop);
257 auto cellN = blockLattice.get(xN, yN, zN);
258 auto cell = blockLattice.get(x, y, z);
259 dynamics->defineRho(cellN, cell.computeRho());
260 cell[opp] = cellN[iPop] + u;
261}

References olb::BlockLattice< T, DESCRIPTOR >::get(), olb::BlockLattice< T, DESCRIPTOR >::getDynamics(), and olb::legacy::OffDynamics< T, DESCRIPTOR >::getVelocityCoefficient().

+ Here is the call graph for this function:

◆ processSubDomain()

template<typename T , typename DESCRIPTOR >
void olb::VelocityBounceBackPostProcessor3D< T, DESCRIPTOR >::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 243 of file offBoundaryPostProcessors3D.hh.

245{
246 if (util::contained(x, y, z, x0_, x1_, y0_, y1_, z0_, z1_)) {
247 process(blockLattice);
248 }
249}
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
bool contained(int x, int y, int x0, int x1, int y0, int y1)
Definition util.h:119

References olb::util::contained().

+ Here is the call graph for this function:

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