VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
KernelUtilities.h
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
33//=======================================================================================
34#ifndef GPU_DISTRIBUTION_HELPER_H
35#define GPU_DISTRIBUTION_HELPER_H
36
38
39#include <array>
40#include <cassert>
41#include <optional>
42
43#include <cuda.h>
44#include <cuda_runtime.h>
45
46#include <lbm/constants/D3Q27.h>
47
49
50namespace vf::gpu
51{
52
53inline real getForceFactor(size_t level)
54{
55 using namespace vf::basics::constant;
56
57 real factor = c1o1;
58 for (size_t i = 1; i <= level; i++) {
59 factor *= c2o1;
60 }
61 factor = 1 / factor;
62 return factor;
63}
64
66 const unsigned long long numberOfLBnodes, const bool isEvenTimestep)
67{
68 using namespace vf::lbm::dir;
69
70 if (isEvenTimestep) {
71 dist.f[d000] = &distributionArray[d000 * numberOfLBnodes];
72 dist.f[dP00] = &distributionArray[dP00 * numberOfLBnodes];
73 dist.f[dM00] = &distributionArray[dM00 * numberOfLBnodes];
74 dist.f[d0P0] = &distributionArray[d0P0 * numberOfLBnodes];
75 dist.f[d0M0] = &distributionArray[d0M0 * numberOfLBnodes];
76 dist.f[d00P] = &distributionArray[d00P * numberOfLBnodes];
77 dist.f[d00M] = &distributionArray[d00M * numberOfLBnodes];
78 dist.f[dPP0] = &distributionArray[dPP0 * numberOfLBnodes];
79 dist.f[dMM0] = &distributionArray[dMM0 * numberOfLBnodes];
80 dist.f[dPM0] = &distributionArray[dPM0 * numberOfLBnodes];
81 dist.f[dMP0] = &distributionArray[dMP0 * numberOfLBnodes];
82 dist.f[dP0P] = &distributionArray[dP0P * numberOfLBnodes];
83 dist.f[dM0M] = &distributionArray[dM0M * numberOfLBnodes];
84 dist.f[dP0M] = &distributionArray[dP0M * numberOfLBnodes];
85 dist.f[dM0P] = &distributionArray[dM0P * numberOfLBnodes];
86 dist.f[d0PP] = &distributionArray[d0PP * numberOfLBnodes];
87 dist.f[d0MM] = &distributionArray[d0MM * numberOfLBnodes];
88 dist.f[d0PM] = &distributionArray[d0PM * numberOfLBnodes];
89 dist.f[d0MP] = &distributionArray[d0MP * numberOfLBnodes];
90 dist.f[dPPP] = &distributionArray[dPPP * numberOfLBnodes];
91 dist.f[dMMP] = &distributionArray[dMMP * numberOfLBnodes];
92 dist.f[dPMP] = &distributionArray[dPMP * numberOfLBnodes];
93 dist.f[dMPP] = &distributionArray[dMPP * numberOfLBnodes];
94 dist.f[dPPM] = &distributionArray[dPPM * numberOfLBnodes];
95 dist.f[dMMM] = &distributionArray[dMMM * numberOfLBnodes];
96 dist.f[dPMM] = &distributionArray[dPMM * numberOfLBnodes];
97 dist.f[dMPM] = &distributionArray[dMPM * numberOfLBnodes];
98 } else {
99 dist.f[dM00] = &distributionArray[dP00 * numberOfLBnodes];
100 dist.f[dP00] = &distributionArray[dM00 * numberOfLBnodes];
101 dist.f[d0M0] = &distributionArray[d0P0 * numberOfLBnodes];
102 dist.f[d0P0] = &distributionArray[d0M0 * numberOfLBnodes];
103 dist.f[d00M] = &distributionArray[d00P * numberOfLBnodes];
104 dist.f[d00P] = &distributionArray[d00M * numberOfLBnodes];
105 dist.f[dMM0] = &distributionArray[dPP0 * numberOfLBnodes];
106 dist.f[dPP0] = &distributionArray[dMM0 * numberOfLBnodes];
107 dist.f[dMP0] = &distributionArray[dPM0 * numberOfLBnodes];
108 dist.f[dPM0] = &distributionArray[dMP0 * numberOfLBnodes];
109 dist.f[dM0M] = &distributionArray[dP0P * numberOfLBnodes];
110 dist.f[dP0P] = &distributionArray[dM0M * numberOfLBnodes];
111 dist.f[dM0P] = &distributionArray[dP0M * numberOfLBnodes];
112 dist.f[dP0M] = &distributionArray[dM0P * numberOfLBnodes];
113 dist.f[d0MM] = &distributionArray[d0PP * numberOfLBnodes];
114 dist.f[d0PP] = &distributionArray[d0MM * numberOfLBnodes];
115 dist.f[d0MP] = &distributionArray[d0PM * numberOfLBnodes];
116 dist.f[d0PM] = &distributionArray[d0MP * numberOfLBnodes];
117 dist.f[d000] = &distributionArray[d000 * numberOfLBnodes];
118 dist.f[dPPP] = &distributionArray[dMMM * numberOfLBnodes];
119 dist.f[dMMP] = &distributionArray[dPPM * numberOfLBnodes];
120 dist.f[dPMP] = &distributionArray[dMPM * numberOfLBnodes];
121 dist.f[dMPP] = &distributionArray[dPMM * numberOfLBnodes];
122 dist.f[dPPM] = &distributionArray[dMMP * numberOfLBnodes];
123 dist.f[dMMM] = &distributionArray[dPPP * numberOfLBnodes];
124 dist.f[dPMM] = &distributionArray[dMPP * numberOfLBnodes];
125 dist.f[dMPM] = &distributionArray[dPMP * numberOfLBnodes];
126 }
127}
128
136constexpr DistributionReferences27 getDistributionReferences27(real* distributions, const unsigned long long numberOfLBnodes,
137 const bool isEvenTimestep)
138{
142}
143
145 const unsigned int numberOfSubgridIndices)
146{
147 using namespace vf::lbm::dir;
148
176}
177
178constexpr real getEquilibriumForBC(const real& drho, const real& velocity, const real& cu_sq, const real weight)
179{
180 using namespace vf::basics::constant;
181
182 return weight * (drho + c9o2 * velocity * velocity * (c1o1 + drho) - cu_sq);
183}
184
185constexpr real getInterpolatedDistributionForVeloBC(const real& q, const real& f, const real& fInverse, const real& feq,
186 const real& omega, const real& velocity, const real weight)
187{
188 using namespace vf::basics::constant;
189
190 return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2
191 + (q * (f + fInverse) - c6o1 * weight * velocity) / (c1o1 + q);
192}
193
194constexpr real getBounceBackDistributionForVeloBC(const real& f, const real& velocity, const real weight)
195{
196 using namespace vf::basics::constant;
197
198 return f - (c6o1 * weight * velocity);
199}
200
201constexpr real getInterpolatedDistributionForNoSlipBC(const real& q, const real& f, const real& fInverse, const real& feq,
202 const real& omega)
203{
204 using namespace vf::basics::constant;
205
206 return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2
207 + (q * (f + fInverse)) / (c1o1 + q);
208}
209
211 const real& feq, const real& omega, const real& drho,
212 const real weight)
213{
214 using namespace vf::basics::constant;
215
216 return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2
217 + (q * (f + fInverse)) / (c1o1 + q) - weight * drho;
218}
219
221 const real& feq, const real& omega, const real& drho,
222 const real& velocity, const real weight)
223{
224 using namespace vf::basics::constant;
225
226 return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2
227 + (q * (f + fInverse) - c6o1 * weight * velocity) / (c1o1 + q) - weight * drho;
228}
229
231{
233}
234
236{
237 constexpr ListIndices() = default;
238 constexpr ListIndices(uint index, const uint* neighborX, const uint* neighborY,
239 const uint* neighborZ)
240 {
241 k_000 = index;
242 k_M00 = neighborX[k_000];
243 k_0M0 = neighborY[k_000];
244 k_00M = neighborZ[k_000];
245 k_MM0 = neighborY[k_M00];
246 k_M0M = neighborZ[k_M00];
247 k_0MM = neighborZ[k_0M0];
248 k_MMM = neighborZ[k_MM0];
249 }
250
251 uint k_000 { 0 };
252 uint k_M00 { 0 };
253 uint k_0M0 { 0 };
254 uint k_00M { 0 };
255 uint k_MM0 { 0 };
256 uint k_M0M { 0 };
257 uint k_0MM { 0 };
258 uint k_MMM { 0 };
259
260 constexpr uint k000() const { return k_000; }
261 constexpr uint kP00() const { return k_000; }
262 constexpr uint kM00() const { return k_M00; }
263 constexpr uint k0P0() const { return k_000; }
264 constexpr uint k0M0() const { return k_0M0; }
265 constexpr uint k00P() const { return k_000; }
266 constexpr uint k00M() const { return k_00M; }
267 constexpr uint kPP0() const { return k_000; }
268 constexpr uint kMM0() const { return k_MM0; }
269 constexpr uint kPM0() const { return k_0M0; }
270 constexpr uint kMP0() const { return k_M00; }
271 constexpr uint kP0P() const { return k_000; }
272 constexpr uint kM0M() const { return k_M0M; }
273 constexpr uint kP0M() const { return k_00M; }
274 constexpr uint kM0P() const { return k_M00; }
275 constexpr uint k0PP() const { return k_000; }
276 constexpr uint k0MM() const { return k_0MM; }
277 constexpr uint k0PM() const { return k_00M; }
278 constexpr uint k0MP() const { return k_0M0; }
279 constexpr uint kPPP() const { return k_000; }
280 constexpr uint kMPP() const { return k_M00; }
281 constexpr uint kPMP() const { return k_0M0; }
282 constexpr uint kMMP() const { return k_MM0; }
283 constexpr uint kPPM() const { return k_00M; }
284 constexpr uint kMPM() const { return k_M0M; }
285 constexpr uint kPMM() const { return k_0MM; }
286 constexpr uint kMMM() const { return k_MMM; }
287
288
289 template<size_t direction> constexpr uint getIndex() const;
290};
291
292template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d000>() const { return k000(); }
293template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dP00>() const { return kP00(); }
294template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dM00>() const { return kM00(); }
295template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0P0>() const { return k0P0(); }
296template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0M0>() const { return k0M0(); }
297template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d00P>() const { return k00P(); }
298template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d00M>() const { return k00M(); }
299template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPP0>() const { return kPP0(); }
300template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMM0>() const { return kMM0(); }
301template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPM0>() const { return kPM0(); }
302template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMP0>() const { return kMP0(); }
303template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dP0P>() const { return kP0P(); }
304template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dM0M>() const { return kM0M(); }
305template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dP0M>() const { return kP0M(); }
306template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dM0P>() const { return kM0P(); }
307template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0PP>() const { return k0PP(); }
308template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0MM>() const { return k0MM(); }
309template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0PM>() const { return k0PM(); }
310template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::d0MP>() const { return k0MP(); }
311template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPPP>() const { return kPPP(); }
312template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMPP>() const { return kMPP(); }
313template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPMP>() const { return kPMP(); }
314template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMMP>() const { return kMMP(); }
315template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPPM>() const { return kPPM(); }
316template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMPM>() const { return kMPM(); }
317template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dPMM>() const { return kPMM(); }
318template <> constexpr uint ListIndices::getIndex<vf::lbm::dir::dMMM>() const { return kMMM(); }
319
320template <size_t direction>
323{
324 const size_t inverseDir = vf::lbm::dir::inverseDir<direction>();
325 const uint writeIndex = listIndices.getIndex<inverseDir>();
326 (populationReferences.f[inverseDir])[writeIndex] = population;
327}
328
329template <size_t direction>
332{
333 const size_t inverseDir = vf::lbm::dir::inverseDir<direction>();
334 const uint readIndex = listIndices.getIndex<inverseDir>();
335 return (populationReferences.f[inverseDir])[readIndex];
336}
337
338template <size_t direction>
341{
342 const uint writeIndex = listIndices.getIndex<direction>();
344}
345
346template <size_t direction>
349{
350 const uint readIndex = listIndices.getIndex<direction>();
351 return (populationReferences.f[direction])[readIndex];
352}
353
360{
361 using namespace vf::lbm::dir;
362
363 local[d000] = (global.f[d000])[indices.k_000];
364 local[dP00] = (global.f[dP00])[indices.k_000];
365 local[dM00] = (global.f[dM00])[indices.k_M00];
366 local[d0P0] = (global.f[d0P0])[indices.k_000];
367 local[d0M0] = (global.f[d0M0])[indices.k_0M0];
368 local[d00P] = (global.f[d00P])[indices.k_000];
369 local[d00M] = (global.f[d00M])[indices.k_00M];
370 local[dPP0] = (global.f[dPP0])[indices.k_000];
371 local[dMM0] = (global.f[dMM0])[indices.k_MM0];
372 local[dPM0] = (global.f[dPM0])[indices.k_0M0];
373 local[dMP0] = (global.f[dMP0])[indices.k_M00];
374 local[dP0P] = (global.f[dP0P])[indices.k_000];
375 local[dM0M] = (global.f[dM0M])[indices.k_M0M];
376 local[dP0M] = (global.f[dP0M])[indices.k_00M];
377 local[dM0P] = (global.f[dM0P])[indices.k_M00];
378 local[d0PP] = (global.f[d0PP])[indices.k_000];
379 local[d0MM] = (global.f[d0MM])[indices.k_0MM];
380 local[d0PM] = (global.f[d0PM])[indices.k_00M];
381 local[d0MP] = (global.f[d0MP])[indices.k_0M0];
382 local[dPPP] = (global.f[dPPP])[indices.k_000];
383 local[dMPP] = (global.f[dMPP])[indices.k_M00];
384 local[dPMP] = (global.f[dPMP])[indices.k_0M0];
385 local[dMMP] = (global.f[dMMP])[indices.k_MM0];
386 local[dPPM] = (global.f[dPPM])[indices.k_00M];
387 local[dMPM] = (global.f[dMPM])[indices.k_M0M];
388 local[dPMM] = (global.f[dPMM])[indices.k_0MM];
389 local[dMMM] = (global.f[dMMM])[indices.k_MMM];
390}
391
393{
394 using namespace vf::lbm::dir;
395
396 local[d000] = (global.f[d000])[indices.k_000];
397 local[dM00] = (global.f[dP00])[indices.k_000];
398 local[dP00] = (global.f[dM00])[indices.k_M00];
399 local[d0M0] = (global.f[d0P0])[indices.k_000];
400 local[d0P0] = (global.f[d0M0])[indices.k_0M0];
401 local[d00M] = (global.f[d00P])[indices.k_000];
402 local[d00P] = (global.f[d00M])[indices.k_00M];
403 local[dMM0] = (global.f[dPP0])[indices.k_000];
404 local[dPP0] = (global.f[dMM0])[indices.k_MM0];
405 local[dMP0] = (global.f[dPM0])[indices.k_0M0];
406 local[dPM0] = (global.f[dMP0])[indices.k_M00];
407 local[dM0M] = (global.f[dP0P])[indices.k_000];
408 local[dP0P] = (global.f[dM0M])[indices.k_M0M];
409 local[dM0P] = (global.f[dP0M])[indices.k_00M];
410 local[dP0M] = (global.f[dM0P])[indices.k_M00];
411 local[d0MM] = (global.f[d0PP])[indices.k_000];
412 local[d0PP] = (global.f[d0MM])[indices.k_0MM];
413 local[d0MP] = (global.f[d0PM])[indices.k_00M];
414 local[d0PM] = (global.f[d0MP])[indices.k_0M0];
415 local[dMMM] = (global.f[dPPP])[indices.k_000];
416 local[dPMM] = (global.f[dMPP])[indices.k_M00];
417 local[dMPM] = (global.f[dPMP])[indices.k_0M0];
418 local[dPPM] = (global.f[dMMP])[indices.k_MM0];
419 local[dMMP] = (global.f[dPPM])[indices.k_00M];
420 local[dPMP] = (global.f[dMPM])[indices.k_M0M];
421 local[dMPP] = (global.f[dPMM])[indices.k_0MM];
422 local[dPPP] = (global.f[dMMM])[indices.k_MMM];
423}
424
431{
432 using namespace vf::lbm::dir;
433
434 (global.f[d000])[indices.k_000] = local[d000];
435 (global.f[dP00])[indices.k_000] = local[dP00];
436 (global.f[dM00])[indices.k_M00] = local[dM00];
437 (global.f[d0P0])[indices.k_000] = local[d0P0];
438 (global.f[d0M0])[indices.k_0M0] = local[d0M0];
439 (global.f[d00P])[indices.k_000] = local[d00P];
440 (global.f[d00M])[indices.k_00M] = local[d00M];
441 (global.f[dPP0])[indices.k_000] = local[dPP0];
442 (global.f[dMM0])[indices.k_MM0] = local[dMM0];
443 (global.f[dPM0])[indices.k_0M0] = local[dPM0];
444 (global.f[dMP0])[indices.k_M00] = local[dMP0];
445 (global.f[dP0P])[indices.k_000] = local[dP0P];
446 (global.f[dM0M])[indices.k_M0M] = local[dM0M];
447 (global.f[dP0M])[indices.k_00M] = local[dP0M];
448 (global.f[dM0P])[indices.k_M00] = local[dM0P];
449 (global.f[d0PP])[indices.k_000] = local[d0PP];
450 (global.f[d0MM])[indices.k_0MM] = local[d0MM];
451 (global.f[d0PM])[indices.k_00M] = local[d0PM];
452 (global.f[d0MP])[indices.k_0M0] = local[d0MP];
453 (global.f[dPPP])[indices.k_000] = local[dPPP];
454 (global.f[dMPP])[indices.k_M00] = local[dMPP];
455 (global.f[dPMP])[indices.k_0M0] = local[dPMP];
456 (global.f[dMMP])[indices.k_MM0] = local[dMMP];
457 (global.f[dPPM])[indices.k_00M] = local[dPPM];
458 (global.f[dMPM])[indices.k_M0M] = local[dMPM];
459 (global.f[dPMM])[indices.k_0MM] = local[dPMM];
460 (global.f[dMMM])[indices.k_MMM] = local[dMMM];
461}
462
464{
465 using namespace vf::lbm::dir;
466
467 (global.f[d000])[indices.k_000] = local[d000];
468 (global.f[dP00])[indices.k_000] = local[dM00];
469 (global.f[dM00])[indices.k_M00] = local[dP00];
470 (global.f[d0P0])[indices.k_000] = local[d0M0];
471 (global.f[d0M0])[indices.k_0M0] = local[d0P0];
472 (global.f[d00P])[indices.k_000] = local[d00M];
473 (global.f[d00M])[indices.k_00M] = local[d00P];
474 (global.f[dPP0])[indices.k_000] = local[dMM0];
475 (global.f[dMM0])[indices.k_MM0] = local[dPP0];
476 (global.f[dPM0])[indices.k_0M0] = local[dMP0];
477 (global.f[dMP0])[indices.k_M00] = local[dPM0];
478 (global.f[dP0P])[indices.k_000] = local[dM0M];
479 (global.f[dM0M])[indices.k_M0M] = local[dP0P];
480 (global.f[dP0M])[indices.k_00M] = local[dM0P];
481 (global.f[dM0P])[indices.k_M00] = local[dP0M];
482 (global.f[d0PP])[indices.k_000] = local[d0MM];
483 (global.f[d0MM])[indices.k_0MM] = local[d0PP];
484 (global.f[d0PM])[indices.k_00M] = local[d0MP];
485 (global.f[d0MP])[indices.k_0M0] = local[d0PM];
486 (global.f[dPPP])[indices.k_000] = local[dMMM];
487 (global.f[dMPP])[indices.k_M00] = local[dPMM];
488 (global.f[dPMP])[indices.k_0M0] = local[dMPM];
489 (global.f[dMMP])[indices.k_MM0] = local[dPPM];
490 (global.f[dPPM])[indices.k_00M] = local[dMMP];
491 (global.f[dMPM])[indices.k_M0M] = local[dPMP];
492 (global.f[dPMM])[indices.k_0MM] = local[dMPP];
493 (global.f[dMMM])[indices.k_MMM] = local[dPPP];
494}
495
496}
497
498#endif
499
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
unsigned int uint
Definition DataTypes.h:47
#define GEO_PM_2
Definition Calculation.h:41
#define GEO_PM_1
Definition Calculation.h:40
#define GEO_PM_0
Definition Calculation.h:39
#define GEO_FLUID
Definition Calculation.h:45
constexpr real getInterpolatedDistributionForNoSlipBC(const real &q, const real &f, const real &fInverse, const real &feq, const real &omega)
constexpr void getPostCollisionDistribution(real *local, const Distributions27 &global, const ListIndices &indices)
constexpr void writeInSameDirection(const real population, const ListIndices &listIndices, const Distributions27 &populationReferences)
constexpr void setPostCollisionDistribution(Distributions27 &global, const ListIndices &indices, const real *local)
constexpr real getEquilibriumForBC(const real &drho, const real &velocity, const real &cu_sq, const real weight)
constexpr void getPreCollisionDistribution(real *local, const Distributions27 &global, const ListIndices &indices)
constexpr void setPreCollisionDistribution(Distributions27 &global, const ListIndices &indices, const real *local)
constexpr real getInterpolatedDistributionForNoSlipWithPressureBC(const real &q, const real &f, const real &fInverse, const real &feq, const real &omega, const real &drho, const real weight)
real getForceFactor(size_t level)
constexpr void writeInInverseDirection(const real population, const ListIndices &listIndices, const Distributions27 &populationReferences)
constexpr void getPointersToSubgridDistances(SubgridDistances27 &subgridD, real *subgridDistances, const unsigned int numberOfSubgridIndices)
constexpr real getBounceBackDistributionForVeloBC(const real &f, const real &velocity, const real weight)
constexpr void getPointersToDistributions(Distributions27 &dist, real *distributionArray, const unsigned long long numberOfLBnodes, const bool isEvenTimestep)
constexpr real getInterpolatedDistributionForVeloBC(const real &q, const real &f, const real &fInverse, const real &feq, const real &omega, const real &velocity, const real weight)
constexpr bool isValidFluidNode(uint nodeType)
constexpr DistributionReferences27 getDistributionReferences27(real *distributions, const unsigned long long numberOfLBnodes, const bool isEvenTimestep)
constexpr real readFromSameDirection(const ListIndices &listIndices, const Distributions27 &populationReferences)
constexpr real readFromInverseDirection(const ListIndices &listIndices, const Distributions27 &populationReferences)
constexpr real getInterpolatedDistributionForVeloWithPressureBC(const real &q, const real &f, const real &fInverse, const real &feq, const real &omega, const real &drho, const real &velocity, const real weight)
constexpr uint kPM0() const
constexpr uint kMM0() const
constexpr uint kM0M() const
constexpr uint kMPP() const
constexpr uint k0M0() const
constexpr uint kPMP() const
constexpr uint kPPP() const
constexpr uint kPP0() const
constexpr uint kPMM() const
constexpr uint k00P() const
constexpr uint kP0P() const
constexpr uint kM00() const
constexpr uint k0MM() const
constexpr uint k0PP() const
constexpr uint k0MP() const
constexpr uint kM0P() const
constexpr uint k00M() const
constexpr ListIndices()=default
constexpr uint k000() const
constexpr ListIndices(uint index, const uint *neighborX, const uint *neighborY, const uint *neighborZ)
constexpr uint kMPM() const
constexpr uint kP0M() const
constexpr uint k0PM() const
constexpr uint kMMP() const
constexpr uint k0P0() const
constexpr uint kMP0() const
constexpr uint kPPM() const
constexpr uint kP00() const
constexpr uint kMMM() const
constexpr uint getIndex() const