21#define DOCTEST_CONFIG_IMPLEMENT
31#include <nlohmann/json.hpp>
39static constexpr int g_dim = 2;
40static constexpr int g_nv = 1;
48static std::string meshPath(
const std::string &name)
50 std::string f(__FILE__);
51 for (
int i = 0;
i < 4;
i++)
53 auto pos = f.rfind(
'/');
54 if (pos == std::string::npos)
56 if (pos != std::string::npos)
59 return f +
"/data/mesh/" + name;
63 const std::string &file,
bool periodic,
66 auto mesh = std::make_shared<UnstructuredMesh>(g_mpi, g_dim);
72 mesh->SetPeriodicGeometry(
73 tPoint{Lx, 0, 0}, zero, zero,
74 tPoint{0, Ly, 0}, zero, zero,
75 tPoint{0, 0, 0}, zero, zero);
78 reader.ReadFromCGNSSerial(meshPath(file));
79 reader.Deduplicate1to1Periodic();
80 reader.BuildCell2Cell();
84 reader.MeshPartitionCell2Cell(pOpt);
85 reader.PartitionReorderToMeshCell2Cell();
87 mesh->RecoverNode2CellAndNode2Bnd();
88 mesh->RecoverCell2CellAndBnd2Cell();
89 mesh->BuildGhostPrimary();
90 mesh->AdjGlobal2LocalPrimary();
93 for (
int ib = 0; ib < nBisect; ib++)
95 auto meshO2 = std::make_shared<UnstructuredMesh>(g_mpi, g_dim);
96 meshO2->BuildO2FromO1Elevation(*
mesh);
97 meshO2->RecoverNode2CellAndNode2Bnd();
98 meshO2->RecoverCell2CellAndBnd2Cell();
99 meshO2->BuildGhostPrimary();
100 meshO2->AdjGlobal2LocalPrimary();
102 meshO2->AdjLocal2GlobalPrimary();
103 auto meshBis = std::make_shared<UnstructuredMesh>(g_mpi, g_dim);
104 meshBis->BuildBisectO1FormO2(*meshO2);
105 meshBis->RecoverNode2CellAndNode2Bnd();
106 meshBis->RecoverCell2CellAndBnd2Cell();
107 meshBis->BuildGhostPrimary();
108 meshBis->AdjGlobal2LocalPrimary();
116 const std::string &file,
bool periodic,
119 auto mesh = buildMeshUpToGhost(file, periodic, Lx, Ly, nBisect);
120 mesh->InterpolateFace();
121 mesh->AssertOnFaces();
182 auto vr = std::make_shared<tVR>(g_mpi,
mesh);
185 nlohmann::ordered_json
j;
186 defaultSettings.WriteIntoJson(
j);
188 int order = recMethodOrder(method);
190 j[
"intOrder"] = std::max(
order + 2, 5);
191 j[
"cacheDiffBase"] =
true;
193 j[
"SORInstead"] =
false;
194 j[
"jacobiRelax"] = 1.0;
202 j[
"subs2ndOrder"] = 1;
207 j[
"subs2ndOrder"] = 0;
208 j[
"functionalSettings"][
"dirWeightScheme"] =
"HQM_OPT";
209 j[
"functionalSettings"][
"geomWeightScheme"] =
"HQM_SD";
210 j[
"functionalSettings"][
"geomWeightPower"] = 0.5;
211 j[
"functionalSettings"][
"geomWeightBias"] = 1.0;
215 j[
"subs2ndOrder"] = 0;
216 j[
"functionalSettings"][
"dirWeightScheme"] =
"Factorial";
217 j[
"functionalSettings"][
"geomWeightScheme"] =
"GWNone";
220 vr->parseSettings(
j);
221 if (
mesh->isPeriodic)
222 vr->SetPeriodicTransformations();
223 vr->ConstructMetrics();
224 vr->ConstructBaseAndWeight();
225 vr->ConstructRecCoeff();
234static tVR::TFBoundary<g_nv> makeDirichletBC(
const ScalarFunc &f)
239 return Eigen::Vector<DNDS::real, g_nv>{f(pPhy)};
243static tVR::TFBoundary<g_nv> g_zeroBC =
246{
return Eigen::Vector<DNDS::real, g_nv>::Zero(); };
257 const tVR::TFBoundary<g_nv> &bc,
262 auto mesh = vr->mesh;
271 auto qCell = vr->GetCellQuad(iCell);
272 Eigen::Vector<DNDS::real, g_nv> uc;
274 qCell.IntegrationSimple(
276 [&](
auto &vInc,
int iG)
278 vInc(0) = exactFunc(vr->GetCellQuadraturePPhys(iCell, iG)) *
279 vr->GetCellJacobiDet(iCell, iG);
281 u[iCell] = uc / vr->GetCellVol(iCell);
283 u.
trans.startPersistentPull();
284 u.
trans.waitPersistentPull();
291 vr->BuildUGrad(uGrad, 1);
292 vr->DoReconstruction2ndGrad<g_nv>(uGrad, u, bc, 1 );
293 uGrad.trans.startPersistentPull();
294 uGrad.trans.waitPersistentPull();
297 static const auto Seq012 = Eigen::seq(Eigen::fix<0>, Eigen::fix<g_dim - 1>);
301 auto qCell = vr->GetCellQuad(iCell);
303 qCell.IntegrationSimple(
307 tPoint pPhy = vr->GetCellQuadraturePPhys(iCell, iG);
309 (uGrad[iCell].transpose() *
310 (pPhy - vr->GetCellBary(iCell))(Seq012))(0);
312 vInc = std::abs(uRecVal - uExact) * vr->GetCellJacobiDet(iCell, iG);
318 return errGlobal / vr->GetGlobalVol();
324 vr->BuildURec(uRec, 1);
325 vr->BuildURec(uRecNew, 1);
328 for (
int iter = 0; iter < maxIters; iter++)
330 vr->DoReconstructionIter<g_nv>(
331 uRec, uRecNew, u, bc,
true);
336 incLocal += (uRecNew[iCell] - uRec[iCell]).array().square().sum();
339 incGlobal = std::sqrt(incGlobal /
mesh->NumCellGlobal());
341 std::swap(uRec, uRecNew);
342 uRec.trans.startPersistentPull();
343 uRec.trans.waitPersistentPull();
346 if (printProgress && g_mpi.
rank == 0 && (iter < 5 || (iter + 1) % 20 == 0))
347 std::cout <<
" iter " << iter + 1 <<
" inc = "
348 << std::scientific << incGlobal << std::endl;
350 if (convTol > 0 && incGlobal < convTol)
352 if (printProgress && g_mpi.
rank == 0)
353 std::cout <<
" converged at iter " << iter + 1 << std::endl;
362 auto qCell = vr->GetCellQuad(iCell);
364 qCell.IntegrationSimple(
368 Eigen::VectorXd baseVal =
369 vr->GetIntPointDiffBaseValue(
370 iCell, -1, -1, iG, std::array<int, 1>{0}, 1) *
372 DNDS::real uRecVal = baseVal(0) + u[iCell](0);
373 DNDS::real uExact = exactFunc(vr->GetCellQuadraturePPhys(iCell, iG));
374 vInc = std::abs(uRecVal - uExact) * vr->GetCellJacobiDet(iCell, iG);
380 return errGlobal / vr->GetGlobalVol();
401 MPI_Init(&argc, &argv);
405 std::cout <<
"=== Building meshes ===" << std::endl;
407 g_wall_mesh = buildMesh(
"Uniform_3x3_wall.cgns",
false, 0, 0, 0);
409 for (
int ib = 0; ib < 3; ib++)
412 std::cout <<
" IV10_10 bisect=" << ib << std::endl;
413 g_iv10[ib] = buildMesh(
"IV10_10.cgns",
true, 10, 10, ib);
415 for (
int ib = 0; ib < 3; ib++)
418 std::cout <<
" IV10U_10 bisect=" << ib << std::endl;
419 g_iv10u[ib] = buildMesh(
"IV10U_10.cgns",
true, 10, 10, ib);
423 std::cout <<
"=== Meshes built ===" << std::endl;
425 doctest::Context ctx;
426 ctx.applyCommandLine(argc, argv);
430 for (
auto &
m : g_iv10)
432 for (
auto &
m : g_iv10u)
445{
return std::sin(g_k *
p[0]) * std::cos(g_k *
p[1]); };
448{
return std::cos(g_k *
p[0]) + std::cos(g_k *
p[1]); };
454#define POLY_TEST(testName, method, polyFunc, polyDeg) \
455 TEST_CASE("Wall/" testName "/" #method) \
457 ScalarFunc f = polyFunc; \
458 auto vr = buildVR(g_wall_mesh, RecMethod::method); \
459 auto bc = makeDirichletBC(f); \
460 DNDS::real err = runTest(vr, RecMethod::method, f, bc, 100, 1e-15, false); \
461 if (g_mpi.rank == 0) \
462 std::cout << "[Wall/" testName "/" #method "] err = " \
463 << std::scientific << err << std::endl; \
465 CHECK(err < 1e-12); \
484 {
return p[0] + 2 *
p[1]; }, 1)
486 {
return p[0] + 2 *
p[1]; }, 1)
488 {
return p[0] + 2 *
p[1]; }, 1)
490 {
return p[0] + 2 *
p[1]; }, 1)
492 {
return p[0] + 2 *
p[1]; }, 1)
496 {
return p[0] *
p[0] +
p[1] *
p[1]; }, 2)
498 {
return p[0] *
p[0] +
p[1] *
p[1]; }, 2)
500 {
return p[0] *
p[0] +
p[1] *
p[1]; }, 2)
504 {
return p[0] *
p[0] *
p[0] +
p[0] *
p[1] *
p[1]; }, 3)
506 {
return p[0] *
p[0] *
p[0] +
p[0] *
p[1] *
p[1]; }, 3)
516struct PeriodicTestCase
518 const char *meshName;
522 const char *funcName;
526 bool checkConvergence;
531static PeriodicTestCase g_periodicTests[] = {
533 {
"IV10", g_iv10,
RecMethod::GaussGreen, sinCos,
"sincos", 1, 0, {1.5599270188e-02, 3.4233789068e-03, 7.8943623278e-04},
false},
534 {
"IV10", g_iv10,
RecMethod::VFV_P1_HQM, sinCos,
"sincos", 200, 1e-14, {4.6604402914e-02, 9.2961629825e-03, 1.5347312301e-03},
true},
535 {
"IV10", g_iv10,
RecMethod::VFV_P2_HQM, sinCos,
"sincos", 200, 1e-14, {3.0528143687e-03, 2.3057099673e-04, 2.4367733525e-05},
true},
536 {
"IV10", g_iv10,
RecMethod::VFV_P3_HQM, sinCos,
"sincos", 200, 1e-14, {1.9105219870e-03, 4.6701352192e-05, 1.4890868814e-06},
false},
537 {
"IV10", g_iv10,
RecMethod::VFV_P1_Default, sinCos,
"sincos", 200, 1e-14, {4.6604402914e-02, 9.2961629825e-03, 1.5347312301e-03},
false},
538 {
"IV10", g_iv10,
RecMethod::VFV_P3_Default, sinCos,
"sincos", 200, 1e-14, {1.8840503911e-03, 2.4995731251e-05, 8.3670061853e-07},
false},
541 {
"IV10U", g_iv10u,
RecMethod::GaussGreen, sinCos,
"sincos", 1, 0, {1.3027440876e-02, 3.8074751503e-03, 1.0853979656e-03},
false},
542 {
"IV10U", g_iv10u,
RecMethod::VFV_P1_HQM, sinCos,
"sincos", 200, 1e-14, {1.2040354507e-02, 2.2707678072e-03, 4.6833420900e-04},
false},
543 {
"IV10U", g_iv10u,
RecMethod::VFV_P2_HQM, sinCos,
"sincos", 200, 1e-14, {5.5617445849e-04, 5.9964034731e-05, 6.4337896956e-06},
false},
544 {
"IV10U", g_iv10u,
RecMethod::VFV_P3_HQM, sinCos,
"sincos", 200, 1e-14, {1.5878119293e-04, 9.8836538778e-06, 4.3407055649e-07},
false},
547 {
"IV10", g_iv10,
RecMethod::VFV_P3_HQM, cosPlusCos,
"cos+cos", 200, 1e-14, {5.5612138851e-04, 1.6082305163e-05, 6.6188225747e-07},
false},
550static const int g_nPeriodicTests =
sizeof(g_periodicTests) /
sizeof(g_periodicTests[0]);
554 for (
int ti = 0; ti < g_nPeriodicTests; ti++)
556 auto &tc = g_periodicTests[ti];
557 std::string label = std::string(tc.meshName) +
"/" + tc.funcName +
558 "/" + recMethodName(tc.method);
560 SUBCASE(label.c_str())
562 for (
int ib = 0; ib < 3; ib++)
565 auto mesh = tc.meshArray[ib];
566 auto vr = buildVR(
mesh, tc.method);
567 bool print = (ib == 0 && tc.checkConvergence);
569 g_zeroBC, tc.maxIters, tc.convTol, print);
572 std::cout <<
"[" << label <<
" bis=" << ib
573 <<
"] err = " << std::scientific
574 << std::setprecision(10) <<
err << std::endl;
576 if (tc.golden[ib] != 0.0)
577 CHECK(
err == doctest::Approx(tc.golden[ib]).epsilon(1e-6));
596 vr->BuildURec(uRec, 1);
597 vr->BuildURec(uRecNew, 1);
599 for (
DNDS::index iCell = 0; iCell < vr->mesh->NumCell(); iCell++)
601 auto qCell = vr->GetCellQuad(iCell);
602 Eigen::Vector<DNDS::real, g_nv> uc;
604 qCell.IntegrationSimple(
606 [&](
auto &vInc,
int iG)
608 vInc(0) = sinCos(vr->GetCellQuadraturePPhys(iCell, iG)) *
609 vr->GetCellJacobiDet(iCell, iG);
611 u[iCell] = uc / vr->GetCellVol(iCell);
613 u.
trans.startPersistentPull();
614 u.
trans.waitPersistentPull();
618 for (
int iter = 0; iter < 200; iter++)
620 vr->DoReconstructionIter<g_nv>(uRec, uRecNew, u, g_zeroBC,
true);
623 for (
DNDS::index iCell = 0; iCell < vr->mesh->NumCell(); iCell++)
624 incLocal += (uRecNew[iCell] - uRec[iCell]).array().square().sum();
627 incGlobal = std::sqrt(incGlobal / vr->mesh->NumCellGlobal());
629 std::swap(uRec, uRecNew);
630 uRec.trans.startPersistentPull();
631 uRec.trans.waitPersistentPull();
634 if (incGlobal < 1e-14)
636 convergedAt = iter + 1;
642 std::cout <<
"[Convergence P2-HQM IV10] " << convergedAt
643 <<
" iters, final inc = " << std::scientific << lastInc << std::endl;
645 CHECK(convergedAt > 0);
646 CHECK(convergedAt < 200);
653TEST_CASE(
"DEBUG compare InterpolateFace vs Legacy face2cell")
656 auto meshA = buildMeshUpToGhost(
"IV10_10.cgns",
true, 10, 10, 0);
657 auto meshB = buildMeshUpToGhost(
"IV10_10.cgns",
true, 10, 10, 0);
659 meshA->InterpolateFace();
660 meshA->AssertOnFaces();
661 meshB->InterpolateFaceLegacy();
662 meshB->AssertOnFaces();
670 std::cout <<
"[DBG] nFaceOwned: DSL=" << nFaceA <<
" Legacy=" << nFaceB
671 <<
" nFaceProc: DSL=" << nFaceProcA <<
" Legacy=" << nFaceProcB << std::endl;
684 if (nFacesA != nFacesB)
687 std::cout <<
"[DBG] Cell " << iCell <<
" nFaces differ: " << nFacesA <<
" vs " << nFacesB << std::endl;
693 DNDS::index iFaceA = meshA->cell2face(iCell, ic2f);
694 DNDS::index iFaceB = meshB->cell2face(iCell, ic2f);
708 bool same = (gA0 == gB0 && gA1 == gB1);
709 bool swapped = (!same && gA0 == gB1 && gA1 == gB0);
717 std::cout <<
"[DBG rank=" << g_mpi.
rank <<
"] Cell " << iCell
719 <<
" f2c DSL=(" << gA0 <<
"," << gA1 <<
")"
720 <<
" Legacy=(" << gB0 <<
"," << gB1 <<
")"
721 << (swapped ?
" SWAPPED" :
" DIFF")
726 auto f2nA = meshA->face2node[iFaceA];
727 auto f2nB = meshB->face2node[iFaceB];
728 if (f2nA.size() == f2nB.size())
730 std::vector<DNDS::index> gnAOrd(f2nA.size()), gnBOrd(f2nB.size());
731 for (
int k = 0; k < (int)f2nA.size(); k++)
732 gnAOrd[k] = meshA->coords.trans.pLGhostMapping->operator()(-1, f2nA[k]);
733 for (
int k = 0; k < (int)f2nB.size(); k++)
734 gnBOrd[k] = meshB->coords.trans.pLGhostMapping->operator()(-1, f2nB[k]);
735 if (gnAOrd != gnBOrd)
740 std::cout <<
"[DBG rank=" << g_mpi.
rank <<
"] Cell " << iCell
743 for (
auto v : gnAOrd)
744 std::cout <<
v <<
" ";
745 std::cout <<
") Legacy=(";
746 for (
auto v : gnBOrd)
747 std::cout <<
v <<
" ";
748 std::cout <<
")" << std::endl;
754 auto zoneA = meshA->faceElemInfo(iFaceA, 0).zone;
755 auto zoneB = meshB->faceElemInfo(iFaceB, 0).zone;
761 std::vector<DNDS::index> gnAF, gnBF;
762 for (
int k = 0; k < (int)f2nA.size(); k++)
763 gnAF.push_back(meshA->coords.trans.pLGhostMapping->operator()(-1, f2nA[k]));
764 for (
int k = 0; k < (int)f2nB.size(); k++)
765 gnBF.push_back(meshB->coords.trans.pLGhostMapping->operator()(-1, f2nB[k]));
766 std::cout <<
"[DBG rank=" << g_mpi.
rank <<
"] Cell " << iCell
768 <<
" zone DSL=" << zoneA <<
" Legacy=" << zoneB
769 <<
" f2c DSL=(" << gA0 <<
"," << gA1 <<
")"
772 std::cout <<
v <<
" ";
773 std::cout <<
") Legacy=(";
775 std::cout <<
v <<
" ";
776 std::cout <<
")" << std::endl;
782 DNDS::index totalDiffF2C = 0, totalSwapped = 0, totalDiffF2N = 0, totalDiffZone = 0;
790 std::cout <<
"[DBG] Total face2cell differences: " << totalDiffF2C
791 <<
" (swapped: " << totalSwapped <<
")" << std::endl;
792 std::cout <<
"[DBG] Total face2node order differences: " << totalDiffF2N << std::endl;
793 std::cout <<
"[DBG] Total zone differences: " << totalDiffZone << std::endl;
796 CHECK(totalDiffF2C == 0);
797 CHECK(totalDiffF2N == 0);
798 CHECK(totalDiffZone == 0);
815static tVR::tLimitBatch<g_nv> identityFM(
816 const Eigen::Vector<DNDS::real, g_nv> &,
817 const Eigen::Vector<DNDS::real, g_nv> &,
819 const Eigen::Ref<tVR::tLimitBatch<g_nv>> &data)
830 const tVR::TFBoundary<g_nv> &bc,
837 auto mesh = vr->mesh;
846 auto qCell = vr->GetCellQuad(iCell);
847 Eigen::Vector<DNDS::real, g_nv> uc;
849 qCell.IntegrationSimple(
851 [&](
auto &vInc,
int iG)
853 vInc(0) = exactFunc(vr->GetCellQuadraturePPhys(iCell, iG)) *
854 vr->GetCellJacobiDet(iCell, iG);
856 u[iCell] = uc / vr->GetCellVol(iCell);
858 u.
trans.startPersistentPull();
859 u.
trans.waitPersistentPull();
863 vr->BuildURec(uRec, 1);
864 vr->BuildURec(uRecNew, 1);
865 vr->BuildURec(uRecBuf, 1);
867 for (
int iter = 0; iter < maxIters; iter++)
869 vr->DoReconstructionIter<g_nv>(uRec, uRecNew, u, bc,
true);
870 std::swap(uRec, uRecNew);
871 uRec.trans.startPersistentPull();
872 uRec.trans.waitPersistentPull();
876 incLocal += (uRecNew[iCell] - uRec[iCell]).array().square().sum();
879 incGlobal = std::sqrt(incGlobal /
mesh->NumCellGlobal());
880 if (convTol > 0 && incGlobal < convTol)
887 vr->DoCalculateSmoothIndicator<g_nv, 1>(si, uRec, u, std::array<int, 1>{0});
888 si.trans.startPersistentPull();
889 si.trans.waitPersistentPull();
892 tVR::tFMEig<g_nv> fm = identityFM;
893 tVR::tFMEig<g_nv> fmi = identityFM;
895 if (limiterKind == 0)
896 vr->DoLimiterWBAP_C<g_nv>(u, uRec, uRecNew, uRecBuf, si, ifAll, fm, fmi,
true);
898 vr->DoLimiterWBAP_3<g_nv>(u, uRec, uRecNew, uRecBuf, si, ifAll, fm, fmi,
true);
901 auto &uRecLim = uRecNew;
907 auto qCell = vr->GetCellQuad(iCell);
909 qCell.IntegrationSimple(
913 Eigen::VectorXd baseVal =
914 vr->GetIntPointDiffBaseValue(
915 iCell, -1, -1, iG, std::array<int, 1>{0}, 1) *
917 DNDS::real uRecVal = baseVal(0) + u[iCell](0);
918 DNDS::real uExact = exactFunc(vr->GetCellQuadraturePPhys(iCell, iG));
919 vInc = std::abs(uRecVal - uExact) * vr->GetCellJacobiDet(iCell, iG);
925 return errGlobal / vr->GetGlobalVol();
944 {
"IV10", g_iv10,
RecMethod::VFV_P2_HQM, sinCos,
"sincos", 0,
"CWBAP",
true, {6.6975633577e-02, 2.2647765241e-02, 9.2028443979e-03}},
947 {
"IV10", g_iv10,
RecMethod::VFV_P3_HQM, sinCos,
"sincos", 0,
"CWBAP",
true, {7.1333971937e-02, 2.6226392939e-02, 1.1194383457e-02}},
950 {
"IV10U", g_iv10u,
RecMethod::VFV_P2_HQM, sinCos,
"sincos", 0,
"CWBAP",
true, {3.5176301510e-02, 1.4925026476e-02, 6.9002847378e-03}},
953 {
"IV10", g_iv10,
RecMethod::VFV_P2_HQM, sinCos,
"sincos", 1,
"3WBAP",
true, {6.6488044323e-02, 2.2593150005e-02, 9.1963848358e-03}},
956 {
"IV10", g_iv10,
RecMethod::VFV_P3_HQM, sinCos,
"sincos", 1,
"3WBAP",
true, {7.1372867657e-02, 2.6697894435e-02, 1.1593632890e-02}},
959static const int g_nLimiterTests =
sizeof(g_limiterTests) /
sizeof(g_limiterTests[0]);
961TEST_CASE(
"Limiter procedure: reconstruction + smooth indicator + WBAP limiter")
963 for (
int ti = 0; ti < g_nLimiterTests; ti++)
965 auto &tc = g_limiterTests[ti];
966 std::string label = std::string(tc.meshName) +
"/" + tc.
funcName +
967 "/" + recMethodName(tc.method) +
"/" + tc.limName;
969 SUBCASE(label.c_str())
971 for (
int ib = 0; ib < 3; ib++)
974 auto mesh = tc.meshArray[ib];
975 auto vr = buildVR(
mesh, tc.method);
977 vr, tc.method, tc.func, g_zeroBC,
978 200, 1e-14, tc.limiterKind, tc.ifAll,
false);
981 std::cout <<
"[" << label <<
" bis=" << ib
982 <<
"] limited err = " << std::scientific
983 << std::setprecision(10) <<
err << std::endl;
985 if (tc.golden[ib] != 0.0)
986 CHECK(
err == doctest::Approx(tc.golden[ib]).epsilon(1e-6));
Eigen::Matrix< real, 3, 3 > m
Primary solver state container: an ArrayEigenMatrix pair with MPI-collective vector-space operations.
The VR class that provides any information needed in high-order CFV.
the host side operators are provided as implemented
const MPI_Datatype DNDS_MPI_INDEX
MPI datatype matching index (= MPI_INT64_T).
DNDS_CONSTANT const index UnInitIndex
Sentinel "not initialised" index value (= INT64_MIN).
int32_t rowsize
Row-width / per-row element-count type (signed 32-bit).
DNDS_CONSTANT const real pi
π in double precision (matches DNDS_E_PI macro).
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
std::shared_ptr< T > ssp
Shortened alias for std::shared_ptr used pervasively in DNDSR.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
DNDS_CONSTANT const real veryLargeReal
Catch-all upper bound ("practically infinity") for physical scalars.
const MPI_Datatype DNDS_MPI_REAL
MPI datatype matching real (= MPI_REAL8).
TTrans trans
Ghost-communication engine bound to father and son.
A means to translate nlohmann json into c++ primitive data types and back; and stores then during com...
Lightweight bundle of an MPI communicator and the calling rank's coordinates.
int rank
This rank's 0-based index within comm (-1 until initialised).
MPI_Comm comm
The underlying MPI communicator handle.
void setWorld()
Initialise the object to MPI_COMM_WORLD. Requires MPI_Init to have run.
ssp< UnstructuredMesh > * meshArray
Eigen::Matrix< real, 5, 1 > v
TEST_CASE("3D: VFV P2 HQM error < P1 on sinCos3D")
std::function< DNDS::real(const tPoint &)> ScalarFunc
#define POLY_TEST(testName, method, polyFunc, polyDeg)
CFV::VariationalReconstruction< g_dim > tVR
const tPoint const tPoint const tPoint & p
const tPoint const tPoint GaussGreen