OpenLB 1.7
Loading...
Searching...
No Matches
boundaryPostProcessors3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2006, 2007 Jonas Latt
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 collision, which modifies the particle distribution
9 * functions, implemented by Orestis Malaspinas, 2007
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
27#ifndef BOUNDARY_POST_PROCESSORS_3D_H
28#define BOUNDARY_POST_PROCESSORS_3D_H
29
30#include "core/postProcessing.h"
31
32#include "core/operator.h"
33
34namespace olb {
35
41template<typename T, typename DESCRIPTOR, int direction, int orientation>
43public:
45
46 int getPriority() const {
47 return 0;
48 }
49
50 template <CONCEPT(Cell) CELL>
51 void apply(CELL& cell) any_platform;
52
53private:
54 template <int deriveDirection, typename CELL>
55 void interpolateGradients(CELL& cell, T velDeriv[DESCRIPTOR::d]) const any_platform;
56
57};
58
59
60template <typename DESCRIPTOR, int direction, int orientation>
62public:
64
66 util::populationsContributingToVelocity<DESCRIPTOR,direction,-orientation>().size()
67 > { };
68
69 int getPriority() const {
70 return 0;
71 }
72
73 template <CONCEPT(Cell) CELL>
74 void initialize(CELL& cell) any_platform;
75
76 template <CONCEPT(Cell) CELL>
77 void apply(CELL& cell) any_platform;
78
79};
80
81
87template <typename T, typename DESCRIPTOR, int plane, int normal1, int normal2>
89public:
91
92 int getPriority() const {
93 return 0;
94 }
95
96 template <CONCEPT(Cell) CELL>
97 void apply(CELL& cell) any_platform;
98
99private:
100 template <typename CELL>
101 T getNeighborRho(CELL& cell, int step1, int step2) any_platform;
102
103 template <int deriveDirection, int orientation, typename CELL>
104 void interpolateGradients(CELL& cell, T velDeriv[DESCRIPTOR::d]) const any_platform;
105
106};
107
108
109template<typename T, typename DESCRIPTOR,
110 int xNormal, int yNormal, int zNormal>
113
114 int getPriority() const {
115 return 1;
116 }
117
118 template <CONCEPT(Cell) CELL>
119 void apply(CELL& cell) any_platform;
120};
121
126template<typename T, typename DESCRIPTOR>
127class SlipBoundaryProcessor3D : public LocalPostProcessor3D<T,DESCRIPTOR> {
128public:
129 SlipBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_);
130 int extent() const override
131 {
132 return 0;
133 }
134 int extent(int whichDirection) const override
135 {
136 return 0;
137 }
138 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
139 void processSubDomain ( BlockLattice<T,DESCRIPTOR>& blockLattice,
140 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_ ) override;
141private:
142 int reflectionPop[DESCRIPTOR::q];
143 int x0, x1, y0, y1, z0, z1;
144};
145
146
147template<typename T, typename DESCRIPTOR>
149public:
150 SlipBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_);
151 PostProcessor3D<T,DESCRIPTOR>* generate() const override;
153private:
154 int discreteNormalX;
155 int discreteNormalY;
156 int discreteNormalZ;
157};
158
163template<typename T, typename DESCRIPTOR>
165public:
166 PartialSlipBoundaryProcessor3D(T tuner_, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_);
167 int extent() const override
168 {
169 return 0;
170 }
171 int extent(int whichDirection) const override
172 {
173 return 0;
174 }
175 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
176 void processSubDomain ( BlockLattice<T,DESCRIPTOR>& blockLattice,
177 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_ ) override;
178private:
179 int reflectionPop[DESCRIPTOR::q];
180 int x0, x1, y0, y1, z0, z1;
181 T tuner;
182};
183
184
185template<typename T, typename DESCRIPTOR>
187public:
188 PartialSlipBoundaryProcessorGenerator3D(T tuner_, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_);
189 PostProcessor3D<T,DESCRIPTOR>* generate() const override;
191private:
192 int discreteNormalX;
193 int discreteNormalY;
194 int discreteNormalZ;
195 T tuner;
196};
197
198
207template<typename T, typename DESCRIPTOR, int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
209public:
211
212 int getPriority() const {
213 return 0;
214 }
215
216 template <CONCEPT(Cell) CELL>
217 void apply(CELL& cell) any_platform;
218
219};
220
221template<typename T, typename DESCRIPTOR, int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
223public:
225
226 int getPriority() const {
227 return 0;
228 }
229
230 template <CONCEPT(Cell) CELL>
231 void apply(CELL& cell) any_platform;
232
233};
234
235
240template<typename T, typename DESCRIPTOR, int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
242public:
244
246
247 int getPriority() const {
248 return 0;
249 }
250
251 template <CONCEPT(Cell) CELL, typename PARAMETERS>
252 void apply(CELL& cell, PARAMETERS& parameters) any_platform;
253
254};
255
256
260template<typename T, typename DESCRIPTOR, int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
262public:
264
265 int getPriority() const {
266 return 0;
267 }
268
269 template <CONCEPT(Cell) CELL>
270 void apply(CELL& cell) any_platform;
271};
272
273
274}
275
276#endif
Platform-abstracted block lattice for external access and inter-block interaction.
PostProcessors for the chemical potential boundary condition in the free energy model.
PostProcessor for the density / velocity outflow boundaries in the free energy model.
PostProcessor for the wetting boundary condition in the free energy model.
meta::list< olb::descriptors::ADDEND > parameters
static constexpr OperatorScope scope
void apply(CELL &cell, PARAMETERS &parameters) any_platform
This class computes the skordos BC on a convex edge wall in 3D but with a limited number of terms add...
static constexpr OperatorScope scope
This class computes a partial slip BC in 3D.
int extent() const override
Extent of application area (0 for purely local operations)
PartialSlipBoundaryProcessor3D(T tuner_, 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 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.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
PartialSlipBoundaryProcessorGenerator3D(T tuner_, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
PostProcessor3D< T, DESCRIPTOR > * generate() const override
PostProcessorGenerator3D< T, DESCRIPTOR > * clone() const override
This class computes the skordos BC on a plane wall in 3D but with a limited number of terms added to ...
static constexpr OperatorScope scope
void apply(CELL &cell) any_platform
This class computes a slip BC in 3D.
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)
SlipBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
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.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
PostProcessorGenerator3D< T, DESCRIPTOR > * clone() const override
SlipBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX_, int discreteNormalY_, int discreteNormalZ_)
PostProcessor3D< T, DESCRIPTOR > * generate() const override
Top level namespace for all of OpenLB.
OperatorScope
Block-wide operator application scopes.
Definition operator.h:54
@ PerCell
Per-cell application, i.e. OPERATOR::apply is passed a CELL concept implementation.
@ PerCellWithParameters
Per-cell application with parameters, i.e. OPERATOR::apply is passed a CELL concept implementation an...
#define any_platform
Define preprocessor macros for device-side functions, constant storage.
Definition platform.h:78
Interface for post-processing steps – header file.
Base of a field whose size is defined by [C,U_1,...,U_N]^T * [1,V_1,...V_N].
Plain wrapper for list of types.
Definition meta.h:276