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

This class computes the Linear Bouzidi BC. More...

#include <offBoundaryPostProcessors3D.h>

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

Public Member Functions

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

This class computes the Linear Bouzidi BC.

Definition at line 36 of file offBoundaryPostProcessors3D.h.

Constructor & Destructor Documentation

◆ ZeroVelocityBouzidiLinearPostProcessor3D()

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

Definition at line 48 of file offBoundaryPostProcessors3D.hh.

50 : x(x_), y(y_), z(z_), iPop(iPop_), dist(dist_)
51{
52 this->getName() = "ZeroVelocityBouzidiLinearPostProcessor3D";
53 this->_priority = -1;
54#ifndef QUIET
55 if (dist < 0 || dist > 1)
56 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "," << z << "): "
57 << dist << std::endl;
58#endif
59 typedef DESCRIPTOR L;
60 const Vector<int,3> c = descriptors::c<DESCRIPTOR>(iPop);
61 opp = descriptors::opposite<L>(iPop);
62 xN = x + c[0];
63 yN = y + c[1];
64 zN = z + c[2];
65
66 if (dist >= 0.5) {
67 xB = x - c[0];
68 yB = y - c[1];
69 zB = z - c[2];
70 q = 1/(2*dist);
71 iPop2 = opp;
72 }
73 else {
74 xB = x;
75 yB = y;
76 zB = z;
77 q = 2*dist;
78 iPop2 = iPop;
79 }
80 /*
81 std::cout << "ZeroVelocityLinear (" << x << "," << y << "," << z <<
82 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," << zN <<
83 "), opp: " << opp << ", bP: (" << xB << "," << yB << "," << zB <<
84 "), dist: " << dist << ", q: " << q << std::endl;
85 */
86}
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::ZeroVelocityBouzidiLinearPostProcessor3D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 39 of file offBoundaryPostProcessors3D.h.

40 {
41 return 1;
42 }

◆ extent() [2/2]

template<typename T , typename DESCRIPTOR >
int olb::ZeroVelocityBouzidiLinearPostProcessor3D< 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 43 of file offBoundaryPostProcessors3D.h.

44 {
45 return 1;
46 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 98 of file offBoundaryPostProcessors3D.hh.

100{
101 blockLattice.get(x, y, z)[opp] = q*blockLattice.get(xN, yN, zN)[iPop] +
102 (1-q)*blockLattice.get(xB, yB, zB)[iPop2];
103}

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

+ Here is the call graph for this function:

◆ processSubDomain()

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

91{
92 if (util::contained(x, y, z, x0_, x1_, y0_, y1_, z0_, z1_)) {
93 process(blockLattice);
94 }
95}
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: