VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
Parameter.cpp
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#include "Parameter.h"
37
38#include <cmath>
39#include <cstdio>
40#include <cstdlib>
41#include <optional>
42
43#ifdef __clang__
44#pragma clang diagnostic push
45#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
46#pragma clang diagnostic ignored "-Wunused-but-set-parameter"
47#endif
48#include <curand_kernel.h>
49#ifdef __clang__
50#pragma clang diagnostic pop
51#endif
52
54
57
58#include <logger/Logger.h>
60
61using namespace vf::basics::constant;
62namespace vf::gpu {
63
65
67
68Parameter::Parameter(int numberOfProcesses, int myId) : Parameter(numberOfProcesses, myId, {}) {}
69
70Parameter::Parameter(int numberOfProcesses, int myId, std::optional<const vf::basics::ConfigurationFile*> configData)
71{
72 this->numprocs = numberOfProcesses;
73 this->myProcessId = myId;
74
75 this->setQuadricLimiters(0.01, 0.01, 0.01);
76 this->setForcing(0.0, 0.0, 0.0);
77
78 if(configData)
79 readConfigData(**configData);
80
81 initGridPaths();
82 initGridBasePoints();
83 initDefaultLBMkernelAllLevels();
84
85 this->cudaStreamManager = std::make_unique<CudaStreamManager>();
86}
87
88Parameter::~Parameter() = default;
89
90void Parameter::readConfigData(const vf::basics::ConfigurationFile &configData)
91{
92 if (configData.contains("NumberOfDevices"))
93 this->setMaxDev(configData.getValue<int>("NumberOfDevices"));
95 if (configData.contains("Devices"))
96 this->setDevices(configData.getVector<uint>("Devices"));
98 if (configData.contains("Path"))
99 this->setOutputPath(configData.getValue<std::string>("Path"));
101 if (configData.contains("Prefix"))
102 this->setOutputPrefix(configData.getValue<std::string>("Prefix"));
104 if (configData.contains("WriteGrid"))
105 this->setPrintFiles(configData.getValue<bool>("WriteGrid"));
107 if (configData.contains("GeometryValues"))
108 this->setUseGeometryValues(configData.getValue<bool>("GeometryValues"));
110 if (configData.contains("calc2ndOrderMoments"))
111 this->setCalc2ndOrderMoments(configData.getValue<bool>("calc2ndOrderMoments"));
113 if (configData.contains("calc3rdOrderMoments"))
114 this->setCalc3rdOrderMoments(configData.getValue<bool>("calc3rdOrderMoments"));
116 if (configData.contains("calcHigherOrderMoments"))
117 this->setCalcHighOrderMoments(configData.getValue<bool>("calcHigherOrderMoments"));
119 if (configData.contains("calcMean"))
120 this->setCalcMean(configData.getValue<bool>("calcMean"));
122 if (configData.contains("calcCp"))
123 this->calcCp = configData.getValue<bool>("calcCp");
125 if (configData.contains("calcDrafLift"))
126 this->calcDragLift = configData.getValue<bool>("calcDrafLift");
128 if (configData.contains("UseMeasurePoints"))
129 this->setUseMeasurePoints(configData.getValue<bool>("UseMeasurePoints"));
131 if (configData.contains("UseInitNeq"))
132 this->setUseInitNeq(configData.getValue<bool>("UseInitNeq"));
134 if (configData.contains("D3Qxx"))
135 this->setD3Qxx(configData.getValue<int>("D3Qxx"));
137 if (configData.contains("TimeEnd"))
138 this->setTimestepEnd(configData.getValue<int>("TimeEnd"));
140 if (configData.contains("TimeOut"))
141 this->setTimestepOut(configData.getValue<int>("TimeOut"));
143 if (configData.contains("TimeStartOut"))
144 this->setTimestepStartOut(configData.getValue<int>("TimeStartOut"));
146 if (configData.contains("TimeStartCalcMean"))
147 this->setTimeCalcMedStart(configData.getValue<int>("TimeStartCalcMean"));
149 if (configData.contains("TimeEndCalcMean"))
150 this->setTimeCalcMedEnd(configData.getValue<int>("TimeEndCalcMean"));
151
153 // second component
154 if (configData.contains("DiffOn"))
155 this->setDiffOn(configData.getValue<bool>("DiffOn"));
157 if (configData.contains("Diffusivity"))
158 this->setDiffusivity(configData.getValue<real>("Diffusivity"));
159
161 if (configData.contains("Viscosity_LB"))
162 this->setViscosityLB(configData.getValue<real>("Viscosity_LB"));
164 if (configData.contains("Velocity_LB"))
165 this->setVelocityLB(configData.getValue<real>("Velocity_LB"));
167 if (configData.contains("Viscosity_Ratio_World_to_LB"))
168 this->setViscosityRatio(configData.getValue<real>("Viscosity_Ratio_World_to_LB"));
170 if (configData.contains("Velocity_Ratio_World_to_LB"))
171 this->setVelocityRatio(configData.getValue<real>("Velocity_Ratio_World_to_LB"));
172 // //////////////////////////////////////////////////////////////////////////
173 if (configData.contains("Density_Ratio_World_to_LB"))
174 this->setDensityRatio(configData.getValue<real>("Density_Ratio_World_to_LB"));
175
176 if (configData.contains("Delta_Press"))
177 this->setPressRatio(configData.getValue<real>("Delta_Press"));
178
180 if (configData.contains("SliceRealX"))
181 this->setRealX(configData.getValue<real>("SliceRealX"));
183 if (configData.contains("SliceRealY"))
184 this->setRealY(configData.getValue<real>("SliceRealY"));
186 if (configData.contains("FactorPressBC"))
187 this->setFactorPressBC(configData.getValue<real>("FactorPressBC"));
188
190 // CUDA streams and optimized communication
191 if (this->getNumprocs() > 1) {
192 if (configData.contains("useStreams")) {
193 if (configData.getValue<bool>("useStreams"))
194 this->setUseStreams(true);
195 }
196
197 if (configData.contains("useReducedCommunicationInInterpolation")) {
199 configData.getValue<bool>("useReducedCommunicationInInterpolation");
200 }
201 }
203
204 // read Geometry (STL)
205 if (configData.contains("ReadGeometry"))
206 this->setReadGeo(configData.getValue<bool>("ReadGeometry"));
207
209 if (configData.contains("measureClockCycle"))
210 this->setclockCycleForMeasurePoints(configData.getValue<real>("measureClockCycle"));
211
212 if (configData.contains("measureTimestep"))
213 this->settimestepForMeasurePoints(configData.getValue<uint>("measureTimestep"));
214
216
217 if (configData.contains("GridPath"))
218 this->setGridPath(configData.getValue<std::string>("GridPath"));
219
220 // Forcing
221 real forcingX = 0.0;
222 real forcingY = 0.0;
223 real forcingZ = 0.0;
224
225 if (configData.contains("ForcingX"))
226 forcingX = configData.getValue<real>("ForcingX");
227 if (configData.contains("ForcingY"))
228 forcingY = configData.getValue<real>("ForcingY");
229 if (configData.contains("ForcingZ"))
230 forcingZ = configData.getValue<real>("ForcingZ");
231
232 this->setForcing(forcingX, forcingY, forcingZ);
234 // quadricLimiters
235 real quadricLimiterP = (real)0.01;
236 real quadricLimiterM = (real)0.01;
237 real quadricLimiterD = (real)0.01;
238
239 if (configData.contains("QuadricLimiterP"))
240 quadricLimiterP = configData.getValue<real>("QuadricLimiterP");
241 if (configData.contains("QuadricLimiterM"))
242 quadricLimiterM = configData.getValue<real>("QuadricLimiterM");
243 if (configData.contains("QuadricLimiterD"))
244 quadricLimiterD = configData.getValue<real>("QuadricLimiterD");
245
246 this->setQuadricLimiters(quadricLimiterP, quadricLimiterM, quadricLimiterD);
248 // Restart
249 if (configData.contains("TimeDoCheckPoint"))
250 this->setTimeDoCheckPoint(configData.getValue<uint>("TimeDoCheckPoint"));
251
252 if (configData.contains("TimeDoRestart"))
253 this->setTimeDoRestart(configData.getValue<uint>("TimeDoRestart"));
254
255 if (configData.contains("DoCheckPoint"))
256 this->setDoCheckPoint(configData.getValue<bool>("DoCheckPoint"));
257
258 if (configData.contains("DoRestart"))
259 this->setDoRestart(configData.getValue<bool>("DoRestart"));
261 if (configData.contains("NOGL"))
262 setMaxLevel(configData.getValue<int>("NOGL"));
263
264 if (configData.contains("GridX"))
265 this->setGridX(configData.getVector<int>("GridX"));
266
267 if (configData.contains("GridY"))
268 this->setGridY(configData.getVector<int>("GridY"));
269
270 if (configData.contains("GridZ"))
271 this->setGridZ(configData.getVector<int>("GridZ"));
272
274 // Kernel
275 if (configData.contains("MainKernelName"))
276 this->configureMainKernel(configData.getValue<std::string>("MainKernelName"));
277
278 if (configData.contains("MultiKernelOn"))
279 this->setMultiKernelOn(configData.getValue<bool>("MultiKernelOn"));
280
281 if (configData.contains("MultiKernelLevel"))
282 this->setMultiKernelLevel(configData.getVector<int>("MultiKernelLevel"));
283
284 if (configData.contains("MultiKernelName"))
285 this->setMultiKernel(configData.getVector<std::string>("MultiKernelName"));
286}
287
288void Parameter::initGridPaths(){
289 std::string gridPath = this->getGridPath();
290
291 // add missing slash to gridPath
292 if (gridPath.back() != '/') {
293 gridPath += "/";
294 this->gridPath = gridPath;
295 }
296
297 // for multi-gpu add process id (if not already there)
298 if (this->getNumprocs() > 1) {
299 gridPath += StringUtil::toString(this->getMyProcessID()) + "/";
300 this->gridPath = gridPath;
301 }
302
304
305 this->setgeoVec(gridPath + "geoVec.dat");
306 this->setcoordX(gridPath + "coordX.dat");
307 this->setcoordY(gridPath + "coordY.dat");
308 this->setcoordZ(gridPath + "coordZ.dat");
309 this->setneighborX(gridPath + "neighborX.dat");
310 this->setneighborY(gridPath + "neighborY.dat");
311 this->setneighborZ(gridPath + "neighborZ.dat");
312 this->setneighborWSB(gridPath + "neighborWSB.dat");
313 this->setscaleCFC(gridPath + "scaleCFC.dat");
314 this->setscaleCFF(gridPath + "scaleCFF.dat");
315 this->setscaleFCC(gridPath + "scaleFCC.dat");
316 this->setscaleFCF(gridPath + "scaleFCF.dat");
317 this->setscaleOffsetCF(gridPath + "offsetVecCF.dat");
318 this->setscaleOffsetFC(gridPath + "offsetVecFC.dat");
319 this->setgeomBoundaryBcQs(gridPath + "geomBoundaryQs.dat");
320 this->setgeomBoundaryBcValues(gridPath + "geomBoundaryValues.dat");
321 this->setinletBcQs(gridPath + "inletBoundaryQs.dat");
322 this->setinletBcValues(gridPath + "inletBoundaryValues.dat");
323 this->setoutletBcQs(gridPath + "outletBoundaryQs.dat");
324 this->setoutletBcValues(gridPath + "outletBoundaryValues.dat");
325 this->settopBcQs(gridPath + "topBoundaryQs.dat");
326 this->settopBcValues(gridPath + "topBoundaryValues.dat");
327 this->setbottomBcQs(gridPath + "bottomBoundaryQs.dat");
328 this->setbottomBcValues(gridPath + "bottomBoundaryValues.dat");
329 this->setfrontBcQs(gridPath + "frontBoundaryQs.dat");
330 this->setfrontBcValues(gridPath + "frontBoundaryValues.dat");
331 this->setbackBcQs(gridPath + "backBoundaryQs.dat");
332 this->setbackBcValues(gridPath + "backBoundaryValues.dat");
333 this->setnumberNodes(gridPath + "numberNodes.dat");
334 this->setLBMvsSI(gridPath + "LBMvsSI.dat");
335 this->setmeasurePoints(gridPath + "measurePoints.dat");
336 this->setcpTop(gridPath + "cpTop.dat");
337 this->setcpBottom(gridPath + "cpBottom.dat");
338 this->setcpBottom2(gridPath + "cpBottom2.dat");
339 this->setConcentration(gridPath + "conc.dat");
340
342 // for Multi GPU
343 if (this->getNumprocs() > 1) {
344
345 // 3D domain decomposition
348 for (int i = 0; i < this->getNumprocs(); i++) {
349 sendProcNeighborsX.push_back(gridPath + StringUtil::toString(i) + "Xs.dat");
350 sendProcNeighborsY.push_back(gridPath + StringUtil::toString(i) + "Ys.dat");
351 sendProcNeighborsZ.push_back(gridPath + StringUtil::toString(i) + "Zs.dat");
352 recvProcNeighborsX.push_back(gridPath + StringUtil::toString(i) + "Xr.dat");
353 recvProcNeighborsY.push_back(gridPath + StringUtil::toString(i) + "Yr.dat");
354 recvProcNeighborsZ.push_back(gridPath + StringUtil::toString(i) + "Zr.dat");
355 }
356 this->setPossNeighborFilesX(sendProcNeighborsX, "send");
357 this->setPossNeighborFilesY(sendProcNeighborsY, "send");
358 this->setPossNeighborFilesZ(sendProcNeighborsZ, "send");
359 this->setPossNeighborFilesX(recvProcNeighborsX, "recv");
360 this->setPossNeighborFilesY(recvProcNeighborsY, "recv");
361 this->setPossNeighborFilesZ(recvProcNeighborsZ, "recv");
362
364 }
365}
366
367void Parameter::initGridBasePoints()
368{
369 if (this->getGridX().empty())
370 this->setGridX(std::vector<int>(this->getMaxLevel() + 1, 32));
371 if (this->getGridY().empty())
372 this->setGridY(std::vector<int>(this->getMaxLevel() + 1, 32));
373 if (this->getGridZ().empty())
374 this->setGridZ(std::vector<int>(this->getMaxLevel() + 1, 32));
375}
376
377void Parameter::initDefaultLBMkernelAllLevels(){
378 if (this->getMultiKernelOn() && this->getMultiKernelLevel().empty()) {
379 std::vector<int> tmp;
380 for (int i = 0; i < this->getMaxLevel() + 1; i++) {
381 tmp.push_back(i);
382 }
383 this->setMultiKernelLevel(tmp);
384 }
385
386 if (this->getMultiKernelOn() && this->getMultiKernel().empty()) {
387 std::vector<std::string> tmp;
388 for (int i = 0; i < this->getMaxLevel() + 1; i++) {
389 tmp.push_back("CumulantK17Comp");
390 }
391 this->setMultiKernel(tmp);
392 }
393}
394
396{
397 // host
398 for (int i = coarse; i <= fine; i++) {
399 parH[i] = std::make_shared<LBMSimulationParameter>();
400 parH[i]->numberofthreads = 64; // 128;
401 parH[i]->gridNX = getGridX().at(i);
402 parH[i]->gridNY = getGridY().at(i);
403 parH[i]->gridNZ = getGridZ().at(i);
404 parH[i]->viscosity = this->vis * pow((real)2.0, i);
405 parH[i]->diffusivity = this->Diffusivity * std::exp2((real)i);
406 parH[i]->omega = (real)1.0 / (real(3.0) * parH[i]->viscosity + real(0.5)); // omega :-) not s9 = -1.0f/(3.0f*parH[i]->vis+0.5f);//
407 parH[i]->omegaDiffusivity = vf::lbm::computeRelaxationFrequency(parH[i]->diffusivity);
408 parH[i]->referenceTemperature = this->referenceTemperature;
409 parH[i]->gravity = getScaledGravity(i);
410 }
411
412 // device
413 for (int i = coarse; i <= fine; i++) {
414 parD[i] = std::make_shared<LBMSimulationParameter>();
415 parD[i]->numberofthreads = parH[i]->numberofthreads;
416 parD[i]->gridNX = parH[i]->gridNX;
417 parD[i]->gridNY = parH[i]->gridNY;
418 parD[i]->gridNZ = parH[i]->gridNZ;
419 parD[i]->viscosity = parH[i]->viscosity;
420 parD[i]->diffusivity = parH[i]->diffusivity;
421 parD[i]->omega = parH[i]->omega;
422 parD[i]->omegaDiffusivity = parH[i]->omegaDiffusivity;
423 parD[i]->referenceTemperature = parH[i]->referenceTemperature;
424 parD[i]->gravity = parH[i]->gravity;
425 }
426}
427
429{
431 for (int i = 0; i < (int)parH[lev]->MeasurePointVector.size(); i++) {
432 for (int j = 0; j < valuesPerClockCycle; j++) {
433 int index = i * valuesPerClockCycle + j;
434 parH[lev]->MeasurePointVector[i].Vx.push_back(parH[lev]->velocityInXdirectionAtMeasurePoints[index]);
435 parH[lev]->MeasurePointVector[i].Vy.push_back(parH[lev]->velocityInYdirectionAtMeasurePoints[index]);
436 parH[lev]->MeasurePointVector[i].Vz.push_back(parH[lev]->velocityInZdirectionAtMeasurePoints[index]);
437 parH[lev]->MeasurePointVector[i].Rho.push_back(parH[lev]->densityAtMeasurePoints[index]);
438 }
439 }
440}
441
443// set-methods
446{
447 this->hostForcing[0] = forcingX;
448 this->hostForcing[1] = forcingY;
449 this->hostForcing[2] = forcingZ;
450}
457void Parameter::setStepEnsight(unsigned int step)
458{
459 this->stepEnsight = step;
460}
462{
463 diffOn = isDiff;
464}
465void Parameter::setBuoyancyEnabled(bool buoyancyEnabled)
466{
467 this->buoyancyEnabled = buoyancyEnabled;
468 if(!this->isBodyForce)
469 VF_LOG_WARNING("Need to enable body force for buoyancy!");
470}
472{
473 this->D3Qxx = d3qxx;
474}
475void Parameter::setMaxLevel(int numberOfLevels)
476{
477 this->maxlevel = numberOfLevels - 1;
478 this->fine = this->maxlevel;
479 parH.resize(this->maxlevel + 1);
480 parD.resize(this->maxlevel + 1);
481}
482void Parameter::setTimestepEnd(unsigned int tend)
483{
484 this->tend = tend;
485}
486void Parameter::setTimestepOut(unsigned int tout)
487{
488 this->tout = tout;
489}
490void Parameter::setTimestepStartOut(unsigned int tStartOut)
491{
492 this->tStartOut = tStartOut;
493}
494void Parameter::setTimestepOfCoarseLevel(unsigned int timestep)
495{
496 this->timestep = timestep;
497}
499{
500 this->calcVelocityAndFluctuations = calcVelocityAndFluctuations;
501}
503{
504 this->calcMean = calcMean;
505}
507{
508 this->calcDragLift = calcDragLift;
509}
511{
512 this->calcCp = calcCp;
513}
515{
516 this->tCalcMedStart = CalcMedStart;
517}
519{
520 this->tCalcMedEnd = CalcMedEnd;
521}
522void Parameter::setOutputPath(std::string oPath)
523{
524 // add missing slash to outputPath
525 if (oPath.back() != '/')
526 oPath += "/";
527
528 this->oPath = oPath;
529 this->setPathAndFilename(this->getOutputPath() + this->getOutputPrefix());
530}
531void Parameter::setOutputPrefix(std::string oPrefix)
532{
533 this->oPrefix = oPrefix;
534 this->setPathAndFilename(this->getOutputPath() + this->getOutputPrefix());
535}
536void Parameter::setPathAndFilename(std::string fname)
537{
538 this->fname = fname;
539}
540void Parameter::setGridPath(std::string gridPath)
541{
542 this->gridPath = gridPath;
543 this->initGridPaths();
544}
546{
547 this->printFiles = printfiles;
548}
549void Parameter::setReadGeo(bool readGeo)
550{
551 this->readGeo = readGeo;
552}
554{
555 this->Diffusivity = Diffusivity;
556}
557
559{
560 this->vis = Viscosity;
561}
563{
564 this->u0 = Velocity;
565}
567{
568 this->vis_ratio = ViscosityRatio;
569}
571{
572 this->u0_ratio = VelocityRatio;
573}
575{
576 this->delta_rho = DensityRatio;
577}
579{
580 this->delta_press = PressRatio;
581}
583{
584 return this->vis_ratio;
585}
587{
588 return this->u0_ratio;
589}
591{
592 return this->delta_rho;
593}
595{
596 return this->delta_press;
597}
599{
600 return this->getScaledTimeRatio(0);
601}
603{
604 return this->getScaledLengthRatio(0);
605}
607{
608 return this->getScaledForceRatio(0);
609}
611{
612 return this->getViscosityRatio() * std::exp2(-level);
613}
615{
616 return this->getVelocityRatio();
617}
619{
620 return this->getDensityRatio();
621}
623{
624 return this->getPressureRatio();
625}
627{
628 return this->getScaledViscosityRatio(level) / std::pow(this->getScaledVelocityRatio(level), 2);
629}
631{
632 return this->getScaledViscosityRatio(level) / this->getScaledVelocityRatio(level);
633}
635{
636 return this->getScaledDensityRatio(level) * this->getScaledVelocityRatio(level) / this->getScaledTimeRatio(level);
637}
639{
640 return std::pow(this->getScaledVelocityRatio(level), 2);
641}
643{
644 return this->getBuoyancyFactor() * std::exp2(-level);
645}
646
648{
649 return this->getGravity() * std::exp2(-level);
650}
651
653{
654 this->RealX = RealX;
655}
657{
658 this->RealY = RealY;
659}
664void Parameter::setMaxDev(int maxdev)
665{
666 this->maxdev = maxdev;
667}
669{
670 this->myProcessId = myid;
671}
672void Parameter::setNumprocs(int numprocs)
673{
674 this->numprocs = numprocs;
675}
676void Parameter::setDevices(std::vector<uint> devices)
677{
678 this->devices = devices;
679}
681{
682 this->Re = Re;
683}
684void Parameter::setTurbulentPrandtlNumber(real turbulentPrandtlNumber)
685{
686 this->turbulentPrandtlNumber = turbulentPrandtlNumber;
687}
689{
690 this->buoyancyFactor = buoyancyFactor;
691}
693 this->gravity = gravity;
694}
695void Parameter::setReferenceTemperature(real referenceTemperature) {
696 this->referenceTemperature = referenceTemperature;
697}
699{
700 this->factorPressBC = factorPressBC;
701}
702void Parameter::setIsGeo(bool isGeo)
703{
704 this->isGeo = isGeo;
705}
706void Parameter::setIsCp(bool isCp)
707{
708 this->isCp = isCp;
709}
711{
712 this->isMeasurePoints = useMeasurePoints;
713}
715{
716 this->isInitNeq = useInitNeq;
717}
719{
720 this->turbulentViscosityEnabled = useTurbulentViscosity;
721}
723{
724 this->turbulenceModel = turbulenceModel;
725}
727{
728 this->turbulentDiffusivityEnabled = useTurbulentDiffusivity;
729}
731{
732 this->advectionDiffusionTurbulenceModel = turbulenceModel;
733}
735{
736 this->SGSConstant = SGSConstant;
737}
738
739void Parameter::setIsBodyForce(bool isBodyForce)
740{
741 this->isBodyForce = isBodyForce;
742}
743void Parameter::setAllNodesAllFeatures(bool allNodesAllFeatures)
744{
745 this->allNodesAllFeatures = allNodesAllFeatures;
746}
747
748void Parameter::setGridX(std::vector<int> GridX)
749{
750 this->GridX = GridX;
751}
752void Parameter::setGridY(std::vector<int> GridY)
753{
754 this->GridY = GridY;
755}
756void Parameter::setGridZ(std::vector<int> GridZ)
757{
758 this->GridZ = GridZ;
759}
760void Parameter::setScaleLBMtoSI(std::vector<real> scaleLBMtoSI)
761{
762 this->scaleLBMtoSI = scaleLBMtoSI;
763}
764void Parameter::setTranslateLBMtoSI(std::vector<real> translateLBMtoSI)
765{
766 this->translateLBMtoSI = translateLBMtoSI;
767}
768void Parameter::setMinCoordX(std::vector<real> MinCoordX)
769{
770 this->minCoordX = MinCoordX;
771}
772void Parameter::setMinCoordY(std::vector<real> MinCoordY)
773{
774 this->minCoordY = MinCoordY;
775}
776void Parameter::setMinCoordZ(std::vector<real> MinCoordZ)
777{
778 this->minCoordZ = MinCoordZ;
779}
780void Parameter::setMaxCoordX(std::vector<real> MaxCoordX)
781{
782 this->maxCoordX = MaxCoordX;
783}
784void Parameter::setMaxCoordY(std::vector<real> MaxCoordY)
785{
786 this->maxCoordY = MaxCoordY;
787}
788void Parameter::setMaxCoordZ(std::vector<real> MaxCoordZ)
789{
790 this->maxCoordZ = MaxCoordZ;
791}
792void Parameter::setgeoVec(std::string geoVec)
793{
794 this->geoVec = geoVec;
795}
796void Parameter::setcoordX(std::string coordX)
797{
798 this->coordX = coordX;
799}
800void Parameter::setcoordY(std::string coordY)
801{
802 this->coordY = coordY;
803}
804void Parameter::setcoordZ(std::string coordZ)
805{
806 this->coordZ = coordZ;
807}
808void Parameter::setneighborX(std::string neighborX)
809{
810 this->neighborX = neighborX;
811}
812void Parameter::setneighborY(std::string neighborY)
813{
814 this->neighborY = neighborY;
815}
816void Parameter::setneighborZ(std::string neighborZ)
817{
818 this->neighborZ = neighborZ;
819}
820void Parameter::setneighborWSB(std::string neighborWSB)
821{
822 this->neighborWSB = neighborWSB;
823}
824void Parameter::setscaleCFC(std::string scaleCFC)
825{
826 this->scaleCFC = scaleCFC;
827}
828void Parameter::setscaleCFF(std::string scaleCFF)
829{
830 this->scaleCFF = scaleCFF;
831}
832void Parameter::setscaleFCC(std::string scaleFCC)
833{
834 this->scaleFCC = scaleFCC;
835}
836void Parameter::setscaleFCF(std::string scaleFCF)
837{
838 this->scaleFCF = scaleFCF;
839}
840void Parameter::setscaleOffsetCF(std::string scaleOffsetCF)
841{
842 this->scaleOffsetCF = scaleOffsetCF;
843}
844void Parameter::setscaleOffsetFC(std::string scaleOffsetFC)
845{
846 this->scaleOffsetFC = scaleOffsetFC;
847}
848void Parameter::setgeomBoundaryBcQs(std::string geomBoundaryBcQs)
849{
850 this->geomBoundaryBcQs = geomBoundaryBcQs;
851}
852void Parameter::setgeomBoundaryBcValues(std::string geomBoundaryBcValues)
853{
854 this->geomBoundaryBcValues = geomBoundaryBcValues;
855}
856void Parameter::setnoSlipBcPos(std::string noSlipBcPos)
857{
858 this->noSlipBcPos = noSlipBcPos;
859}
860void Parameter::setnoSlipBcQs(std::string noSlipBcQs)
861{
862 this->noSlipBcQs = noSlipBcQs;
863}
864void Parameter::setnoSlipBcValue(std::string noSlipBcValue)
865{
866 this->noSlipBcValue = noSlipBcValue;
867}
868void Parameter::setnoSlipBcValues(std::string noSlipBcValues)
869{
870 this->noSlipBcValues = noSlipBcValues;
871}
872void Parameter::setslipBcPos(std::string slipBcPos)
873{
874 this->slipBcPos = slipBcPos;
875}
876void Parameter::setslipBcQs(std::string slipBcQs)
877{
878 this->slipBcQs = slipBcQs;
879}
880void Parameter::setslipBcValue(std::string slipBcValue)
881{
882 this->slipBcValue = slipBcValue;
883}
884void Parameter::setpressBcPos(std::string pressBcPos)
885{
886 this->pressBcPos = pressBcPos;
887}
888void Parameter::setpressBcQs(std::string pressBcQs)
889{
890 this->pressBcQs = pressBcQs;
891}
892void Parameter::setpressBcValue(std::string pressBcValue)
893{
894 this->pressBcValue = pressBcValue;
895}
896void Parameter::setpressBcValues(std::string pressBcValues)
897{
898 this->pressBcValues = pressBcValues;
899}
900void Parameter::setvelBcQs(std::string velBcQs)
901{
902 this->velBcQs = velBcQs;
903}
904void Parameter::setvelBcValues(std::string velBcValues)
905{
906 this->velBcValues = velBcValues;
907}
908void Parameter::setinletBcQs(std::string inletBcQs)
909{
910 this->inletBcQs = inletBcQs;
911}
912void Parameter::setinletBcValues(std::string inletBcValues)
913{
914 this->inletBcValues = inletBcValues;
915}
916void Parameter::setoutletBcQs(std::string outletBcQs)
917{
918 this->outletBcQs = outletBcQs;
919}
920void Parameter::setoutletBcValues(std::string outletBcValues)
921{
922 this->outletBcValues = outletBcValues;
923}
924void Parameter::settopBcQs(std::string topBcQs)
925{
926 this->topBcQs = topBcQs;
927}
928void Parameter::settopBcValues(std::string topBcValues)
929{
930 this->topBcValues = topBcValues;
931}
932void Parameter::setbottomBcQs(std::string bottomBcQs)
933{
934 this->bottomBcQs = bottomBcQs;
935}
936void Parameter::setbottomBcValues(std::string bottomBcValues)
937{
938 this->bottomBcValues = bottomBcValues;
939}
940void Parameter::setfrontBcQs(std::string frontBcQs)
941{
942 this->frontBcQs = frontBcQs;
943}
944void Parameter::setfrontBcValues(std::string frontBcValues)
945{
946 this->frontBcValues = frontBcValues;
947}
948void Parameter::setbackBcQs(std::string backBcQs)
949{
950 this->backBcQs = backBcQs;
951}
952void Parameter::setbackBcValues(std::string backBcValues)
953{
954 this->backBcValues = backBcValues;
955}
956void Parameter::setwallBcQs(std::string wallBcQs)
957{
958 this->wallBcQs = wallBcQs;
959}
960void Parameter::setwallBcValues(std::string wallBcValues)
961{
962 this->wallBcValues = wallBcValues;
963}
964void Parameter::setperiodicBcQs(std::string periodicBcQs)
965{
966 this->periodicBcQs = periodicBcQs;
967}
968void Parameter::setperiodicBcValues(std::string periodicBcValues)
969{
970 this->periodicBcValues = periodicBcValues;
971}
972void Parameter::setmeasurePoints(std::string measurePoints)
973{
974 this->measurePoints = measurePoints;
975}
976void Parameter::setnumberNodes(std::string numberNodes)
977{
978 this->numberNodes = numberNodes;
979}
980void Parameter::setLBMvsSI(std::string LBMvsSI)
981{
982 this->LBMvsSI = LBMvsSI;
983}
984void Parameter::setcpTop(std::string cpTop)
985{
986 this->cpTop = cpTop;
987}
988void Parameter::setcpBottom(std::string cpBottom)
989{
990 this->cpBottom = cpBottom;
991}
992void Parameter::setcpBottom2(std::string cpBottom2)
993{
994 this->cpBottom2 = cpBottom2;
995}
997{
998 this->concentration = concFile;
999}
1001{
1002 this->clockCycleForMeasurePoints = clockCycleForMP;
1003}
1004void Parameter::setTimeDoCheckPoint(unsigned int tDoCheckPoint)
1005{
1006 this->tDoCheckPoint = tDoCheckPoint;
1007}
1008void Parameter::setTimeDoRestart(unsigned int tDoRestart)
1009{
1010 this->tDoRestart = tDoRestart;
1011}
1012void Parameter::setDoCheckPoint(bool doCheckPoint)
1013{
1014 this->doCheckPoint = doCheckPoint;
1015}
1016void Parameter::setDoRestart(bool doRestart)
1017{
1018 this->doRestart = doRestart;
1019}
1021{
1022 this->timeStepForMeasurePoints = timestepForMP;
1023}
1024void Parameter::setObj(std::string str, bool isObj)
1025{
1026 if (str == "geo") {
1027 this->setIsGeo(isObj);
1028 } else if (str == "cp") {
1029 this->setIsCp(isObj);
1030 }
1031}
1033{
1034 this->GeometryValues = useGeometryValues;
1035}
1036void Parameter::setCalc2ndOrderMoments(bool is2ndOrderMoments)
1037{
1038 this->is2ndOrderMoments = is2ndOrderMoments;
1039}
1040void Parameter::setCalc3rdOrderMoments(bool is3rdOrderMoments)
1041{
1042 this->is3rdOrderMoments = is3rdOrderMoments;
1043}
1044void Parameter::setCalcHighOrderMoments(bool isHighOrderMoments)
1045{
1046 this->isHighOrderMoments = isHighOrderMoments;
1047}
1048void Parameter::setMemsizeGPU(double admem, bool reset)
1049{
1050 if (reset == true) {
1051 this->memsizeGPU = 0.;
1052 } else {
1053 this->memsizeGPU += admem;
1054 }
1055}
1056// 3D domain decomposition
1057void Parameter::setPossNeighborFilesX(std::vector<std::string> possNeighborFiles, std::string sor)
1058{
1059 if (sor == "send") {
1060 this->possNeighborFilesSendX = possNeighborFiles;
1061 } else if (sor == "recv") {
1062 this->possNeighborFilesRecvX = possNeighborFiles;
1063 }
1064}
1065void Parameter::setPossNeighborFilesY(std::vector<std::string> possNeighborFiles, std::string sor)
1066{
1067 if (sor == "send") {
1068 this->possNeighborFilesSendY = possNeighborFiles;
1069 } else if (sor == "recv") {
1070 this->possNeighborFilesRecvY = possNeighborFiles;
1071 }
1072}
1073void Parameter::setPossNeighborFilesZ(std::vector<std::string> possNeighborFiles, std::string sor)
1074{
1075 if (sor == "send") {
1076 this->possNeighborFilesSendZ = possNeighborFiles;
1077 } else if (sor == "recv") {
1078 this->possNeighborFilesRecvZ = possNeighborFiles;
1079 }
1080}
1081void Parameter::setNumberOfProcessNeighborsX(unsigned int numberOfProcessNeighbors, int level, std::string sor)
1082{
1083 if (sor == "send") {
1084 parH[level]->sendProcessNeighborsX.resize(numberOfProcessNeighbors);
1085 parD[level]->sendProcessNeighborsX.resize(numberOfProcessNeighbors);
1087 } else if (sor == "recv") {
1088 parH[level]->recvProcessNeighborsX.resize(numberOfProcessNeighbors);
1089 parD[level]->recvProcessNeighborsX.resize(numberOfProcessNeighbors);
1091 }
1092}
1093void Parameter::setNumberOfProcessNeighborsY(unsigned int numberOfProcessNeighbors, int level, std::string sor)
1094{
1095 if (sor == "send") {
1096 parH[level]->sendProcessNeighborsY.resize(numberOfProcessNeighbors);
1097 parD[level]->sendProcessNeighborsY.resize(numberOfProcessNeighbors);
1099 } else if (sor == "recv") {
1100 parH[level]->recvProcessNeighborsY.resize(numberOfProcessNeighbors);
1101 parD[level]->recvProcessNeighborsY.resize(numberOfProcessNeighbors);
1103 }
1104}
1105void Parameter::setNumberOfProcessNeighborsZ(unsigned int numberOfProcessNeighbors, int level, std::string sor)
1106{
1107 if (sor == "send") {
1108 parH[level]->sendProcessNeighborsZ.resize(numberOfProcessNeighbors);
1109 parD[level]->sendProcessNeighborsZ.resize(numberOfProcessNeighbors);
1111 } else if (sor == "recv") {
1112 parH[level]->recvProcessNeighborsZ.resize(numberOfProcessNeighbors);
1113 parD[level]->recvProcessNeighborsZ.resize(numberOfProcessNeighbors);
1115 }
1116}
1118{
1119 this->isNeigborX = isNeigbor;
1120}
1122{
1123 this->isNeigborY = isNeigbor;
1124}
1126{
1127 this->isNeigborZ = isNeigbor;
1128}
1129void Parameter::setSendProcessNeighborsAfterFtoCX(int numberOfNodes, int level, int arrayIndex)
1130{
1131 this->getParH(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].numberOfNodes = numberOfNodes;
1132 this->getParD(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].numberOfNodes = numberOfNodes;
1133 this->getParH(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1134 this->getParD(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1135 this->getParH(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1136 this->getParD(level)->sendProcessNeighborsAfterFtoCX[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1137}
1138void Parameter::setSendProcessNeighborsAfterFtoCY(int numberOfNodes, int level, int arrayIndex)
1139{
1140 this->getParH(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].numberOfNodes = numberOfNodes;
1141 this->getParD(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].numberOfNodes = numberOfNodes;
1142 this->getParH(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1143 this->getParD(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1144 this->getParH(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1145 this->getParD(level)->sendProcessNeighborsAfterFtoCY[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1146}
1147void Parameter::setSendProcessNeighborsAfterFtoCZ(int numberOfNodes, int level, int arrayIndex)
1148{
1149 this->getParH(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].numberOfNodes = numberOfNodes;
1150 this->getParD(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].numberOfNodes = numberOfNodes;
1151 this->getParH(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1152 this->getParD(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1153 this->getParH(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1154 this->getParD(level)->sendProcessNeighborsAfterFtoCZ[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1155}
1156void Parameter::setRecvProcessNeighborsAfterFtoCX(int numberOfNodes, int level, int arrayIndex)
1157{
1158 this->getParH(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].numberOfNodes = numberOfNodes;
1159 this->getParD(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].numberOfNodes = numberOfNodes;
1160 this->getParH(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1161 this->getParD(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1162 this->getParH(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1163 this->getParD(level)->recvProcessNeighborsAfterFtoCX[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1164}
1165void Parameter::setRecvProcessNeighborsAfterFtoCY(int numberOfNodes, int level, int arrayIndex)
1166{
1167 this->getParH(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].numberOfNodes = numberOfNodes;
1168 this->getParD(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].numberOfNodes = numberOfNodes;
1169 this->getParH(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1170 this->getParD(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1171 this->getParH(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1172 this->getParD(level)->recvProcessNeighborsAfterFtoCY[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1173}
1174void Parameter::setRecvProcessNeighborsAfterFtoCZ(int numberOfNodes, int level, int arrayIndex)
1175{
1176 this->getParH(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].numberOfNodes = numberOfNodes;
1177 this->getParD(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].numberOfNodes = numberOfNodes;
1178 this->getParH(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1179 this->getParD(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].memsizeFs = sizeof(real) * numberOfNodes;
1180 this->getParH(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1181 this->getParD(level)->recvProcessNeighborsAfterFtoCZ[arrayIndex].numberOfFs = this->D3Qxx * numberOfNodes;
1182}
1183void Parameter::configureMainKernel(std::string kernel)
1184{
1185 this->mainKernel = kernel;
1186 if (kernel == vf::collision_kernel::compressible::K17CompressibleNavierStokes)
1187 this->kernelNeedsFluidNodeIndicesToRun = true;
1188}
1190{
1191 this->multiKernelOn = isOn;
1192}
1194{
1195 this->multiKernelLevel = kernelLevel;
1196}
1197void Parameter::setMultiKernel(std::vector<std::string> kernel)
1198{
1199 this->multiKernel = kernel;
1200}
1201void Parameter::setADKernel(std::string adKernel)
1202{
1203 this->adKernel = adKernel;
1204}
1205
1207// add-methods
1210{
1211 interactors.push_back(interactor);
1212}
1214{
1215 samplers.push_back(sampler);
1216}
1217
1219// get-methods
1222{
1223 return this->hostForcing;
1224}
1226{
1227 return this->forcingH;
1228}
1230{
1231 return this->forcingD;
1232}
1234{
1235 return this->hostQuadricLimiters;
1236}
1238{
1239 return this->quadricLimitersH;
1240}
1246{
1247 return this->stepEnsight;
1248}
1249std::shared_ptr<LBMSimulationParameter> Parameter::getParD(int level)
1250{
1251 return parD[level];
1252}
1253std::shared_ptr<LBMSimulationParameter> Parameter::getParH(int level) const
1254{
1255 return parH[level];
1256}
1257
1259{
1260 return *parD[level];
1261}
1262
1264{
1265 return *parH[level];
1266}
1267
1268const std::vector<std::shared_ptr<LBMSimulationParameter>> &Parameter::getParHallLevels()
1269{
1270 return parH;
1271}
1272const std::vector<std::shared_ptr<LBMSimulationParameter>> &Parameter::getParDallLevels()
1273{
1274 return parD;
1275}
1276
1278{
1279 return fine;
1280}
1282{
1283 return coarse;
1284}
1286{
1287 return parD[level]->isEvenTimestep;
1288}
1290{
1291 return diffOn;
1292}
1294{
1295 return buoyancyEnabled;
1296}
1297
1299{
1300 return allNodesAllFeatures;
1301}
1303{
1304 return factor_gridNZ;
1305}
1307{
1308 return this->D3Qxx;
1309}
1311{
1312 return this->maxlevel;
1313}
1315{
1316 if (getDoRestart()) {
1317 return getTimeDoRestart() + 1;
1318 } else {
1319 return 1;
1320 }
1321}
1323{
1324 if (getDoRestart()) {
1325 return getTimeDoRestart();
1326 } else {
1327 return 0;
1328 }
1329}
1330unsigned int Parameter::getTimestepEnd() const
1331{
1332 return this->tend;
1333}
1335{
1336 return this->tout;
1337}
1339{
1340 return this->tStartOut;
1341}
1343{
1344 return this->calcMean;
1345}
1347{
1348 return this->calcDragLift;
1349}
1351{
1352 return this->calcCp;
1353}
1355{
1356 return this->tCalcMedStart;
1357}
1359{
1360 return this->tCalcMedEnd;
1361}
1363{
1364 return this->oPath;
1365}
1367{
1368 return this->oPrefix;
1369}
1370std::string Parameter::getFName() const
1371{
1372 return this->fname;
1373}
1375{
1376 return this->gridPath;
1377}
1379{
1380 return this->printFiles;
1381}
1383{
1384 return this->readGeo;
1385}
1387{
1388 return this->calcVelocityAndFluctuations;
1389}
1391{
1392 return this->Diffusivity;
1393}
1395{
1396 return this->vis;
1397}
1399{
1400 return this->u0;
1401}
1403{
1404 return this->RealX;
1405}
1407{
1408 return this->RealY;
1409}
1411{
1412 return this->outflowPressureCorrectionFactor;
1413}
1415{
1416 return this->maxdev;
1417}
1419{
1420 return this->myProcessId;
1421}
1423{
1424 return this->numprocs;
1425}
1426std::vector<uint> Parameter::getDevices() const
1427{
1428 return this->devices;
1429}
1431{
1432 return this->Re;
1433}
1435{
1436 return this->turbulentPrandtlNumber;
1437}
1439{
1440 return this->buoyancyFactor;
1441}
1443{
1444 return this->gravity;
1445}
1447{
1448 return this->referenceTemperature;
1449}
1451{
1452 return this->factorPressBC;
1453}
1454std::vector<int> Parameter::getGridX()
1455{
1456 return this->GridX;
1457}
1458std::vector<int> Parameter::getGridY()
1459{
1460 return this->GridY;
1461}
1462std::vector<int> Parameter::getGridZ()
1463{
1464 return this->GridZ;
1465}
1467{
1468 return this->scaleLBMtoSI;
1469}
1471{
1472 return this->translateLBMtoSI;
1473}
1474std::vector<real> Parameter::getMinCoordX()
1475{
1476 return this->minCoordX;
1477}
1478std::vector<real> Parameter::getMinCoordY()
1479{
1480 return this->minCoordY;
1481}
1482std::vector<real> Parameter::getMinCoordZ()
1483{
1484 return this->minCoordZ;
1485}
1486std::vector<real> Parameter::getMaxCoordX()
1487{
1488 return this->maxCoordX;
1489}
1490std::vector<real> Parameter::getMaxCoordY()
1491{
1492 return this->maxCoordY;
1493}
1494std::vector<real> Parameter::getMaxCoordZ()
1495{
1496 return this->maxCoordZ;
1497}
1499{
1500 return this->geoVec;
1501}
1503{
1504 return this->coordX;
1505}
1507{
1508 return this->coordY;
1509}
1511{
1512 return this->coordZ;
1513}
1515{
1516 return this->neighborX;
1517}
1519{
1520 return this->neighborY;
1521}
1523{
1524 return this->neighborZ;
1525}
1527{
1528 return this->neighborWSB;
1529}
1531{
1532 return this->scaleCFC;
1533}
1535{
1536 return this->scaleCFF;
1537}
1539{
1540 return this->scaleFCC;
1541}
1543{
1544 return this->scaleFCF;
1545}
1547{
1548 return this->scaleOffsetCF;
1549}
1551{
1552 return this->scaleOffsetFC;
1553}
1555{
1556 return this->geomBoundaryBcQs;
1557}
1559{
1560 return this->geomBoundaryBcValues;
1561}
1563{
1564 return this->noSlipBcPos;
1565}
1567{
1568 return this->noSlipBcQs;
1569}
1571{
1572 return this->noSlipBcValue;
1573}
1575{
1576 return this->noSlipBcValues;
1577}
1579{
1580 return this->slipBcPos;
1581}
1583{
1584 return this->slipBcQs;
1585}
1587{
1588 return this->slipBcValue;
1589}
1591{
1592 return this->pressBcPos;
1593}
1595{
1596 return this->pressBcQs;
1597}
1599{
1600 return this->pressBcValue;
1601}
1603{
1604 return this->pressBcValues;
1605}
1607{
1608 return this->velBcQs;
1609}
1611{
1612 return this->velBcValues;
1613}
1615{
1616 return this->inletBcQs;
1617}
1619{
1620 return this->inletBcValues;
1621}
1623{
1624 return this->outletBcQs;
1625}
1627{
1628 return this->outletBcValues;
1629}
1631{
1632 return this->topBcQs;
1633}
1635{
1636 return this->topBcValues;
1637}
1639{
1640 return this->bottomBcQs;
1641}
1643{
1644 return this->bottomBcValues;
1645}
1647{
1648 return this->frontBcQs;
1649}
1651{
1652 return this->frontBcValues;
1653}
1655{
1656 return this->backBcQs;
1657}
1659{
1660 return this->backBcValues;
1661}
1663{
1664 return this->wallBcQs;
1665}
1667{
1668 return this->wallBcValues;
1669}
1671{
1672 return this->periodicBcQs;
1673}
1675{
1676 return this->periodicBcValues;
1677}
1679{
1680 return this->measurePoints;
1681}
1683{
1684 return this->LBMvsSI;
1685}
1687{
1688 return this->numberNodes;
1689}
1691{
1692 return this->cpTop;
1693}
1695{
1696 return this->cpBottom;
1697}
1699{
1700 return this->cpBottom2;
1701}
1703{
1704 return this->concentration;
1705}
1707{
1708 return this->clockCycleForMeasurePoints;
1709}
1711{
1712 return this->tDoCheckPoint;
1713}
1715{
1716 return this->tDoRestart;
1717}
1718
1719//=======================================================================================
1725unsigned int Parameter::getTimeStep(int level, unsigned int t, bool isPostCollision)
1726{
1727 if(level>this->getMaxLevel()) throw std::runtime_error("Parameter::getTimeStep: level>this->getMaxLevel()!");
1728 unsigned int tLevel = t;
1729 if(level>0)
1730 {
1731 for(int i=1; i<level; i++){ tLevel = 1 + 2*(tLevel-1) + !this->getEvenOrOdd(i); }
1732 bool addOne = isPostCollision? !this->getEvenOrOdd(level): this->getEvenOrOdd(level);
1733 tLevel = 1 + 2*(tLevel-1) + addOne;
1734 }
1735 return tLevel;
1736}
1737
1739{
1740 return this->doCheckPoint;
1741}
1743{
1744 return this->doRestart;
1745}
1747{
1748 return this->isGeo;
1749}
1751{
1752 return this->isCp;
1753}
1755{
1756 return this->isMeasurePoints;
1757}
1759{
1760 return this->turbulenceModel;
1761}
1763{
1764 return this->advectionDiffusionTurbulenceModel;
1765}
1767{
1768 return this->turbulentViscosityEnabled;
1769}
1771{
1772 return this->turbulentDiffusivityEnabled;
1773}
1775{
1776 return this->SGSConstant;
1777}
1778std::vector<SPtr<PreCollisionInteractor>> Parameter::getInteractors()
1779{
1780 return interactors;
1781}
1782std::vector<SPtr<Sampler>> Parameter::getSamplers()
1783{
1784 return samplers;
1785}
1787{
1788 return this->isInitNeq;
1789}
1790
1792{
1793 return this->isBodyForce;
1794}
1795
1797{
1798 return this->GeometryValues;
1799}
1801{
1802 return this->is2ndOrderMoments;
1803}
1805{
1806 return this->is3rdOrderMoments;
1807}
1809{
1810 return this->isHighOrderMoments;
1811}
1813{
1814 return t == getTimeDoRestart();
1815}
1817{
1818 return this->timeStepForMeasurePoints;
1819}
1821{
1822 return this->timestep;
1823}
1825{
1826 return this->memsizeGPU;
1827}
1828// 3D domain decomposition
1829std::vector<std::string> Parameter::getPossNeighborFilesX(std::string sor)
1830{
1831 if (sor == "send") {
1832 return this->possNeighborFilesSendX;
1833 } else if (sor == "recv") {
1834 return this->possNeighborFilesRecvX;
1835 }
1836 throw std::runtime_error("Parameter string invalid.");
1837}
1838std::vector<std::string> Parameter::getPossNeighborFilesY(std::string sor)
1839{
1840 if (sor == "send") {
1841 return this->possNeighborFilesSendY;
1842 } else if (sor == "recv") {
1843 return this->possNeighborFilesRecvY;
1844 }
1845 throw std::runtime_error("Parameter string invalid.");
1846}
1847std::vector<std::string> Parameter::getPossNeighborFilesZ(std::string sor)
1848{
1849 if (sor == "send") {
1850 return this->possNeighborFilesSendZ;
1851 } else if (sor == "recv") {
1852 return this->possNeighborFilesRecvZ;
1853 }
1854 throw std::runtime_error("Parameter string invalid.");
1855}
1856unsigned int Parameter::getNumberOfProcessNeighborsX(int level, std::string sor)
1857{
1858 if (sor == "send") {
1859 return (unsigned int)parH[level]->sendProcessNeighborsX.size();
1860 } else if (sor == "recv") {
1861 return (unsigned int)parH[level]->recvProcessNeighborsX.size();
1862 }
1863 throw std::runtime_error("getNumberOfProcessNeighborsX: Parameter string invalid.");
1864}
1865unsigned int Parameter::getNumberOfProcessNeighborsY(int level, std::string sor)
1866{
1867 if (sor == "send") {
1868 return (unsigned int)parH[level]->sendProcessNeighborsY.size();
1869 } else if (sor == "recv") {
1870 return (unsigned int)parH[level]->recvProcessNeighborsY.size();
1871 }
1872 throw std::runtime_error("getNumberOfProcessNeighborsY: Parameter string invalid.");
1873}
1874unsigned int Parameter::getNumberOfProcessNeighborsZ(int level, std::string sor)
1875{
1876 if (sor == "send") {
1877 return (unsigned int)parH[level]->sendProcessNeighborsZ.size();
1878 } else if (sor == "recv") {
1879 return (unsigned int)parH[level]->recvProcessNeighborsZ.size();
1880 }
1881 throw std::runtime_error("getNumberOfProcessNeighborsZ: Parameter string invalid.");
1882}
1883
1885{
1886 return this->isNeigborX;
1887}
1889{
1890 return this->isNeigborY;
1891}
1893{
1894 return this->isNeigborZ;
1895}
1896
1897std::string Parameter::getMainKernel() const
1898{
1899 return mainKernel;
1900}
1902{
1903 return multiKernelOn;
1904}
1906{
1907 return multiKernelLevel;
1908}
1909std::vector<std::string> Parameter::getMultiKernel()
1910{
1911 return multiKernel;
1912}
1914{
1915 return adKernel;
1916}
1918// initial condition fluid
1920 std::function<void(real, real, real, real &, real &, real &, real &)> initialCondition)
1921{
1922 this->initialCondition = initialCondition;
1923}
1924
1926{
1927 return this->initialCondition;
1928}
1929
1930// initial condition concentration
1931void Parameter::setInitialConditionAD(std::function<real(real, real, real)> initialConditionAD)
1932{
1933 this->initialConditionAD = std::move(initialConditionAD);
1934}
1935
1937{
1938 return this->initialConditionAD;
1939}
1940
1942{
1943 this->initialLocalReferenceTemperature = std::move(initialReferenceTemperature);
1944}
1946{
1947 return initialLocalReferenceTemperature;
1948}
1950
1951void Parameter::setUseStreams(bool useStreams)
1952{
1953 if (useStreams) {
1954 if (this->getNumprocs() != 1) {
1955 this->useStreams = useStreams;
1956 return;
1957 } else {
1958 VF_LOG_INFO( "Can't use streams with only one process!");
1959 }
1960 }
1961 this->useStreams = false;
1962}
1963
1965{
1966 return this->useStreams;
1967}
1968
1969std::unique_ptr<CudaStreamManager> &Parameter::getStreamManager()
1970{
1971 return this->cudaStreamManager;
1972}
1973
1975{
1976 return this->kernelNeedsFluidNodeIndicesToRun;
1977}
1978
1979void Parameter::setKernelNeedsFluidNodeIndicesToRun(bool kernelNeedsFluidNodeIndicesToRun){
1980 this->kernelNeedsFluidNodeIndicesToRun = kernelNeedsFluidNodeIndicesToRun;
1981}
1982
1984{
1985
1986 parH[level]->sendProcessNeighborsAfterFtoCX.resize(parH[level]->sendProcessNeighborsX.size());
1987 parH[level]->recvProcessNeighborsAfterFtoCX.resize(parH[level]->recvProcessNeighborsX.size());
1988 parD[level]->sendProcessNeighborsAfterFtoCX.resize(parH[level]->sendProcessNeighborsAfterFtoCX.size());
1989 parD[level]->recvProcessNeighborsAfterFtoCX.resize(parH[level]->recvProcessNeighborsAfterFtoCX.size());
1990}
1991
1993{
1994 parH[level]->sendProcessNeighborsAfterFtoCY.resize(parH[level]->sendProcessNeighborsY.size());
1995 parH[level]->recvProcessNeighborsAfterFtoCY.resize(parH[level]->recvProcessNeighborsY.size());
1996 parD[level]->sendProcessNeighborsAfterFtoCY.resize(parH[level]->sendProcessNeighborsAfterFtoCY.size());
1997 parD[level]->recvProcessNeighborsAfterFtoCY.resize(parH[level]->recvProcessNeighborsAfterFtoCY.size());
1998}
1999
2001{
2002 parH[level]->sendProcessNeighborsAfterFtoCZ.resize(parH[level]->sendProcessNeighborsZ.size());
2003 parH[level]->recvProcessNeighborsAfterFtoCZ.resize(parH[level]->recvProcessNeighborsZ.size());
2004 parD[level]->sendProcessNeighborsAfterFtoCZ.resize(parH[level]->sendProcessNeighborsAfterFtoCZ.size());
2005 parD[level]->recvProcessNeighborsAfterFtoCZ.resize(parH[level]->recvProcessNeighborsAfterFtoCZ.size());
2006}
2008}
2009
#define VF_LOG_INFO(...)
Definition Logger.h:50
#define VF_LOG_WARNING(...)
Definition Logger.h:51
std::vector< T > getVector(const std::string &key) const
get vector with key
bool contains(const std::string &key) const
check if value associated with given key exists
T getValue(const std::string &key) const
get value with key
Class for LBM-parameter management.
Definition Parameter.h:359
void setIsNeighborZ(bool isNeighbor)
void setUseTurbulentDiffusivity(bool useTurbulentDiffusivity)
void setmeasurePoints(std::string measurePoints)
void setslipBcValue(std::string slipBcValue)
std::string getnoSlipBcValues()
std::string getneighborX()
unsigned int getTimestepStart() const
std::string getpressBcQs()
void setMemsizeGPU(double admem, bool reset)
void setCalcHighOrderMoments(bool isHighOrderMoments)
std::string getcpTop()
std::string getbackBcQs()
void setMyID(int myid)
real getForceRatio() const
void setbottomBcValues(std::string bottomBcValues)
double * getForcesDouble()
real getScaledLengthRatio(int level) const
vf::lbm::advection_diffusion::TurbulenceModel getADTurbulenceModel()
std::vector< std::shared_ptr< LBMSimulationParameter > > parH
Definition Parameter.h:754
void setNumberOfProcessNeighborsX(unsigned int numberOfProcessNeighbors, int level, std::string sor)
void addSampler(SPtr< Sampler > sampler)
real getViscosityRatio() const
void setRecvProcessNeighborsAfterFtoCZ(int numberOfNodes, int level, int arrayIndex)
void setscaleOffsetCF(std::string scaleOffsetCF)
std::string getbottomBcValues()
std::vector< std::string > getMultiKernel()
real getclockCycleForMeasurePoints()
std::string getslipBcValue()
int getMyProcessID() const
void setcoordZ(std::string coordZ)
void setPossNeighborFilesX(std::vector< std::string > possNeighborFiles, std::string sor)
void setfrontBcValues(std::string frontBcValues)
std::vector< real > getMaxCoordZ()
void setTimestepOut(unsigned int tout)
void setTurbulenceModel(vf::lbm::TurbulenceModel turbulenceModel)
void setslipBcQs(std::string slipBcQs)
void setDoCheckPoint(bool doCheckPoint)
void initLBMSimulationParameter()
void settimestepForMeasurePoints(unsigned int timestepForMeasurePoints)
void setinletBcValues(std::string inletBcValues)
std::string getinletBcQs()
unsigned int getTimestepStartOut()
void setTimeCalcMedStart(int CalcMedStart)
std::vector< real > getMinCoordZ()
void setneighborZ(std::string neighborZ)
unsigned int getNumberOfProcessNeighborsX(int level, std::string sor)
bool getEvenOrOdd(int level)
void setD3Qxx(int d3qxx)
real getViscosity() const
void setclockCycleForMeasurePoints(real clockCycleForMeasurePoints)
int getNumprocs() const
void setMinCoordX(std::vector< real > MinCoordX)
void setbackBcValues(std::string backBcValues)
std::string getbackBcValues()
void setpressBcQs(std::string pressBcQs)
real getScaledViscosityRatio(int level) const
void setscaleFCC(std::string scaleFCC)
void setslipBcPos(std::string slipBcPos)
std::string getscaleOffsetCF()
void setCalc2ndOrderMoments(bool is2ndOrderMoments)
bool getCalcTurbulenceIntensity()
void setTimestepStartOut(unsigned int tStartOut)
void setinletBcQs(std::string inletBcQs)
void setKernelNeedsFluidNodeIndicesToRun(bool kernelNeedsFluidNodeIndicesToRun)
real getBuoyancyFactor() const
void setGravity(real gravity)
void setUseInitNeq(bool useInitNeq)
std::string getwallBcQs()
void setDensityRatio(real DensityRatio)
void settopBcQs(std::string topBcQs)
void setDiffOn(bool isDiff)
void setcoordY(std::string coordY)
void setRealX(real RealX)
std::vector< real > getTranslateLBMtoSI()
std::string getscaleFCF()
std::shared_ptr< LBMSimulationParameter > getParH(int level) const
Pointer to instance of LBMSimulationParameter - stored on Host System.
vf::lbm::TurbulenceModel getTurbulenceModel()
std::vector< std::shared_ptr< LBMSimulationParameter > > parD
Definition Parameter.h:755
std::vector< real > getScaleLBMtoSI()
unsigned int getNumberOfProcessNeighborsY(int level, std::string sor)
void setcpBottom2(std::string cpBottom2)
std::function< real(real, real, real)> & getInitialLocalReferenceTemperature()
std::string getwallBcValues()
bool useReducedCommunicationAfterFtoC
Definition Parameter.h:912
void initProcessNeighborsAfterFtoCZ(int level)
void setcoordX(std::string coordX)
void setSendProcessNeighborsAfterFtoCY(int numberOfNodes, int level, int arrayIndex)
std::string getoutletBcQs()
std::string getgeomBoundaryBcQs()
std::string getnoSlipBcQs()
void setneighborX(std::string neighborX)
std::string getpressBcPos()
void setBuoyancyFactor(real buoyancyFactor)
std::string getneighborWSB()
std::vector< int > getGridX()
void setgeomBoundaryBcValues(std::string geomBoundaryBcValues)
unsigned int getTimeDoCheckPoint()
std::string getscaleFCC()
bool getCalc2ndOrderMoments()
real getScaledTimeRatio(int level) const
std::string getfrontBcValues()
void setRealY(real RealY)
real getScaledDensityRatio(int level) const
std::string getscaleCFC()
std::string getcoordY()
void setReadGeo(bool readGeo)
std::string getMainKernel() const
void setbottomBcQs(std::string bottomBcQs)
void setfrontBcQs(std::string frontBcQs)
real getVelocityRatio() const
void setMaxLevel(int numberOfLevels)
void copyMeasurePointsArrayToVector(int lev)
void setForcing(real forcingX, real forcingY, real forcingZ)
std::function< real(real, real, real)> & getInitialConditionAD()
void setDoRestart(bool doRestart)
void setbackBcQs(std::string backBcQs)
void setConcentration(std::string concFile)
bool getCalc3rdOrderMoments()
void setRe(real Re)
void setAllNodesAllFeatures(bool allNodesAllFeatures)
real * quadricLimitersH
Definition Parameter.h:739
void setperiodicBcValues(std::string periodicBcValues)
std::vector< std::string > getPossNeighborFilesZ(std::string sor)
void setvelBcQs(std::string velBcQs)
void setperiodicBcQs(std::string periodicBcQs)
void setwallBcQs(std::string wallBcQs)
std::unique_ptr< CudaStreamManager > & getStreamManager()
std::string getGridPath()
unsigned int getTimestepForMeasurePoints()
void setMaxCoordY(std::vector< real > MaxCoordY)
void setInitialLocalReferenceTemperature(std::function< real(real, real, real)> initialReferenceTemperature)
int getCoarse() const
std::vector< uint > getDevices() const
bool getKernelNeedsFluidNodeIndicesToRun()
std::string getvelBcQs()
void setVelocityRatio(real VelocityRatio)
void setTurbulentPrandtlNumber(real turbulentPrandtlNumber)
void setnoSlipBcValues(std::string noSlipBcValues)
void setRecvProcessNeighborsAfterFtoCX(int numberOfNodes, int level, int arrayIndex)
std::string getmeasurePoints()
void setCalcTurbulenceIntensity(bool calcVelocityAndFluctuations)
bool overWritingRestart(unsigned int t)
void setADKernel(std::string adKernel)
int getMaxLevel() const
std::string getbottomBcQs()
bool getDoRestart() const
bool getUseTurbulentViscosity()
unsigned int getTimestepInit()
void initProcessNeighborsAfterFtoCY(int level)
std::string getfrontBcQs()
std::vector< SPtr< Sampler > > getSamplers()
void setoutletBcQs(std::string outletBcQs)
unsigned int getTimestepOfCoarseLevel()
std::shared_ptr< LBMSimulationParameter > getParD(int level)
Pointer to instance of LBMSimulationParameter - stored on Device (GPU)
std::string getgeoVec()
real * getQuadricLimitersDev()
void setUseStreams(bool useStreams)
sets whether streams and thus communication hiding should be used
real getOutflowPressureCorrectionFactor()
void initProcessNeighborsAfterFtoCX(int level)
real * getQuadricLimitersHost() const
void setCalcCp(bool calcCp)
void setScaleLBMtoSI(std::vector< real > scaleLBMtoSI)
bool getCalcHighOrderMoments()
void setCalcDragLift(bool calcDragLift)
real getReferenceTemperature() const
real getScaledBuoyancyFactor(int level) const
std::string getOutputPrefix() const
void setscaleFCF(std::string scaleFCF)
void setOutputPath(std::string oPath)
void setoutletBcValues(std::string outletBcValues)
std::string getpressBcValue()
std::string getslipBcPos()
void setFactorPressBC(real factorPressBC)
void setcpTop(std::string cpTop)
void setIsCp(bool isCp)
void setMaxDev(int maxdev)
void setPossNeighborFilesY(std::vector< std::string > possNeighborFiles, std::string sor)
void setUseGeometryValues(bool GeometryValues)
void setTimestepOfCoarseLevel(unsigned int timestep)
void setwallBcValues(std::string wallBcValues)
real getDensityRatio() const
void setNumberOfProcessNeighborsY(unsigned int numberOfProcessNeighbors, int level, std::string sor)
std::vector< int > getGridY()
void setCalcMean(bool calcMean)
void setMinCoordY(std::vector< real > MinCoordY)
std::string getscaleCFF()
std::vector< real > getMaxCoordX()
real getScaledVelocityRatio(int level) const
std::string getvelBcValues()
std::string getgeomBoundaryBcValues()
std::string getneighborY()
void setUseTurbulentViscosity(bool useTurbulentViscosity)
void setTimeCalcMedEnd(int CalcMedEnd)
void setvelBcValues(std::string velBcValues)
void setSendProcessNeighborsAfterFtoCZ(int numberOfNodes, int level, int arrayIndex)
int getFine() const
std::string getcoordX()
unsigned int getNumberOfProcessNeighborsZ(int level, std::string sor)
std::function< void(real, real, real, real &, real &, real &, real &)> & getInitialCondition()
void setOutflowPressureCorrectionFactor(real correctionFactor)
void setnoSlipBcValue(std::string noSlipBcValue)
void setscaleCFC(std::string scaleCFC)
void settopBcValues(std::string topBcValues)
unsigned int getTimestepOut()
std::string getperiodicBcQs()
void setNumberOfProcessNeighborsZ(unsigned int numberOfProcessNeighbors, int level, std::string sor)
void configureMainKernel(std::string kernel)
real getScaledStressRatio(int level) const
void setIsGeo(bool isGeo)
std::vector< real > getMinCoordX()
void setAdvectionDiffusionTurbulenceModel(vf::lbm::advection_diffusion::TurbulenceModel turbulenceModel)
void setgeomBoundaryBcQs(std::string geomBoundaryBcQs)
void setpressBcValue(std::string pressBcValue)
real getLengthRatio() const
std::vector< int > getMultiKernelLevel()
void setneighborY(std::string neighborY)
std::string getcpBottom()
void setRecvProcessNeighborsAfterFtoCY(int numberOfNodes, int level, int arrayIndex)
void setLBMvsSI(std::string LBMvsSI)
real getScaledGravity(int level) const
void setIsNeighborY(bool isNeighbor)
void setgeoVec(std::string geoVec)
void setscaleOffsetFC(std::string scaleOffsetFC)
std::string getFName() const
void setCalc3rdOrderMoments(bool is3rdOrderMoments)
std::string getscaleOffsetFC()
void setStepEnsight(unsigned int step)
void addInteractor(SPtr< PreCollisionInteractor > interactor)
void setMultiKernelLevel(std::vector< int > kernelLevel)
void setMultiKernel(std::vector< std::string > kernel)
void setGridPath(std::string gridPath)
void setpressBcPos(std::string pressBcPos)
void setPossNeighborFilesZ(std::vector< std::string > possNeighborFiles, std::string sor)
void setscaleCFF(std::string scaleCFF)
std::string getOutputPath()
real getScaledForceRatio(int level) const
real getScaledPressureRatio(int level) const
std::string gettopBcQs()
bool getBuoyancyEnabled() const
std::string getnoSlipBcValue()
double * getQuadricLimitersDouble()
std::string getslipBcQs()
unsigned int getTimeDoRestart() const
std::string getcpBottom2()
unsigned int getStepEnsight()
void setInitialCondition(std::function< void(real, real, real, real &, real &, real &, real &)> initialCondition)
const std::vector< std::shared_ptr< LBMSimulationParameter > > & getParHallLevels()
void setnumberNodes(std::string numberNodes)
std::string getinletBcValues()
real getGravity() const
std::string getneighborZ()
unsigned int getTimeStep(int level, unsigned int t, bool isPostCollision)
Get current (sub)time step of a given level.
std::vector< real > getMaxCoordY()
void setObj(std::string str, bool isObj)
std::string getLBMvsSI()
void setMinCoordZ(std::vector< real > MinCoordZ)
void setMultiKernelOn(bool isOn)
void setReferenceTemperature(real referenceTemperature)
void setSGSConstant(real SGSConstant)
const std::vector< std::shared_ptr< LBMSimulationParameter > > & getParDallLevels()
real getRe() const
unsigned int getTimestepEnd() const
void setTimeDoRestart(unsigned int tDoRestart)
void setViscosityLB(real Viscosity)
real getVelocity() const
void setOutputPrefix(std::string oPrefix)
std::string getnoSlipBcPos()
std::string getperiodicBcValues()
std::vector< SPtr< PreCollisionInteractor > > getInteractors()
void setBuoyancyEnabled(bool buoyancyEnabled)
std::vector< std::string > getPossNeighborFilesY(std::string sor)
void setnoSlipBcPos(std::string noSlipBcPos)
void setUseMeasurePoints(bool useMeasurePoints)
LBMSimulationParameter & getParHostAsReference(int level) const
void setMaxCoordX(std::vector< real > MaxCoordX)
void setPrintFiles(bool printfiles)
real getPressureRatio() const
std::string getcoordZ()
double hostForcing[3]
Definition Parameter.h:735
void setSendProcessNeighborsAfterFtoCX(int numberOfNodes, int level, int arrayIndex)
real getTurbulentPrandtlNumber() const
void setpressBcValues(std::string pressBcValues)
void setTranslateLBMtoSI(std::vector< real > translateLBMtoSI)
std::vector< int > getGridZ()
void setGridZ(std::vector< int > GridZ)
std::vector< real > getMinCoordY()
std::string getADKernel()
void setMaxCoordZ(std::vector< real > MaxCoordZ)
void setneighborWSB(std::string neighborWSB)
void setTimestepEnd(unsigned int tend)
void setQuadricLimiters(real quadricLimiterP, real quadricLimiterM, real quadricLimiterD)
void setInitialConditionAD(std::function< real(real, real, real)> initialConditionAD)
bool getUseTurbulentDiffusivity()
void setTimeDoCheckPoint(unsigned int tDoCheckPoint)
real * quadricLimitersD
Definition Parameter.h:739
LBMSimulationParameter & getParDeviceAsReference(int level) const
std::string getnumberNodes()
void setDiffusivity(real Diffusivity)
void setnoSlipBcQs(std::string noSlipBcQs)
bool getAllNodesAllFeatures() const
void setDevices(std::vector< uint > devices)
void setViscosityRatio(real ViscosityRatio)
std::vector< std::string > getPossNeighborFilesX(std::string sor)
std::string getpressBcValues()
void setVelocityLB(real Velocity)
void setGridY(std::vector< int > GridY)
void setPressRatio(real PressRatio)
double hostQuadricLimiters[3]
Definition Parameter.h:740
void setIsNeighborX(bool isNeighbor)
void setIsBodyForce(bool isBodyForce)
std::string getoutletBcValues()
void setcpBottom(std::string cpBottom)
void setGridX(std::vector< int > GridX)
std::string getConcentration()
void setNumprocs(int numprocs)
real getTimeRatio() const
std::string gettopBcValues()
static std::string toString(const T &t)
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
unsigned int uint
Definition DataTypes.h:47
void calcDragLift(Parameter *para, CudaMemoryManager *cudaMemoryManager, int lev)
Calculate drag and lift for a geometry.
Definition DragLift.cpp:54
void calcVelocityAndFluctuations(Parameter *para, CudaMemoryManager *cudaMemoryManager, uint tdiff)
void calcCp(Parameter *para, CudaMemoryManager *cudaMemoryManager, int lev)
Definition Cp.cpp:50
void calcMean(Parameter *para, uint tdiff)
Definition CalcMean.cpp:59
TurbulenceModel
An enumeration for selecting a template of the advection-diffusion turbulence model.
TurbulenceModel
An enumeration for selecting a turbulence model.
constexpr real computeRelaxationFrequency(real viscosity)
struct holds and manages the LB-parameter of the simulation
Definition Parameter.h:74