24#ifndef OFF_BOUNDARY_POST_PROCESSORS_2D_HH
25#define OFF_BOUNDARY_POST_PROCESSORS_2D_HH
36template<
typename T,
typename DESCRIPTOR>
39 : x(x_), y(y_), iPop(iPop_), dist(dist_)
41 this->
getName() =
"ZeroVelocityBouzidiLinearPostProcessor2D";
43 if (dist < 0 || dist > 1)
44 std::cout <<
"WARNING: Bogus distance at (" << x <<
"," << y <<
"): "
48 opp = descriptors::opposite<L>(iPop);
49 xN = x + descriptors::c<L>(iPop,0);
50 yN = y + descriptors::c<L>(iPop,1);
53 xB = x - descriptors::c<L>(iPop,0);
54 yB = y - descriptors::c<L>(iPop,1);
72template<
typename T,
typename DESCRIPTOR>
77 process(blockLattice);
81template<
typename T,
typename DESCRIPTOR>
85 blockLattice.
get(x, y)[opp] = q*blockLattice.
get(xN, yN)[iPop] +
86 (1-q)*blockLattice.
get(xB, yB)[iPop2];
89template<
typename T,
typename DESCRIPTOR>
92 : x(x_), y(y_), iPop(iPop_), dist(dist_)
94 this->
getName() =
"VelocityBouzidiLinearPostProcessor2D";
96 if (dist < 0 || dist > 1)
97 std::cout <<
"WARNING: Bogus distance at (" << x <<
"," << y <<
"," <<
"): "
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);
106 xB = x - descriptors::c<L>(iPop,0);
107 yB = y - descriptors::c<L>(iPop,1);
127template<
typename T,
typename DESCRIPTOR>
132 process(blockLattice);
136template<
typename T,
typename DESCRIPTOR>
140 auto cell = blockLattice.
get(x, y);
141 auto cellN = blockLattice.
get(xN, yN);
144 dynamics->defineRho( cellN, cell.computeRho() );
145 cell[opp] = q*cellN[iPop] + (1-q)*blockLattice.
get(xB, yB)[iPop2] + velCoeff;
148template<
typename T,
typename DESCRIPTOR>
151 : x(x_), y(y_), iPop(iPop_), dist(dist_)
153 this->
getName() =
"ZeroVelocityBounceBackPostProcessor2D";
156 if (dist < 0 || dist > 1)
157 std::cout <<
"WARNING: Bogus distance at (" << x <<
"," << y <<
"," <<
"): "
158 << dist << std::endl;
160 typedef DESCRIPTOR L;
161 opp = descriptors::opposite<L>(iPop);
162 xN = x + descriptors::c<L>(iPop,0);
163 yN = y + descriptors::c<L>(iPop,1);
171template<
typename T,
typename DESCRIPTOR>
176 process(blockLattice);
180template<
typename T,
typename DESCRIPTOR>
184 blockLattice.
get(x, y)[opp] = blockLattice.
get(xN, yN)[iPop];
188template<
typename T,
typename DESCRIPTOR>
191 : x(x_), y(y_), iPop(iPop_), dist(dist_)
193 this->
getName() =
"VelocityBounceBackPostProcessor2D";
196 if (dist < 0 || dist > 1)
197 std::cout <<
"WARNING: Bogus distance at (" << x <<
"," << y <<
"," <<
"): "
198 << dist << std::endl;
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);
212template<
typename T,
typename DESCRIPTOR>
217 process(blockLattice);
221template<
typename T,
typename DESCRIPTOR>
225 auto cell = blockLattice.
get(x, y);
226 auto cellN = blockLattice.
get(xN, yN);
229 dynamics->defineRho( cellN, cell.computeRho() );
230 cell[opp] = cellN[iPop] + velCoeff;
234template<
typename T,
typename DESCRIPTOR>
237 : x(x_), y(y_), iPop(iPop_)
239 typedef DESCRIPTOR L;
240 opp = descriptors::opposite<L>(iPop);
241 xN = x + descriptors::c<L>(iPop,0);
242 yN = y + descriptors::c<L>(iPop,1);
249 this->
getName() =
"AntiBounceBackPostProcessor2D";
252template<
typename T,
typename DESCRIPTOR>
257 process(blockLattice);
261template<
typename T,
typename DESCRIPTOR>
268 if (descriptors::c<DESCRIPTOR>(iPop,1)==0) {
269 blockLattice.
get(x, y)[opp] = -blockLattice.
get(xN, yN)[iPop];
275template<
typename T,
typename DESCRIPTOR>
280 for (
int iPop = 0; iPop < DESCRIPTOR::q ; ++iPop) {
281 this->_streamDirections[iPop] = streamDirection[iPop];
283 this->
getName() =
"BoundaryStreamPostProcessor2D";
286template<
typename T,
typename DESCRIPTOR>
291 process(blockLattice);
295template<
typename T,
typename DESCRIPTOR>
299 auto cell = blockLattice.
get(x, y);
300 for (
int iPop = 1; iPop < DESCRIPTOR::q ; ++iPop) {
301 if (_streamDirections[iPop]) {
302 blockLattice.
get(x + descriptors::c<DESCRIPTOR>(iPop,0), y + descriptors::c<DESCRIPTOR>(iPop,1))[iPop] = cell[iPop];
309template<
typename T,
typename DESCRIPTOR>
313 x(x_), y(y_), iPop(iPop_), dist(dist_)
316template<
typename T,
typename DESCRIPTOR>
321 ( this->x, this->y, this->iPop, this->dist);
324template<
typename T,
typename DESCRIPTOR>
329 (this->x, this->y, this->iPop, this->dist);
332template<
typename T,
typename DESCRIPTOR>
336 x(x_), y(y_), iPop(iPop_), dist(dist_)
339template<
typename T,
typename DESCRIPTOR>
344 ( this->x, this->y, this->iPop, this->dist);
347template<
typename T,
typename DESCRIPTOR>
352 (this->x, this->y, this->iPop, this->dist);
356template<
typename T,
typename DESCRIPTOR>
360 x(x_), y(y_), iPop(iPop_)
363template<
typename T,
typename DESCRIPTOR>
368 ( this->x, this->y, this->iPop);
371template<
typename T,
typename DESCRIPTOR>
376 (this->x, this->y, this->iPop);
379template<
typename T,
typename DESCRIPTOR>
385 for (
int iPop = 0; iPop < DESCRIPTOR::q ; ++iPop) {
386 this->_streamDirections[iPop] = streamDirections[iPop];
390template<
typename T,
typename DESCRIPTOR>
395 ( this->x, this->y, this->_streamDirections);
398template<
typename T,
typename DESCRIPTOR>
403 (this->x, this->y, this->_streamDirections);
408template<
typename T,
typename DESCRIPTOR>
412 x(x_), y(y_), iPop(iPop_), dist(dist_)
415template<
typename T,
typename DESCRIPTOR>
420 ( this->x, this->y, this->iPop, this->dist);
423template<
typename T,
typename DESCRIPTOR>
428 (this->x, this->y, this->iPop, this->dist);
431template<
typename T,
typename DESCRIPTOR>
435 x(x_), y(y_), iPop(iPop_), dist(dist_)
438template<
typename T,
typename DESCRIPTOR>
443 ( this->x, this->y, this->iPop, this->dist);
446template<
typename T,
typename DESCRIPTOR>
451 (this->x, this->y, this->iPop, this->dist);
Definition of a LB cell – header file.
AntiBounceBackPostProcessor2D(int x_, int y_, int iPop_)
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.
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
AntiBounceBackPostProcessorGenerator2D(int x_, int y_, int iPop_)
PostProcessor2D< T, DESCRIPTOR > * generate() const override
Platform-abstracted block lattice for external access and inter-block interaction.
Cell< T, DESCRIPTOR > get(CellID iCell)
Get Cell interface for index iCell.
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
BoundaryStreamPostProcessor2D(int x_, int y_, const bool streamDirections[DESCRIPTOR::q])
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
BoundaryStreamPostProcessorGenerator2D(int x_, int y_, const bool _streamDirections[DESCRIPTOR::q])
PostProcessor2D< T, DESCRIPTOR > * generate() const override
Interface of 2D post-processing steps.
std::string & getName()
read and write access to name
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
VelocityBounceBackPostProcessor2D(int x_, int y_, int iPop_, T dist_)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate() const override
VelocityBounceBackPostProcessorGenerator2D(int x_, int y_, int iPop_, T dist_)
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.
VelocityBouzidiLinearPostProcessor2D(int x_, int y_, int iPop_, T dist_)
PostProcessor2D< T, DESCRIPTOR > * generate() const override
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
VelocityBouzidiLinearPostProcessorGenerator2D(int x_, int y_, int iPop_, T dist_)
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.
ZeroVelocityBounceBackPostProcessor2D(int x_, int y_, int iPop_, T dist_)
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate() const override
ZeroVelocityBounceBackPostProcessorGenerator2D(int x_, int y_, int iPop_, T dist_)
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
ZeroVelocityBouzidiLinearPostProcessor2D(int x_, int y_, int iPop_, T dist_)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
PostProcessor2D< T, DESCRIPTOR > * generate() const override
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
ZeroVelocityBouzidiLinearPostProcessorGenerator2D(int x_, int y_, int iPop_, T dist_)
Dynamics for offLattice boundary conditions OffDynamics are basically NoLatticeDynamics with the addi...
T getVelocityCoefficient(int iPop)
Get VelocitySummand for Bouzidi-Boundary Condition.
bool contained(int x, int y, int x0, int x1, int y0, int y1)
Top level namespace for all of OpenLB.
Set of functions commonly used in LB computations – header file.