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

#include <offBoundaryPostProcessors2D.h>

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

Public Member Functions

 VelocityBounceBackPostProcessor2D (int x_, int y_, 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_) override
 Execute post-processing step on a sublattice.
 
- Public Member Functions inherited from olb::PostProcessor2D< T, DESCRIPTOR >
 PostProcessor2D ()
 
virtual ~PostProcessor2D ()
 
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::PostProcessor2D< T, DESCRIPTOR >
int _priority
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::VelocityBounceBackPostProcessor2D< T, DESCRIPTOR >

Definition at line 99 of file offBoundaryPostProcessors2D.h.

Constructor & Destructor Documentation

◆ VelocityBounceBackPostProcessor2D()

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

Definition at line 189 of file offBoundaryPostProcessors2D.hh.

191 : x(x_), y(y_), iPop(iPop_), dist(dist_)
192{
193 this->getName() = "VelocityBounceBackPostProcessor2D";
194 this->_priority = -1;
195#ifndef QUIET
196 if (dist < 0 || dist > 1)
197 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "," << "): "
198 << dist << std::endl;
199#endif
200 typedef DESCRIPTOR L;
201 opp = descriptors::opposite<L>(iPop);
202 xN = x + descriptors::c<L>(iPop,0);
203 yN = y + descriptors::c<L>(iPop,1);
204
205 /*
206 std::cout << "Corner (" << x << "," << y << "," <<
207 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," <<
208 "), dist: " << dist << std::endl;
209 */
210}
std::string & getName()
read and write access to name

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

+ Here is the call graph for this function:

Member Function Documentation

◆ extent() [1/2]

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

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 102 of file offBoundaryPostProcessors2D.h.

103 {
104 return 1;
105 }

◆ extent() [2/2]

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

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

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 106 of file offBoundaryPostProcessors2D.h.

107 {
108 return 1;
109 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 222 of file offBoundaryPostProcessors2D.hh.

224{
225 auto cell = blockLattice.get(x, y);
226 auto cellN = blockLattice.get(xN, yN);
227 auto* dynamics = static_cast<legacy::OffDynamics<T,DESCRIPTOR>*>(cell.getDynamics());
228 T velCoeff = dynamics->getVelocityCoefficient(iPop);
229 dynamics->defineRho( cellN, cell.computeRho() );
230 cell[opp] = cellN[iPop] + velCoeff;
231}

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

+ Here is the call graph for this function:

◆ processSubDomain()

template<typename T , typename DESCRIPTOR >
void olb::VelocityBounceBackPostProcessor2D< T, DESCRIPTOR >::processSubDomain ( BlockLattice< T, DESCRIPTOR > & blockLattice,
int x0_,
int x1_,
int y0_,
int y1_ )
overridevirtual

Execute post-processing step on a sublattice.

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 213 of file offBoundaryPostProcessors2D.hh.

215{
216 if (util::contained(x, y, x0_, x1_, y0_, y1_) ) {
217 process(blockLattice);
218 }
219}
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: