OpenLB 1.7
Loading...
Searching...
No Matches
advectionDiffusionBoundaryPostProcessor3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2006, 2016 Robin Trunk
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * Generic version of the collision, which modifies the particle
9 * distribution functions, by Orestis Malaspinas.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this program; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26#ifndef ADVECTION_DIFFUSION_BOUNDARY_POST_PROCESSOR_3D_H
27#define ADVECTION_DIFFUSION_BOUNDARY_POST_PROCESSOR_3D_H
28
29
30
31#include "core/postProcessing.h"
32
33namespace olb {
34
42template<typename T, typename DESCRIPTOR>
44public:
45 ConvectionBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_,
46 int z1_, int discreteNormalX_,
47 int discreteNormalY_, int discreteNormalZ_);
48 int extent() const override
49 {
50 return 0;
51 }
52 int extent(int whichDirection) const override
53 {
54 return 0;
55 }
56 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
58 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override;
59private:
60 int interpolationPop[DESCRIPTOR::q];
61 int x0, x1, y0, y1, z0, z1;
62};
63
64template<typename T, typename DESCRIPTOR>
66public:
67 ConvectionBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_,
68 int z0_, int z1_, int discreteNormalX_,
69 int discreteNormalY_, int discreteNormalZ_);
72private:
73 int discreteNormalX;
74 int discreteNormalY;
75 int discreteNormalZ;
76};
77
83template<typename T, typename DESCRIPTOR, typename FIELD_A, typename FIELD_B>
85public:
86 ExtFieldBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_,
87 int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_);
88 int extent() const override
89 {
90 return 0;
91 }
92 int extent(int whichDirection) const override
93 {
94 return 0;
95 }
96 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
98 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override;
99private:
100 int x0, x1, y0, y1, z0, z1;
101 int discreteNormalX, discreteNormalY, discreteNormalZ;
102 bool tick;
103};
104
105template<typename T, typename DESCRIPTOR, typename FIELD_A, typename FIELD_B>
107public:
108 ExtFieldBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_,
109 int z1_, int discreteNormalX_, int discreteNormalY_,
110 int discreteNormalZ_);
111 PostProcessor3D<T,DESCRIPTOR>* generate() const override;
113private:
114 int discreteNormalX, discreteNormalY, discreteNormalZ;
115};
116
123template<typename T, typename DESCRIPTOR>
125public:
126 ZeroDistributionBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_,
127 int z1_, int discreteNormalX_, int discreteNormalY_,
128 int discreteNormalZ_);
129 int extent() const override
130 {
131 return 0;
132 }
133 int extent(int whichDirection) const override
134 {
135 return 0;
136 }
137 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
138 void processSubDomain ( BlockLattice<T,DESCRIPTOR>& blockLattice,
139 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override;
140private:
141 int resetPop[DESCRIPTOR::q];
142 int x0, x1, y0, y1, z0, z1;
143};
144
145template<typename T, typename DESCRIPTOR>
147public:
148 ZeroDistributionBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_,
149 int z0_, int z1_, int discreteNormalX_,
150 int discreteNormalY_, int discreteNormalZ_);
151 PostProcessor3D<T,DESCRIPTOR>* generate() const override;
153private:
154 int discreteNormalX;
155 int discreteNormalY;
156 int discreteNormalZ;
157};
158}
159
160
161#endif
162
Platform-abstracted block lattice for external access and inter-block interaction.
This class interpolates missing f_i from values near the boundary to get a more stable outflow condit...
ConvectionBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
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.
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
int extent() const override
Extent of application area (0 for purely local operations)
PostProcessorGenerator3D< T, DESCRIPTOR > * clone() const override
ConvectionBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
PostProcessor3D< T, DESCRIPTOR > * generate() const override
This class copies missing values in the external field from the neighbour in normal direction.
int extent() const override
Extent of application area (0 for purely local operations)
ExtFieldBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
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.
ExtFieldBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
PostProcessorGenerator3D< T, DESCRIPTOR > * clone() const override
PostProcessor3D< T, DESCRIPTOR > * generate() const override
This class resets some values of the distribution on the boundary that can have arbitrary values to b...
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.
int extent() const override
Extent of application area (0 for purely local operations)
ZeroDistributionBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
ZeroDistributionBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
PostProcessorGenerator3D< T, DESCRIPTOR > * clone() const override
Top level namespace for all of OpenLB.
Interface for post-processing steps – header file.