23template <MInt nDim, MInt nDist,
class SysEqn>
42template <MInt nDim, MInt nDist,
class SysEqn>
46 RECORD_TIMER_STOP(m_timers[Timers::Class]);
49template <MInt nDim, MInt nDist,
class SysEqn>
54 NEW_TIMER_GROUP_NOCREATE(m_timers[Timers::TimerGroup],
"Coupler LS LB Surface");
55 NEW_TIMER_NOCREATE(m_timers[Timers::Class],
"Total object lifetime", m_timers[Timers::TimerGroup]);
56 RECORD_TIMER_START(m_timers[Timers::Class]);
59 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::Constructor],
"Constructor", m_timers[Timers::Class]);
60 RECORD_TIMER_START(m_timers[Timers::Constructor]);
63 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::PreCouple],
"PreCouple", m_timers[Timers::Class]);
64 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::TransferToLevelSet],
"TransferToLevelSet", m_timers[Timers::PreCouple]);
65 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::SetExtensionVelocity],
"SetExtensionVelocity",
66 m_timers[Timers::TransferToLevelSet]);
67 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::ExtendVelocity],
"ExtendVelocity", m_timers[Timers::TransferToLevelSet]);
69 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::FindBoundaryCells],
"FindBoundaryCells", m_timers[Timers::PreCouple]);
70 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::InitOutsideDomain],
"InitOutsideDomain", m_timers[Timers::PreCouple]);
71 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::SetBoundaryCondition],
"SetBoundaryCondition", m_timers[Timers::PreCouple]);
74 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::PostCouple],
"PostCouple", m_timers[Timers::Class]);
75 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::ComputeBoundaryValues],
"ComputeBoundaryValues",
76 m_timers[Timers::PostCouple]);
77 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::CreateComm],
"CreateComm", m_timers[Timers::PostCouple]);
78 NEW_SUB_TIMER_NOCREATE(m_timers[Timers::ApplyBoundaryCondition],
"ApplyBoundaryCondition",
79 m_timers[Timers::PostCouple]);
86template <MInt nDim, MInt nDist,
class SysEqn>
91 m_lbSolverId = lbSolver().solverId();
92 m_lsSolverId = lsSolver().solverId();
94 const MFloat dx = a_cellLengthAtLevel(lbSolver().maxLevel());
96 conversionLbLs.velocity = sqrt(3) / a_Ma();
97 conversionLsLb.velocity = 1 / conversionLbLs.velocity;
99 conversionLbLs.length = dx;
100 conversionLsLb.length = 1 / conversionLbLs.length;
102 conversionLbLs.time = conversionLbLs.length / conversionLbLs.velocity;
103 conversionLsLb.time = 1 / conversionLbLs.time;
105 conversionLbLs.pressure =
POW2(conversionLbLs.velocity);
106 conversionLsLb.pressure = 1 / conversionLbLs.pressure;
108 if(!lbSolver().domainId()) {
109 std::cout <<
"CONVERSION" << std::endl
110 <<
"VEL LB LS " << conversionLbLs.velocity << std::endl
111 <<
"VEL LS LB " << conversionLsLb.velocity << std::endl
112 <<
"LEN LB LS " << conversionLbLs.length << std::endl
113 <<
"LEN LS LB " << conversionLsLb.length << std::endl
114 <<
"TIME LB LS " << conversionLbLs.time << std::endl
115 <<
"TIME LS LB " << conversionLsLb.time << std::endl
116 <<
"PRESSURE LB LS " << conversionLbLs.pressure << std::endl
117 <<
"PRESSURE LS LB " << conversionLsLb.pressure << std::endl;
120 lsSolver().m_timeStep = conversionLbLs.time;
122 const MFloat nu = a_Ma() * LBCS / a_Re() * lbSolver().m_referenceLength;
124 m_gravity =
POW2(m_Ga) *
POW2(nu) /
POW3(lbSolver().m_referenceLength);
126 m_surfaceTension = 1.0 * m_gravity *
POW2(lbSolver().m_referenceLength) / m_Eo;
130 const MFloat tau = (1 + 6 * nu) / 2.0;
133 const MInt maxLineLength = 256;
135 const MString divider =
"-------------------------------------------------------------------------";
138 ss <<
"FREE SURFACE PROBLEM SUMARRY"
140 ss << divider <<
"\n";
142 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"Mach", a_Ma());
144 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"Reynolds", a_Re());
146 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"Galileo", m_Ga);
148 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"Eotvos", m_Eo);
152 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"viscosity nu", nu);
154 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"relaxation tau", tau);
156 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"gravity g", m_gravity);
158 snprintf(
b, maxLineLength,
" | %-45s | %-20E | \n",
"surface tension sigma", m_surfaceTension);
161 if(!lbSolver().domainId()) {
162 cout << ss.str() << std::endl;
169template <MInt nDim, MInt nDist,
class SysEqn>
173 lbSolver().m_noLevelSetsUsedForMb = 1;
174 if(lsSolver().m_maxNoSets > 1) {
175 lbSolver().m_noLevelSetsUsedForMb = lsSolver().m_maxNoSets;
178 lbSolver().m_maxNoSets = lsSolver().m_maxNoSets;
179 lbSolver().m_constructGField = lsSolver().m_constructGField;
182 ASSERT(lbSolver().a_noCells(),
"");
188template <MInt nDim, MInt nDist,
class SysEqn>
193 m_Ga = Context::getBasicProperty<MFloat>(
"Ga", AT_, &m_Ga);
197 m_Eo = Context::getBasicProperty<MFloat>(
"Eo", AT_, &m_Eo);
199 m_initCurvature = 0.0;
200 m_initCurvature = Context::getBasicProperty<MFloat>(
"initCurvature", AT_, &m_initCurvature);
203 m_initHeight = Context::getBasicProperty<MFloat>(
"initHeight", AT_, &m_initHeight);
204 m_initHeight /= lbSolver().c_cellLengthAtLevel(lbSolver().maxLevel());
207template <MInt nDim, MInt nDist,
class SysEqn>
211 lbSolver().initializeMovingBoundaries();
212 lbBndCnd().initializeBndMovingBoundaries();
216template <MInt nDim, MInt nDist,
class SysEqn>
219 RECORD_TIMER_START(m_timers[Timers::PreCouple]);
222 if(recipeStep == 0) {
223 if(!lbSolver().domainId()) {
224 std::cout <<
"Pre LS couple ..." << std::endl;
227 RECORD_TIMER_START(m_timers[Timers::TransferToLevelSet]);
230 if(lbSolver().getCurrentTimeStep() > 1) {
235 RECORD_TIMER_START(m_timers[Timers::SetExtensionVelocity]);
236 setExtensionVelocity();
237 RECORD_TIMER_STOP(m_timers[Timers::SetExtensionVelocity]);
239 RECORD_TIMER_START(m_timers[Timers::ExtendVelocity]);
242 RECORD_TIMER_STOP(m_timers[Timers::ExtendVelocity]);
244 RECORD_TIMER_STOP(m_timers[Timers::TransferToLevelSet]);
249 if(!lbSolver().domainId()) {
250 std::cout <<
"Pre LB couple ..." << std::endl;
253 std::vector<MInt> maxGCellLevels(lsSolver().m_maxNoSets);
254 for(
MInt set = 0; set < lsSolver().m_maxNoSets; set++) {
255 maxGCellLevels[set] = lsSolver().a_maxGCellLevel(set);
257 RECORD_TIMER_START(m_timers[Timers::FindBoundaryCells]);
258 lbSolver().preCoupleLs(maxGCellLevels);
259 RECORD_TIMER_STOP(m_timers[Timers::FindBoundaryCells]);
261 RECORD_TIMER_START(m_timers[Timers::InitOutsideDomain]);
262 refillEmergedCells();
263 RECORD_TIMER_STOP(m_timers[Timers::InitOutsideDomain]);
266 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
267 a_mbCell().density(mbCell) = 1.0;
269 if(lbSolver().getCurrentTimeStep() == 1) {
273 RECORD_TIMER_START(m_timers[Timers::SetBoundaryCondition]);
276 interpolateCurvature(curvatureInterp);
279 if(a_mbCell().size() > 0) {
280 std::cout <<
"curv " << curvatureInterp[0] << std::endl;
284 MFloat l_curvature_sum = 0;
289 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
290 l_curvature_sum += curvatureInterp[mbCell];
293 const MInt l_count = a_mbCell().
size();
295 MPI_Allreduce(&l_count, &g_count, 1, MPI_INT, MPI_SUM, lbSolver().mpiComm(), AT_,
"count",
"count");
297 MFloat g_curvature_sum = 0;
298 MPI_Allreduce(&l_curvature_sum, &g_curvature_sum, 1, MPI_DOUBLE, MPI_SUM, lbSolver().mpiComm(), AT_,
"curv",
301 const MFloat dpCorr = 0.1 * (
POW3(g_curvature_sum / g_count / m_initCurvature) - 1.0);
303 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
304 const MFloat curvature = curvatureInterp[mbCell];
306 const MFloat dx = a_cellLengthAtLevel(lbSolver().maxLevel());
308 MFloat dpLB = -m_initHeight * m_gravity + dpCorr;
310 l_rho_hyd += 1 + 3.0 * dpLB;
313 IF_CONSTEXPR(nDim == 2) { dpLB += 2 * (curvature - m_initCurvature) * dx * m_surfaceTension; }
315 dpLB += 1 * (curvature - m_initCurvature) * dx * m_surfaceTension;
316 l_drho_curv += 3 * (curvature - m_initCurvature) * dx * m_surfaceTension;
319 const MFloat rhoLB = 1 + 3.0 * dpLB;
321 a_mbCell().density(mbCell) = rhoLB;
327 MPI_Allreduce(&l_rho_sum, &g_rho_sum, 1, MPI_DOUBLE, MPI_SUM, lbSolver().mpiComm(), AT_,
"curv",
"curv");
330 MPI_Allreduce(&l_rho_hyd, &g_rho_hyd, 1, MPI_DOUBLE, MPI_SUM, lbSolver().mpiComm(), AT_,
"curv",
"curv");
333 MPI_Allreduce(&l_drho_curv, &g_drho_curv, 1, MPI_DOUBLE, MPI_SUM, lbSolver().mpiComm(), AT_,
"curv",
"curv");
335 if(!lbSolver().domainId()) {
336 std::cout <<
" AVG curv " << g_curvature_sum / g_count <<
" AVG rho " << g_rho_sum / g_count <<
" AVG hyd rho "
337 << g_rho_hyd / g_count <<
" AVG curv drho " << g_drho_curv / g_count << std::endl;
340 RECORD_TIMER_STOP(m_timers[Timers::SetBoundaryCondition]);
342 RECORD_TIMER_STOP(m_timers[Timers::PreCouple]);
345template <MInt nDim, MInt nDist,
class SysEqn>
348 RECORD_TIMER_START(m_timers[Timers::PostCouple]);
351 if(recipeStep == 0) {
352 if(!lbSolver().domainId()) {
353 std::cout <<
"Post LS couple ..." << std::endl;
358 const MInt setId = 0;
359 for(
MInt cellId = 0; cellId < a_noLsCells(); cellId++) {
361 a_levelSetFunctionMb(cellId, setId) = a_levelSetFunctionG(cellId, setId);
368 else if(recipeStep == 1) {
369 if(!lbSolver().domainId()) {
370 std::cout <<
"Post LB couple ..." << std::endl;
373 RECORD_TIMER_START(m_timers[Timers::ComputeBoundaryValues]);
374 lbBndCnd().extrapolateVelocitiesMb();
378 &CouplingLb::MbCellCollector::velocity);
380 &CouplingLb::MbCellCollector::velocity);
381 auto setData = std::bind(setVel, &a_mbCell(), std::placeholders::_1, std::placeholders::_2);
382 auto getData = std::bind(getVel, &a_mbCell(), std::placeholders::_1, std::placeholders::_2);
384 auto cellMapping = std::bind(&CouplingLb::a_boundaryCellMb,
this, std::placeholders::_1, std::placeholders::_2);
386 lbSolver().exchangeSparseLeafValues(getData, setData, nDim, cellMapping);
389 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
390 const MFloat u = a_mbCell().velocity(mbCell, 0);
393 mTerm(1,
"Should not happen");
396 RECORD_TIMER_STOP(m_timers[Timers::ComputeBoundaryValues]);
398 RECORD_TIMER_START(m_timers[Timers::CreateComm]);
399 lbBndCnd().createMBComm();
400 RECORD_TIMER_STOP(m_timers[Timers::CreateComm]);
402 RECORD_TIMER_START(m_timers[Timers::ApplyBoundaryCondition]);
403 lbBndCnd().postCouple();
404 RECORD_TIMER_STOP(m_timers[Timers::ApplyBoundaryCondition]);
407 RECORD_TIMER_STOP(m_timers[Timers::PostCouple]);
410template <MInt nDim, MInt nDist,
class SysEqn>
414 for(
MInt id = 0;
id < a_noG0Cells(0);
id++) {
415 const MInt cellId = a_G0CellId(
id, 0);
417 if(lsSolver().a_isHalo(cellId)) {
421 const MInt mbCell = a_boundaryCellMb(cellId);
426 for(
MInt n = 0; n < nDim; n++) {
427 a_extensionVelocityG(cellId, n, 0) = a_mbCell().velocity(mbCell, n) * conversionLbLs.velocity;
430 if(std::isnan(a_extensionVelocityG(cellId, 0, 0))) {
431 std::cout <<
"Velocity nan in boundary cell..." << std::endl;
438 MFloat minBndDist = std::numeric_limits<MFloat>::min();
439 MInt minDistDir = -1;
442 for(
MInt n = 0; n < nDim; n++) {
445 IF_CONSTEXPR(nDim == 2) {
453 }
else if(
dist >= 18) {
457 bndDist *= a_levelSetFunctionG(cellId, 0);
459 if(minBndDist < bndDist) {
460 minBndDist = bndDist;
464 const MInt neighbor = lbSolver().c_neighborId(cellId, minDistDir);
466 const MInt nextMbCell = a_boundaryCellMb(neighbor);
468 if(nextMbCell > -1) {
470 for(
MInt n = 0; n < nDim; n++) {
471 a_extensionVelocityG(cellId, n, 0) = a_mbCell().velocity(nextMbCell, n) * conversionLbLs.velocity;
474 if(std::isnan(a_extensionVelocityG(cellId, 0, 0))) {
475 std::cout <<
"Velocity nan in boundary cell..." << std::endl;
479 for(
MInt n = 0; n < nDim; n++) {
480 a_extensionVelocityG(cellId, n, 0) = 0.0;
482 std::cout <<
"G0 cell " << lbSolver().c_globalId(cellId) <<
" neighbor " << lbSolver().c_globalId(neighbor)
487 for(
MInt n = 0; n < nDim; n++) {
490 IF_CONSTEXPR(nDim == 2) {
498 }
else if(
dist >= 18) {
502 bndDist *= a_levelSetFunctionG(cellId, 0);
503 std::cout <<
"Dist " <<
dist <<
" bndDist " << bndDist <<
" normal_y " << a_normalVectorG(cellId, 1, 0)
507 mTerm(1,
"Cant find corresponding LB bnd cell for given G0 cell. Should not happen.");
513template <MInt nDim, MInt nDist,
class SysEqn>
516 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
517 const MInt cellId = a_mbCell().cellId(mbCell);
519 const MFloat uLB = a_mbCell().velocity(mbCell, 0);
520 const MFloat vLB = a_mbCell().velocity(mbCell, 1);
522 const MFloat uLS = uLB * conversionLbLs.velocity;
523 const MFloat vLS = vLB * conversionLbLs.velocity;
525 if(!std::isnan(uLS) && !std::isnan(vLS)) {
526 a_extensionVelocityG(cellId, 0, 0) = uLS;
527 a_extensionVelocityG(cellId, 1, 0) = vLS;
530 MInt minDistDir = -1;
531 MFloat minWallDistance = F2;
533 if(minWallDistance > a_mbCell().distance(mbCell,
dist)) {
534 minWallDistance = a_mbCell().distance(mbCell,
dist);
539 ASSERT(minDistDir > -1,
"minDistDir not found!");
541 const MInt neighbor = lbSolver().c_neighborId(cellId, minDistDir);
543 if(neighbor == -1 || lsSolver().a_isHalo(neighbor)) {
549 a_extensionVelocityG(neighbor, 0, 0) = uLS;
550 a_extensionVelocityG(neighbor, 1, 0) = vLS;
553 if(!lsSolver().a_isHalo(cellId)) {
555 if(std::isnan(uLS) || std::isnan(vLS)) {
556 std::cout <<
"attempt to set nan at cell " << cellId <<
" which is an halo " << lsSolver().a_isHalo(cellId)
557 <<
" which is in " << (a_levelSetFunctionMb(cellId, 0) > 0) << std::endl;
561 a_extensionVelocityG(cellId, 0, 0) = uLS;
562 a_extensionVelocityG(cellId, 1, 0) = vLS;
568 MInt minDistDir = -1;
569 MFloat minWallDistance = F2;
571 if(minWallDistance > a_mbCell().distance(mbCell,
dist)) {
572 minWallDistance = a_mbCell().distance(mbCell,
dist);
578 ASSERT(minDistDir > -1,
"minDistDir not found!");
580 const MInt neighbor = lbSolver().c_neighborId(cellId, minDistDir);
583 const MInt oppositeNeighbor = lbSolver().c_neighborId(cellId, opposite);
585 if(neighbor == -1 || lsSolver().a_isHalo(neighbor) || lsSolver().a_isHalo(oppositeNeighbor)) {
589 if(std::isnan(uLS) || std::isnan(vLS)) {
590 std::cout <<
"attempt to set nan at neighbor " << neighbor << std::endl;
591 std::cout <<
"cell itself is halo " << lsSolver().a_isHalo(cellId) << std::endl;
592 std::cout <<
"extrap neighbor is halo " << lsSolver().a_isHalo(oppositeNeighbor) << std::endl;
596 a_extensionVelocityG(neighbor, 0, 0) = uLS;
597 a_extensionVelocityG(neighbor, 1, 0) = vLS;
603template <MInt nDim, MInt nDist,
class SysEqn>
605 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
606 const MInt pCellId = a_mbCell().cellId(mbCell);
609 MInt minDistDir = -1;
610 MFloat minWallDistance = F2;
612 if(minWallDistance > a_mbCell().distance(mbCell,
dist)) {
613 minWallDistance = a_mbCell().distance(mbCell,
dist);
618 ASSERT(minDistDir > -1,
"minDistDir not found!");
620 const MFloat q = lbBndCnd().getDistanceMb(pCellId, mbCell, minDistDir);
622 const MInt neighbor = lbSolver().c_neighborId(pCellId, minDistDir);
635 const MFloat rad1 = 1 / a_curvatureG(pCellId, 0);
636 const MFloat rad2 = 1 / a_curvatureG(neighbor, 0);
638 const MFloat rad = rad1 * (1 - q) + rad2 * q;
641 const MFloat lin = 1 / rad;
643 curvature[mbCell] = lin;
647template <MInt nDim, MInt nDist,
class SysEqn>
649 for(
MInt mbCell = 0; mbCell < a_mbCell().size(); mbCell++) {
650 const MInt pCellId = a_mbCell().cellId(mbCell);
653 MInt minDistDir = -1;
654 MFloat minWallDistance = F2;
656 if(minWallDistance > a_mbCell().distance(mbCell,
dist)) {
657 minWallDistance = a_mbCell().distance(mbCell,
dist);
662 ASSERT(minDistDir > -1,
"minDistDir not found!");
664 const MFloat q = lbBndCnd().getDistanceMb(pCellId, mbCell, minDistDir);
666 ASSERT(minDistDir > -1,
"No min dist found.");
668 const MInt neighbor = lbSolver().c_neighborId(pCellId, minDistDir);
674 for(
MInt n = 0; n < nDim; n++) {
676 lsSolver().a_normalVectorG(pCellId, n, 0) * (1 - q) + lsSolver().a_normalVectorG(neighbor, n, 0) * q;
678 a_mbCell().normal(mbCell, n) = lin;
687template <MInt nDim, MInt nDist,
class SysEqn>
691 lbSolver().m_geometryIntersection->m_noEmbeddedBodies = lbSolver().m_noEmbeddedBodies;
692 lbSolver().m_geometryIntersection->m_noLevelSetsUsedForMb = lbSolver().m_noLevelSetsUsedForMb;
693 lbSolver().m_geometryIntersection->m_bodyToSetTable = lsSolver().m_bodyToSetTable;
694 lbSolver().m_geometryIntersection->m_setToBodiesTable = lsSolver().m_setToBodiesTable;
695 lbSolver().m_geometryIntersection->m_noBodiesInSet = lsSolver().m_noBodiesInSet;
699template <MInt nDim, MInt nDist,
class SysEqn>
703 for(
MInt i = 0; i < a_noCells(); i++) {
704 if(lbSolver().a_isHalo(i)) {
709 if(a_isActive(i) && a_wasActive(i)) {
716 for(
MInt n = 0; n < nDim; n++) {
717 lbSolver().a_variable(i, n) = 0.0;
719 lbSolver().a_variable(i, nDim) = 1.0;
722 if(a_isActive(i) && !a_wasActive(i)) {
723 lbBndCnd().refillEmergedCell(i);
728template <MInt nDim, MInt nDist,
class SysEqn>
733 for(
MInt cellId = 0; cellId < a_noLsCells(); cellId++) {
734 if(lsSolver().a_isHalo(cellId)) {
738 if(a_levelSetFunctionG(cellId, 0) > 0) {
744 for(
MInt n = 0; n < nDim; n++) {
745 COG[n] += dm * lsSolver().c_coordinate(cellId, n);
750 if(lsSolver().noDomains() > 1) {
751 MPI_Allreduce(MPI_IN_PLACE, COG, 2, MPI_DOUBLE, MPI_SUM, lsSolver().mpiComm(), AT_,
"COG",
"COG");
752 MPI_Allreduce(MPI_IN_PLACE, &mass, 1, MPI_DOUBLE, MPI_SUM, lsSolver().mpiComm(), AT_,
"mass",
"mass");
755 for(
MInt n = 0; n < nDim; n++) {
759 const MFloat dx = a_cellLengthAtLevel(lbSolver().maxLevel());
761 if(!lsSolver().domainId()) {
762 std::cout <<
"Bubble COG " << COG[0] <<
" " << COG[1] <<
" mass " << mass <<
" hydrostatic pressure rho "
763 << 1.0 - 3.0 * COG[1] / dx * m_gravity << std::endl;
766 if(!lsSolver().domainId()) {
768 log = fopen(
"bubble.log",
"a+");
770 fprintf(log,
"%f ", COG[1]);
This class represents all LB models.
void postCouple(MInt recipeStep=0) override
void setExtensionVelocity()
void initData()
Initialize coupling-class-specific Data.
void setExtensionVelocityB()
void readProperties()
reads lsfvmb-coupling-specific data
void interpolateCurvature(MFloatScratchSpace &curvature)
std::array< MInt, Timers::_count > m_timers
LsLbSurface(MInt couplingId, LsSolver *ls, LbSolver *lb)
void checkProperties()
Checks property-data which is read in by both ls-and Lb-Solver.
void updateGeometry()
Updates the member-variables in the geometry-intersection class.
void refillEmergedCells()
void preCouple(MInt) override
This class is a ScratchSpace.
Class that represents LB cell collector.
void mTerm(const MInt errorCode, const MString &location, const MString &message)
constexpr Real POW3(const Real x)
constexpr Real POW2(const Real x)
std::basic_string< char > MString
int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, const MString &name, const MString &sndvarname, const MString &rcvvarname)
same as MPI_Allreduce
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)
static constexpr MFloat ppdfDir(MInt i, MInt j)
static constexpr MInt oppositeDist(MInt i)