ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Dynamic_UBB_double_precision.h
Go to the documentation of this file.
1//======================================================================================================================
2//
3// This file is part of waLBerla. waLBerla is free software: you can
4// redistribute it and/or modify it under the terms of the GNU General Public
5// License as published by the Free Software Foundation, either version 3 of
6// the License, or (at your option) any later version.
7//
8// waLBerla is distributed in the hope that it will be useful, but WITHOUT
9// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11// for more details.
12//
13// You should have received a copy of the GNU General Public License along
14// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
15//
16//! \\file Dynamic_UBB_double_precision.h
17//! \\author pystencils
18//======================================================================================================================
19
20// kernel generated with pystencils v1.3.3, lbmpy v1.3.3,
21// lbmpy_walberla/pystencils_walberla from waLBerla commit
22// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f
23
24#pragma once
25#include "core/DataTypes.h"
26#include "core/logging/Logging.h"
27
28#include "blockforest/StructuredBlockForest.h"
29#include "core/debug/Debug.h"
30#include "domain_decomposition/BlockDataID.h"
31#include "domain_decomposition/IBlock.h"
32#include "field/FlagField.h"
33#include "field/GhostLayerField.h"
34
35#include <set>
36#include <vector>
37
38#ifdef __GNUC__
39#define RESTRICT __restrict__
40#elif _MSC_VER
41#define RESTRICT __restrict
42#else
43#define RESTRICT
44#endif
45
46#ifdef WALBERLA_BUILD_WITH_HALF_PRECISION_SUPPORT
47using walberla::half;
48#endif
49
50namespace walberla {
51namespace lbm {
52
54public:
55 struct IndexInfo {
56 int32_t x;
57 int32_t y;
58 int32_t z;
59 int32_t dir;
60 double vel_0;
61 double vel_1;
62 double vel_2;
63 IndexInfo(int32_t x_, int32_t y_, int32_t z_, int32_t dir_)
64 : x(x_), y(y_), z(z_), dir(dir_), vel_0(), vel_1(), vel_2() {}
65 bool operator==(const IndexInfo &o) const {
66 return x == o.x && y == o.y && z == o.z && dir == o.dir &&
67 floatIsEqual(vel_0, o.vel_0) && floatIsEqual(vel_1, o.vel_1) &&
68 floatIsEqual(vel_2, o.vel_2);
69 }
70 };
71
73 public:
74 using CpuIndexVector = std::vector<IndexInfo>;
75
76 enum Type { ALL = 0, INNER = 1, OUTER = 2, NUM_TYPES = 3 };
77
78 IndexVectors() = default;
79 bool operator==(IndexVectors const &other) const {
80 return other.cpuVectors_ == cpuVectors_;
81 }
82
83 CpuIndexVector &indexVector(Type t) { return cpuVectors_[t]; }
84 IndexInfo *pointerCpu(Type t) { return cpuVectors_[t].data(); }
85
86 void syncGPU() {}
87
88 private:
89 std::vector<CpuIndexVector> cpuVectors_{NUM_TYPES};
90 };
91
93 const shared_ptr<StructuredBlockForest> &blocks, BlockDataID pdfsID_,
94 std::function<Vector3<double>(const Cell &,
95 const shared_ptr<StructuredBlockForest> &,
96 IBlock &)> &velocityCallback)
97 : elementInitialiser(velocityCallback), pdfsID(pdfsID_) {
98 auto createIdxVector = [](IBlock *const, StructuredBlockStorage *const) {
99 return new IndexVectors();
100 };
101 indexVectorID = blocks->addStructuredBlockData<IndexVectors>(
102 createIdxVector, "IndexField_Dynamic_UBB_double_precision");
103 };
104
105 void run(IBlock *block);
106
107 void operator()(IBlock *block) { run(block); }
108
109 void inner(IBlock *block);
110
111 void outer(IBlock *block);
112
113 std::function<void(IBlock *)> getSweep() {
114 return [this](IBlock *b) { this->run(b); };
115 }
116
117 std::function<void(IBlock *)> getInnerSweep() {
118 return [this](IBlock *b) { this->inner(b); };
119 }
120
121 std::function<void(IBlock *)> getOuterSweep() {
122 return [this](IBlock *b) { this->outer(b); };
123 }
124
125 template <typename FlagField_T>
126 void fillFromFlagField(const shared_ptr<StructuredBlockForest> &blocks,
127 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
128 FlagUID domainFlagUID) {
129 for (auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
130 fillFromFlagField<FlagField_T>(blocks, &*blockIt, flagFieldID,
131 boundaryFlagUID, domainFlagUID);
132 }
133
134 template <typename FlagField_T>
135 void fillFromFlagField(const shared_ptr<StructuredBlockForest> &blocks,
136 IBlock *block, ConstBlockDataID flagFieldID,
137 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
138 auto *indexVectors = block->getData<IndexVectors>(indexVectorID);
139 auto &indexVectorAll = indexVectors->indexVector(IndexVectors::ALL);
140 auto &indexVectorInner = indexVectors->indexVector(IndexVectors::INNER);
141 auto &indexVectorOuter = indexVectors->indexVector(IndexVectors::OUTER);
142
143 auto *flagField = block->getData<FlagField_T>(flagFieldID);
144
145 if (!(flagField->flagExists(boundaryFlagUID) &&
146 flagField->flagExists(domainFlagUID)))
147 return;
148
149 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
150 auto domainFlag = flagField->getFlag(domainFlagUID);
151
152 auto inner = flagField->xyzSize();
153 inner.expand(cell_idx_t(-1));
154
155 indexVectorAll.clear();
156 indexVectorInner.clear();
157 indexVectorOuter.clear();
158
159 for (auto it = flagField->beginWithGhostLayerXYZ(
160 cell_idx_c(flagField->nrOfGhostLayers() - 1));
161 it != flagField->end(); ++it) {
162 if (!isFlagSet(it, domainFlag))
163 continue;
164
165 if (isFlagSet(it.neighbor(0, 0, 0, 0), boundaryFlag)) {
166 auto element = IndexInfo(it.x(), it.y(), it.z(), 0);
167 auto const InitialisationAdditionalData = elementInitialiser(
168 Cell(it.x() + 0, it.y() + 0, it.z() + 0), blocks, *block);
169 element.vel_0 = InitialisationAdditionalData[0];
170 element.vel_1 = InitialisationAdditionalData[1];
171 element.vel_2 = InitialisationAdditionalData[2];
172 indexVectorAll.push_back(element);
173 if (inner.contains(it.x(), it.y(), it.z()))
174 indexVectorInner.push_back(element);
175 else
176 indexVectorOuter.push_back(element);
177 }
178 }
179
180 for (auto it = flagField->beginWithGhostLayerXYZ(
181 cell_idx_c(flagField->nrOfGhostLayers() - 1));
182 it != flagField->end(); ++it) {
183 if (!isFlagSet(it, domainFlag))
184 continue;
185
186 if (isFlagSet(it.neighbor(0, 1, 0, 0), boundaryFlag)) {
187 auto element = IndexInfo(it.x(), it.y(), it.z(), 1);
188 auto const InitialisationAdditionalData = elementInitialiser(
189 Cell(it.x() + 0, it.y() + 1, it.z() + 0), blocks, *block);
190 element.vel_0 = InitialisationAdditionalData[0];
191 element.vel_1 = InitialisationAdditionalData[1];
192 element.vel_2 = InitialisationAdditionalData[2];
193 indexVectorAll.push_back(element);
194 if (inner.contains(it.x(), it.y(), it.z()))
195 indexVectorInner.push_back(element);
196 else
197 indexVectorOuter.push_back(element);
198 }
199 }
200
201 for (auto it = flagField->beginWithGhostLayerXYZ(
202 cell_idx_c(flagField->nrOfGhostLayers() - 1));
203 it != flagField->end(); ++it) {
204 if (!isFlagSet(it, domainFlag))
205 continue;
206
207 if (isFlagSet(it.neighbor(0, -1, 0, 0), boundaryFlag)) {
208 auto element = IndexInfo(it.x(), it.y(), it.z(), 2);
209 auto const InitialisationAdditionalData = elementInitialiser(
210 Cell(it.x() + 0, it.y() - 1, it.z() + 0), blocks, *block);
211 element.vel_0 = InitialisationAdditionalData[0];
212 element.vel_1 = InitialisationAdditionalData[1];
213 element.vel_2 = InitialisationAdditionalData[2];
214 indexVectorAll.push_back(element);
215 if (inner.contains(it.x(), it.y(), it.z()))
216 indexVectorInner.push_back(element);
217 else
218 indexVectorOuter.push_back(element);
219 }
220 }
221
222 for (auto it = flagField->beginWithGhostLayerXYZ(
223 cell_idx_c(flagField->nrOfGhostLayers() - 1));
224 it != flagField->end(); ++it) {
225 if (!isFlagSet(it, domainFlag))
226 continue;
227
228 if (isFlagSet(it.neighbor(-1, 0, 0, 0), boundaryFlag)) {
229 auto element = IndexInfo(it.x(), it.y(), it.z(), 3);
230 auto const InitialisationAdditionalData = elementInitialiser(
231 Cell(it.x() - 1, it.y() + 0, it.z() + 0), blocks, *block);
232 element.vel_0 = InitialisationAdditionalData[0];
233 element.vel_1 = InitialisationAdditionalData[1];
234 element.vel_2 = InitialisationAdditionalData[2];
235 indexVectorAll.push_back(element);
236 if (inner.contains(it.x(), it.y(), it.z()))
237 indexVectorInner.push_back(element);
238 else
239 indexVectorOuter.push_back(element);
240 }
241 }
242
243 for (auto it = flagField->beginWithGhostLayerXYZ(
244 cell_idx_c(flagField->nrOfGhostLayers() - 1));
245 it != flagField->end(); ++it) {
246 if (!isFlagSet(it, domainFlag))
247 continue;
248
249 if (isFlagSet(it.neighbor(1, 0, 0, 0), boundaryFlag)) {
250 auto element = IndexInfo(it.x(), it.y(), it.z(), 4);
251 auto const InitialisationAdditionalData = elementInitialiser(
252 Cell(it.x() + 1, it.y() + 0, it.z() + 0), blocks, *block);
253 element.vel_0 = InitialisationAdditionalData[0];
254 element.vel_1 = InitialisationAdditionalData[1];
255 element.vel_2 = InitialisationAdditionalData[2];
256 indexVectorAll.push_back(element);
257 if (inner.contains(it.x(), it.y(), it.z()))
258 indexVectorInner.push_back(element);
259 else
260 indexVectorOuter.push_back(element);
261 }
262 }
263
264 for (auto it = flagField->beginWithGhostLayerXYZ(
265 cell_idx_c(flagField->nrOfGhostLayers() - 1));
266 it != flagField->end(); ++it) {
267 if (!isFlagSet(it, domainFlag))
268 continue;
269
270 if (isFlagSet(it.neighbor(0, 0, 1, 0), boundaryFlag)) {
271 auto element = IndexInfo(it.x(), it.y(), it.z(), 5);
272 auto const InitialisationAdditionalData = elementInitialiser(
273 Cell(it.x() + 0, it.y() + 0, it.z() + 1), blocks, *block);
274 element.vel_0 = InitialisationAdditionalData[0];
275 element.vel_1 = InitialisationAdditionalData[1];
276 element.vel_2 = InitialisationAdditionalData[2];
277 indexVectorAll.push_back(element);
278 if (inner.contains(it.x(), it.y(), it.z()))
279 indexVectorInner.push_back(element);
280 else
281 indexVectorOuter.push_back(element);
282 }
283 }
284
285 for (auto it = flagField->beginWithGhostLayerXYZ(
286 cell_idx_c(flagField->nrOfGhostLayers() - 1));
287 it != flagField->end(); ++it) {
288 if (!isFlagSet(it, domainFlag))
289 continue;
290
291 if (isFlagSet(it.neighbor(0, 0, -1, 0), boundaryFlag)) {
292 auto element = IndexInfo(it.x(), it.y(), it.z(), 6);
293 auto const InitialisationAdditionalData = elementInitialiser(
294 Cell(it.x() + 0, it.y() + 0, it.z() - 1), blocks, *block);
295 element.vel_0 = InitialisationAdditionalData[0];
296 element.vel_1 = InitialisationAdditionalData[1];
297 element.vel_2 = InitialisationAdditionalData[2];
298 indexVectorAll.push_back(element);
299 if (inner.contains(it.x(), it.y(), it.z()))
300 indexVectorInner.push_back(element);
301 else
302 indexVectorOuter.push_back(element);
303 }
304 }
305
306 for (auto it = flagField->beginWithGhostLayerXYZ(
307 cell_idx_c(flagField->nrOfGhostLayers() - 1));
308 it != flagField->end(); ++it) {
309 if (!isFlagSet(it, domainFlag))
310 continue;
311
312 if (isFlagSet(it.neighbor(-1, 1, 0, 0), boundaryFlag)) {
313 auto element = IndexInfo(it.x(), it.y(), it.z(), 7);
314 auto const InitialisationAdditionalData = elementInitialiser(
315 Cell(it.x() - 1, it.y() + 1, it.z() + 0), blocks, *block);
316 element.vel_0 = InitialisationAdditionalData[0];
317 element.vel_1 = InitialisationAdditionalData[1];
318 element.vel_2 = InitialisationAdditionalData[2];
319 indexVectorAll.push_back(element);
320 if (inner.contains(it.x(), it.y(), it.z()))
321 indexVectorInner.push_back(element);
322 else
323 indexVectorOuter.push_back(element);
324 }
325 }
326
327 for (auto it = flagField->beginWithGhostLayerXYZ(
328 cell_idx_c(flagField->nrOfGhostLayers() - 1));
329 it != flagField->end(); ++it) {
330 if (!isFlagSet(it, domainFlag))
331 continue;
332
333 if (isFlagSet(it.neighbor(1, 1, 0, 0), boundaryFlag)) {
334 auto element = IndexInfo(it.x(), it.y(), it.z(), 8);
335 auto const InitialisationAdditionalData = elementInitialiser(
336 Cell(it.x() + 1, it.y() + 1, it.z() + 0), blocks, *block);
337 element.vel_0 = InitialisationAdditionalData[0];
338 element.vel_1 = InitialisationAdditionalData[1];
339 element.vel_2 = InitialisationAdditionalData[2];
340 indexVectorAll.push_back(element);
341 if (inner.contains(it.x(), it.y(), it.z()))
342 indexVectorInner.push_back(element);
343 else
344 indexVectorOuter.push_back(element);
345 }
346 }
347
348 for (auto it = flagField->beginWithGhostLayerXYZ(
349 cell_idx_c(flagField->nrOfGhostLayers() - 1));
350 it != flagField->end(); ++it) {
351 if (!isFlagSet(it, domainFlag))
352 continue;
353
354 if (isFlagSet(it.neighbor(-1, -1, 0, 0), boundaryFlag)) {
355 auto element = IndexInfo(it.x(), it.y(), it.z(), 9);
356 auto const InitialisationAdditionalData = elementInitialiser(
357 Cell(it.x() - 1, it.y() - 1, it.z() + 0), blocks, *block);
358 element.vel_0 = InitialisationAdditionalData[0];
359 element.vel_1 = InitialisationAdditionalData[1];
360 element.vel_2 = InitialisationAdditionalData[2];
361 indexVectorAll.push_back(element);
362 if (inner.contains(it.x(), it.y(), it.z()))
363 indexVectorInner.push_back(element);
364 else
365 indexVectorOuter.push_back(element);
366 }
367 }
368
369 for (auto it = flagField->beginWithGhostLayerXYZ(
370 cell_idx_c(flagField->nrOfGhostLayers() - 1));
371 it != flagField->end(); ++it) {
372 if (!isFlagSet(it, domainFlag))
373 continue;
374
375 if (isFlagSet(it.neighbor(1, -1, 0, 0), boundaryFlag)) {
376 auto element = IndexInfo(it.x(), it.y(), it.z(), 10);
377 auto const InitialisationAdditionalData = elementInitialiser(
378 Cell(it.x() + 1, it.y() - 1, it.z() + 0), blocks, *block);
379 element.vel_0 = InitialisationAdditionalData[0];
380 element.vel_1 = InitialisationAdditionalData[1];
381 element.vel_2 = InitialisationAdditionalData[2];
382 indexVectorAll.push_back(element);
383 if (inner.contains(it.x(), it.y(), it.z()))
384 indexVectorInner.push_back(element);
385 else
386 indexVectorOuter.push_back(element);
387 }
388 }
389
390 for (auto it = flagField->beginWithGhostLayerXYZ(
391 cell_idx_c(flagField->nrOfGhostLayers() - 1));
392 it != flagField->end(); ++it) {
393 if (!isFlagSet(it, domainFlag))
394 continue;
395
396 if (isFlagSet(it.neighbor(0, 1, 1, 0), boundaryFlag)) {
397 auto element = IndexInfo(it.x(), it.y(), it.z(), 11);
398 auto const InitialisationAdditionalData = elementInitialiser(
399 Cell(it.x() + 0, it.y() + 1, it.z() + 1), blocks, *block);
400 element.vel_0 = InitialisationAdditionalData[0];
401 element.vel_1 = InitialisationAdditionalData[1];
402 element.vel_2 = InitialisationAdditionalData[2];
403 indexVectorAll.push_back(element);
404 if (inner.contains(it.x(), it.y(), it.z()))
405 indexVectorInner.push_back(element);
406 else
407 indexVectorOuter.push_back(element);
408 }
409 }
410
411 for (auto it = flagField->beginWithGhostLayerXYZ(
412 cell_idx_c(flagField->nrOfGhostLayers() - 1));
413 it != flagField->end(); ++it) {
414 if (!isFlagSet(it, domainFlag))
415 continue;
416
417 if (isFlagSet(it.neighbor(0, -1, 1, 0), boundaryFlag)) {
418 auto element = IndexInfo(it.x(), it.y(), it.z(), 12);
419 auto const InitialisationAdditionalData = elementInitialiser(
420 Cell(it.x() + 0, it.y() - 1, it.z() + 1), blocks, *block);
421 element.vel_0 = InitialisationAdditionalData[0];
422 element.vel_1 = InitialisationAdditionalData[1];
423 element.vel_2 = InitialisationAdditionalData[2];
424 indexVectorAll.push_back(element);
425 if (inner.contains(it.x(), it.y(), it.z()))
426 indexVectorInner.push_back(element);
427 else
428 indexVectorOuter.push_back(element);
429 }
430 }
431
432 for (auto it = flagField->beginWithGhostLayerXYZ(
433 cell_idx_c(flagField->nrOfGhostLayers() - 1));
434 it != flagField->end(); ++it) {
435 if (!isFlagSet(it, domainFlag))
436 continue;
437
438 if (isFlagSet(it.neighbor(-1, 0, 1, 0), boundaryFlag)) {
439 auto element = IndexInfo(it.x(), it.y(), it.z(), 13);
440 auto const InitialisationAdditionalData = elementInitialiser(
441 Cell(it.x() - 1, it.y() + 0, it.z() + 1), blocks, *block);
442 element.vel_0 = InitialisationAdditionalData[0];
443 element.vel_1 = InitialisationAdditionalData[1];
444 element.vel_2 = InitialisationAdditionalData[2];
445 indexVectorAll.push_back(element);
446 if (inner.contains(it.x(), it.y(), it.z()))
447 indexVectorInner.push_back(element);
448 else
449 indexVectorOuter.push_back(element);
450 }
451 }
452
453 for (auto it = flagField->beginWithGhostLayerXYZ(
454 cell_idx_c(flagField->nrOfGhostLayers() - 1));
455 it != flagField->end(); ++it) {
456 if (!isFlagSet(it, domainFlag))
457 continue;
458
459 if (isFlagSet(it.neighbor(1, 0, 1, 0), boundaryFlag)) {
460 auto element = IndexInfo(it.x(), it.y(), it.z(), 14);
461 auto const InitialisationAdditionalData = elementInitialiser(
462 Cell(it.x() + 1, it.y() + 0, it.z() + 1), blocks, *block);
463 element.vel_0 = InitialisationAdditionalData[0];
464 element.vel_1 = InitialisationAdditionalData[1];
465 element.vel_2 = InitialisationAdditionalData[2];
466 indexVectorAll.push_back(element);
467 if (inner.contains(it.x(), it.y(), it.z()))
468 indexVectorInner.push_back(element);
469 else
470 indexVectorOuter.push_back(element);
471 }
472 }
473
474 for (auto it = flagField->beginWithGhostLayerXYZ(
475 cell_idx_c(flagField->nrOfGhostLayers() - 1));
476 it != flagField->end(); ++it) {
477 if (!isFlagSet(it, domainFlag))
478 continue;
479
480 if (isFlagSet(it.neighbor(0, 1, -1, 0), boundaryFlag)) {
481 auto element = IndexInfo(it.x(), it.y(), it.z(), 15);
482 auto const InitialisationAdditionalData = elementInitialiser(
483 Cell(it.x() + 0, it.y() + 1, it.z() - 1), blocks, *block);
484 element.vel_0 = InitialisationAdditionalData[0];
485 element.vel_1 = InitialisationAdditionalData[1];
486 element.vel_2 = InitialisationAdditionalData[2];
487 indexVectorAll.push_back(element);
488 if (inner.contains(it.x(), it.y(), it.z()))
489 indexVectorInner.push_back(element);
490 else
491 indexVectorOuter.push_back(element);
492 }
493 }
494
495 for (auto it = flagField->beginWithGhostLayerXYZ(
496 cell_idx_c(flagField->nrOfGhostLayers() - 1));
497 it != flagField->end(); ++it) {
498 if (!isFlagSet(it, domainFlag))
499 continue;
500
501 if (isFlagSet(it.neighbor(0, -1, -1, 0), boundaryFlag)) {
502 auto element = IndexInfo(it.x(), it.y(), it.z(), 16);
503 auto const InitialisationAdditionalData = elementInitialiser(
504 Cell(it.x() + 0, it.y() - 1, it.z() - 1), blocks, *block);
505 element.vel_0 = InitialisationAdditionalData[0];
506 element.vel_1 = InitialisationAdditionalData[1];
507 element.vel_2 = InitialisationAdditionalData[2];
508 indexVectorAll.push_back(element);
509 if (inner.contains(it.x(), it.y(), it.z()))
510 indexVectorInner.push_back(element);
511 else
512 indexVectorOuter.push_back(element);
513 }
514 }
515
516 for (auto it = flagField->beginWithGhostLayerXYZ(
517 cell_idx_c(flagField->nrOfGhostLayers() - 1));
518 it != flagField->end(); ++it) {
519 if (!isFlagSet(it, domainFlag))
520 continue;
521
522 if (isFlagSet(it.neighbor(-1, 0, -1, 0), boundaryFlag)) {
523 auto element = IndexInfo(it.x(), it.y(), it.z(), 17);
524 auto const InitialisationAdditionalData = elementInitialiser(
525 Cell(it.x() - 1, it.y() + 0, it.z() - 1), blocks, *block);
526 element.vel_0 = InitialisationAdditionalData[0];
527 element.vel_1 = InitialisationAdditionalData[1];
528 element.vel_2 = InitialisationAdditionalData[2];
529 indexVectorAll.push_back(element);
530 if (inner.contains(it.x(), it.y(), it.z()))
531 indexVectorInner.push_back(element);
532 else
533 indexVectorOuter.push_back(element);
534 }
535 }
536
537 for (auto it = flagField->beginWithGhostLayerXYZ(
538 cell_idx_c(flagField->nrOfGhostLayers() - 1));
539 it != flagField->end(); ++it) {
540 if (!isFlagSet(it, domainFlag))
541 continue;
542
543 if (isFlagSet(it.neighbor(1, 0, -1, 0), boundaryFlag)) {
544 auto element = IndexInfo(it.x(), it.y(), it.z(), 18);
545 auto const InitialisationAdditionalData = elementInitialiser(
546 Cell(it.x() + 1, it.y() + 0, it.z() - 1), blocks, *block);
547 element.vel_0 = InitialisationAdditionalData[0];
548 element.vel_1 = InitialisationAdditionalData[1];
549 element.vel_2 = InitialisationAdditionalData[2];
550 indexVectorAll.push_back(element);
551 if (inner.contains(it.x(), it.y(), it.z()))
552 indexVectorInner.push_back(element);
553 else
554 indexVectorOuter.push_back(element);
555 }
556 }
557
558 indexVectors->syncGPU();
559 }
560
561private:
562 void run_impl(IBlock *block, IndexVectors::Type type);
563
564 BlockDataID indexVectorID;
565 std::function<Vector3<double>(
566 const Cell &, const shared_ptr<StructuredBlockForest> &, IBlock &)>
567 elementInitialiser;
568
569public:
570 BlockDataID pdfsID;
571};
572
573} // namespace lbm
574} // namespace walberla
Definition Cell.hpp:97
void fillFromFlagField(const shared_ptr< StructuredBlockForest > &blocks, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
Dynamic_UBB_double_precision(const shared_ptr< StructuredBlockForest > &blocks, BlockDataID pdfsID_, std::function< Vector3< double >(const Cell &, const shared_ptr< StructuredBlockForest > &, IBlock &)> &velocityCallback)
void fillFromFlagField(const shared_ptr< StructuredBlockForest > &blocks, IBlock *block, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
static double * block(double *p, std::size_t index, std::size_t size)
Definition elc.cpp:172
\file PackInfoPdfDoublePrecision.cpp \author pystencils
IndexInfo(int32_t x_, int32_t y_, int32_t z_, int32_t dir_)