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

#include <offBoundaryPostProcessors2D.h>

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

Public Member Functions

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

Definition at line 54 of file offBoundaryPostProcessors2D.h.

Constructor & Destructor Documentation

◆ VelocityBouzidiLinearPostProcessor2D()

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

Definition at line 90 of file offBoundaryPostProcessors2D.hh.

92 : x(x_), y(y_), iPop(iPop_), dist(dist_)
93{
94 this->getName() = "VelocityBouzidiLinearPostProcessor2D";
95#ifndef QUIET
96 if (dist < 0 || dist > 1)
97 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "," << "): "
98 << dist << std::endl;
99#endif
100 typedef DESCRIPTOR L;
101 opp = descriptors::opposite<L>(iPop);
102 xN = x + descriptors::c<L>(iPop,0);
103 yN = y + descriptors::c<L>(iPop,1);
104
105 if (dist >= 0.5) {
106 xB = x - descriptors::c<L>(iPop,0);
107 yB = y - descriptors::c<L>(iPop,1);
108 q = 1/(2*dist);
109 ufrac = q;
110 iPop2 = opp;
111 }
112 else {
113 xB = x;
114 yB = y;
115 q = 2*dist;
116 iPop2 = iPop;
117 ufrac = 1;
118 }
119 /*
120 std::cout << "VelocityLinear (" << x << "," << y << "," <<
121 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," <<
122 "), opp: " << opp << ", bP: (" << xB << "," << yB << "," <<
123 "), dist: " << dist << ", q: " << q << std::endl;
124 */
125}
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::VelocityBouzidiLinearPostProcessor2D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 57 of file offBoundaryPostProcessors2D.h.

58 {
59 return 1;
60 }

◆ extent() [2/2]

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

62 {
63 return 1;
64 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor2D< T, DESCRIPTOR >.

Definition at line 137 of file offBoundaryPostProcessors2D.hh.

139{
140 auto cell = blockLattice.get(x, y);
141 auto cellN = blockLattice.get(xN, yN);
142 auto* dynamics = static_cast<legacy::OffDynamics<T,DESCRIPTOR>*>(cellN.getDynamics());
143 T velCoeff = ufrac*dynamics->getVelocityCoefficient(iPop);
144 dynamics->defineRho( cellN, cell.computeRho() );
145 cell[opp] = q*cellN[iPop] + (1-q)*blockLattice.get(xB, yB)[iPop2] + velCoeff;
146}

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::VelocityBouzidiLinearPostProcessor2D< 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 128 of file offBoundaryPostProcessors2D.hh.

130{
131 if (util::contained(x, y, x0_, x1_, y0_, y1_) ) {
132 process(blockLattice);
133 }
134}
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: