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

#include <offBoundaryPostProcessors2D.h>

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

Public Member Functions

 ZeroVelocityBouzidiLinearPostProcessor2D (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::ZeroVelocityBouzidiLinearPostProcessor2D< T, DESCRIPTOR >

Definition at line 32 of file offBoundaryPostProcessors2D.h.

Constructor & Destructor Documentation

◆ ZeroVelocityBouzidiLinearPostProcessor2D()

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

Definition at line 37 of file offBoundaryPostProcessors2D.hh.

39 : x(x_), y(y_), iPop(iPop_), dist(dist_)
40{
41 this->getName() = "ZeroVelocityBouzidiLinearPostProcessor2D";
42#ifndef QUIET
43 if (dist < 0 || dist > 1)
44 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "): "
45 << dist << std::endl;
46#endif
47 typedef DESCRIPTOR L;
48 opp = descriptors::opposite<L>(iPop);
49 xN = x + descriptors::c<L>(iPop,0);
50 yN = y + descriptors::c<L>(iPop,1);
51
52 if (dist >= 0.5) {
53 xB = x - descriptors::c<L>(iPop,0);
54 yB = y - descriptors::c<L>(iPop,1);
55 q = 1/(2*dist);
56 iPop2 = opp;
57 }
58 else {
59 xB = x;
60 yB = y;
61 q = 2*dist;
62 iPop2 = iPop;
63 }
64 /*
65 std::cout << "ZeroVelocityLinear (" << x << "," << y << "," <<
66 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," <<
67 "), opp: " << opp << ", bP: (" << xB << "," << yB << "," <<
68 "), dist: " << dist << ", q: " << q << std::endl;
69 */
70}
std::string & getName()
read and write access to name

References 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::ZeroVelocityBouzidiLinearPostProcessor2D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 35 of file offBoundaryPostProcessors2D.h.

36 {
37 return 1;
38 }

◆ extent() [2/2]

template<typename T , typename DESCRIPTOR >
int olb::ZeroVelocityBouzidiLinearPostProcessor2D< 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 39 of file offBoundaryPostProcessors2D.h.

40 {
41 return 1;
42 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 82 of file offBoundaryPostProcessors2D.hh.

84{
85 blockLattice.get(x, y)[opp] = q*blockLattice.get(xN, yN)[iPop] +
86 (1-q)*blockLattice.get(xB, yB)[iPop2];
87}

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

+ Here is the call graph for this function:

◆ processSubDomain()

template<typename T , typename DESCRIPTOR >
void olb::ZeroVelocityBouzidiLinearPostProcessor2D< 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 73 of file offBoundaryPostProcessors2D.hh.

75{
76 if (util::contained(x, y, x0_, x1_, y0_, y1_) ) {
77 process(blockLattice);
78 }
79}
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: