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

#include <offBoundaryPostProcessors3D.h>

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

Public Member Functions

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

Definition at line 80 of file offBoundaryPostProcessors3D.h.

Constructor & Destructor Documentation

◆ VelocityBouzidiLinearPostProcessor3D()

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

Definition at line 106 of file offBoundaryPostProcessors3D.hh.

108 : x(x_), y(y_), z(z_), iPop(iPop_), dist(dist_)
109{
110 this->getName() = "VelocityBouzidiLinearPostProcessor3D";
111 this->_priority = -1;
112
113#ifndef QUIET
114 if (dist < 0 || dist > 1)
115 std::cout << "WARNING: Bogus distance at (" << x << "," << y << "," << z << "): "
116 << dist << std::endl;
117#endif
118 typedef DESCRIPTOR L;
119 const Vector<int,3> c = descriptors::c<DESCRIPTOR>(iPop);
120 opp = descriptors::opposite<L>(iPop);
121 xN = x + c[0];
122 yN = y + c[1];
123 zN = z + c[2];
124
125 if (dist >= 0.5) {
126 xB = x - c[0];
127 yB = y - c[1];
128 zB = z - c[2];
129 q = 1/(2*dist);
130 ufrac = q;
131 iPop2 = opp;
132 }
133 else {
134 xB = x;
135 yB = y;
136 zB = z;
137 q = 2*dist;
138 iPop2 = iPop;
139 ufrac = 1;
140 }
141 /*
142 std::cout << "VelocityLinear (" << x << "," << y << "," << z <<
143 "), iPop: " << iPop << ", nP: (" << xN << "," << yN << "," << zN <<
144 "), opp: " << opp << ", bP: (" << xB << "," << yB << "," << zB <<
145 "), dist: " << dist << ", q: " << q << std::endl;
146 */
147}
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::VelocityBouzidiLinearPostProcessor3D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 83 of file offBoundaryPostProcessors3D.h.

84 {
85 return 1;
86 }

◆ extent() [2/2]

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

88 {
89 return 1;
90 }

◆ process()

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

Execute post-processing step.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 159 of file offBoundaryPostProcessors3D.hh.

161{
162 auto* dynamics = static_cast<legacy::OffDynamics<T,DESCRIPTOR>*>(blockLattice.getDynamics(xN, yN, zN));
163 T u = ufrac*dynamics->getVelocityCoefficient(iPop);
164 auto cellN = blockLattice.get(xN, yN, zN);
165 auto cell = blockLattice.get(x, y, z);
166 dynamics->defineRho(cellN, cell.computeRho());
167 cell[opp] = q*cellN[iPop] + (1-q)*blockLattice.get(xB, yB, zB)[iPop2] + u;
168}

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::VelocityBouzidiLinearPostProcessor3D< 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 150 of file offBoundaryPostProcessors3D.hh.

152{
153 if (util::contained(x, y, z, x0_, x1_, y0_, y1_, z0_, z1_)) {
154 process(blockLattice);
155 }
156}
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: