3#include <unordered_map>
32 template <
int dim,
int powV = 1,
class TDiffI,
class TDiffJ>
34 const Eigen::MatrixBase<TDiffI> &DiffI,
35 const Eigen::MatrixBase<TDiffJ> &DiffJ,
37 const Eigen::Vector<real, Eigen::Dynamic> &wgd,
41 using namespace Geom::Base;
45 auto accumOrder = [&](
auto order_tag,
auto start_tag,
auto count_tag,
int wIdx)
47 constexpr int order =
decltype(order_tag)::value;
48 constexpr int start =
decltype(start_tag)::value;
49 constexpr int count =
decltype(count_tag)::value;
52 if constexpr (
order == 0)
54 else if constexpr (
order == 1)
55 faceLPow = faceL * faceL;
56 else if constexpr (
order == 2)
58 real fL2 = faceL * faceL;
63 real fL2 = faceL * faceL;
64 faceLPow = fL2 * fL2 * fL2;
66 real scale = wgd(wIdx) * (faceL == 0 ? 1.0 : faceLPow);
67 for (
int i = 0; i < DiffI.cols(); i++)
68 for (
int j = 0; j < DiffJ.cols(); j++)
69 Conj(i, j) += NormSymDiffOrderTensorV<dim, order, powV>(
70 DiffI.col(i).template segment<count>(start),
71 DiffJ.col(j).template segment<count>(start)) *
75 if constexpr (dim == 2)
78 DNDS_assert(cnDiffs == 10 || cnDiffs == 6 || cnDiffs == 3 || cnDiffs == 1);
79 if (cnDiffs >= 10) accumOrder(std::integral_constant<int, 3>{}, std::integral_constant<int, 6>{}, std::integral_constant<int, 4>{}, 3);
80 if (cnDiffs >= 6) accumOrder(std::integral_constant<int, 2>{}, std::integral_constant<int, 3>{}, std::integral_constant<int, 3>{}, 2);
81 if (cnDiffs >= 3) accumOrder(std::integral_constant<int, 1>{}, std::integral_constant<int, 1>{}, std::integral_constant<int, 2>{}, 1);
82 accumOrder(std::integral_constant<int, 0>{}, std::integral_constant<int, 0>{}, std::integral_constant<int, 1>{}, 0);
87 DNDS_assert(cnDiffs == 20 || cnDiffs == 10 || cnDiffs == 4 || cnDiffs == 1);
88 if (cnDiffs >= 20) accumOrder(std::integral_constant<int, 3>{}, std::integral_constant<int, 10>{}, std::integral_constant<int, 10>{}, 3);
89 if (cnDiffs >= 10) accumOrder(std::integral_constant<int, 2>{}, std::integral_constant<int, 4>{}, std::integral_constant<int, 6>{}, 2);
90 if (cnDiffs >= 4) accumOrder(std::integral_constant<int, 1>{}, std::integral_constant<int, 1>{}, std::integral_constant<int, 3>{}, 1);
91 accumOrder(std::integral_constant<int, 0>{}, std::integral_constant<int, 0>{}, std::integral_constant<int, 1>{}, 0);
108 template <
int dim = 2>
172 std::unordered_map<index, std::vector<BndVRPointCache>> bndVRCaches;
175 VRBaseWeight baseWeight_;
185 struct VRCoefficients
189 bool needOriginalMatrix =
false;
197 std::vector<Eigen::MatrixXd> volIntCholeskyL;
198 bool needVolIntCholeskyL =
false;
199 std::vector<Eigen::MatrixXd> matrixACholeskyL;
200 bool needMatrixACholeskyL =
false;
204 return matrixAAInvB(
iCell, 0);
212 auto &get_matrixAAInvB() {
return matrixAAInvB; }
213 auto &get_vectorAInvB() {
return vectorAInvB; }
216 VRCoefficients coefficients_;
219 TFTrans FTransPeriodic, FTransPeriodicBack;
236 template <
size_t pDim>
268 template <
typename...
Ts>
271 if (!
mesh->isPeriodic)
276 (FTransPeriodic(data,
faceID), ...);
279 (FTransPeriodicBack(data,
faceID), ...);
293 return coefficients_.GetCellRecMatAInv(
iCell);
298 return coefficients_.GetCellRecMatAInvB(
iCell,
ic2f);
303 return coefficients_.get_matrixAAInvB();
308 return coefficients_.get_vectorAInvB();
317 template <
class TOut>
322 using namespace Geom;
323 using namespace Geom::Base;
333 if constexpr (dim == 2)
339 if constexpr (dim == 2)
349 if constexpr (dim == 2)
356 if constexpr (dim == 2)
378 template <
class TList>
396 return baseWeight_.faceDiffBaseCache(
iFace,
iG + (baseWeight_.faceDiffBaseCache.RowSize(
iFace) / 2) *
if2c)(
397 std::forward<TList>(
diffList), Eigen::seq(Eigen::fix<1>, EigenLast));
401 int maxNDOF =
int(baseWeight_.faceDiffBaseCacheCent[
iFace].cols()) / 2;
402 return baseWeight_.faceDiffBaseCacheCent[
iFace](
415 return dbv(std::forward<TList>(
diffList), Eigen::seq(Eigen::fix<1>, EigenLast));
425 return baseWeight_.cellDiffBaseCache(
iCell,
iG)(
426 std::forward<TList>(
diffList), Eigen::seq(Eigen::fix<1>, EigenLast));
430 return baseWeight_.cellDiffBaseCacheCent[
iCell](
431 std::forward<TList>(
diffList), Eigen::seq(Eigen::fix<1>, EigenLast));
439 return dbv(std::forward<TList>(
diffList), Eigen::seq(Eigen::fix<1>, EigenLast));
453 return coefficients_.matrixSecondary[
iFace](
454 EigenAll, Eigen::seq(
459 template <
class TDiffIDerived,
class TDiffJDerived>
461 const Eigen::MatrixBase<TDiffIDerived> &
DiffI,
const Eigen::MatrixBase<TDiffJDerived> &
DiffJ,
464 using namespace Geom;
465 using namespace Geom::Base;
466 Eigen::Vector<real, Eigen::Dynamic>
wgd = baseWeight_.faceWeight[
iFace].array().square();
496 faceL =
faceLV(Eigen::seq(Eigen::fix<0>, Eigen::fix<dim - 1>)).norm();
509#ifdef USE_ECCENTRIC_COMB_POW_2
510 static constexpr int powV = 2;
512 static constexpr int powV = 1;
523 Eigen::MatrixBase<TDiffIDerived>::RowsAtCompileTime,
524 Eigen::MatrixBase<TDiffIDerived>::ColsAtCompileTime>;
527 tGPoint
coordTrans = baseWeight_.faceMajorCoordScale[
iFace].transpose() *
529 if constexpr (dim == 2)
586 if constexpr (dim == 3)
605 DNDS_assert_info(
mesh->nodeWallDist.father &&
mesh->nodeWallDist.father->Size() ==
mesh->NumNode(),
"must build mesh's nodeWallDist before this");
617 auto d =
mesh->GetCoordWallDistOnFace(
iFace, 0);
623 norm.stableNormalize();
658 if constexpr (dim == 3)
700 real v = std::max(0.0, std::log(
AR));
702 std::pow(std::tanh(
v / 4), 3);
712 static const auto Seq012 = Eigen::seq(Eigen::fix<0>, Eigen::fix<dim - 1>);
717 template <
int nVarsFixed = 1>
725 template <
int nVarsFixed = 1>
735 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed>
ret = uRec[
iCell];
737 DNDS_assert(coefficients_.volIntCholeskyL.size() ==
mesh->cell2node.father->Size());
739 DNDS_assert(coefficients_.matrixACholeskyL.size() ==
mesh->cell2node.father->Size());
799 std::cout <<
"bad input order : " <<
curOrder << std::endl;
807 template <
int nVarsFixed>
810 using namespace Geom::Base;
812 u.InitPair(
"VR::BuildURec::u",
mpi);
813 u.father->Resize(
mesh->NumCell(),
maxNDOF - 1, nVars);
815 u.son->Resize(
mesh->NumCellGhost(),
maxNDOF - 1, nVars);
820 u.trans.BorrowGGIndexing(
mesh->cell2node.trans);
821 u.trans.createMPITypes();
822 u.trans.initPersistentPull();
823 u.trans.initPersistentPush();
830 template <
int nVarsFixed>
833 using namespace Geom::Base;
834 u.InitPair(
"VR::BuildUGrad::u",
mpi);
835 u.father->Resize(
mesh->NumCell(), dim, nVars);
837 u.son->Resize(
mesh->NumCellGhost(), dim, nVars);
842 u.trans.BorrowGGIndexing(
mesh->cell2node.trans);
843 u.trans.createMPITypes();
844 u.trans.initPersistentPull();
845 u.trans.initPersistentPush();
857 u.
son->Resize(
mesh->NumCellGhost());
862 u.
trans.BorrowGGIndexing(
mesh->cell2node.trans);
863 u.
trans.createMPITypes();
864 u.
trans.initPersistentPull();
865 u.
trans.initPersistentPush();
872 template <
int nVarsFixed = 1>
875 u.InitPair(
"VR::BuildUDofNode::u",
mpi);
876 u.father->Resize(
mesh->NumNode(), nVars, 1);
878 u.son->Resize(
mesh->NumNodeGhost(), nVars, 1);
883 u.trans.BorrowGGIndexing(
mesh->coords.trans);
884 u.trans.createMPITypes();
885 u.trans.initPersistentPull();
886 u.trans.initPersistentPush();
893 template <
int nVarsFixed = 5>
894 using TFBoundary = std::function<Eigen::Vector<real, nVarsFixed>(
895 const Eigen::Vector<real, nVarsFixed> &,
896 const Eigen::Vector<real, nVarsFixed> &,
903 template <
int nVarsFixed = 5>
905 const Eigen::Vector<real, nVarsFixed> &,
906 const Eigen::Vector<real, nVarsFixed> &,
907 const Eigen::Vector<real, nVarsFixed> &,
915 template <
int nVarsFixed = 5>
922 template <
int nVarsFixed = 5>
938 template <
int nVarsFixed = 5>
953 template <
int nVarsFixed = 5>
959 const std::vector<int> &
mask);
984 template <
int nVarsFixed = 5>
1012 template <
int nVarsFixed = 5>
1024 template <
int nVarsFixed = 5>
1037 template <
int nVarsFixed,
int nVarsSee = 2>
1040 const std::array<int, nVarsSee> &
varsSee);
1042 template <
int nVarsFixed>
1043 using TFPost = std::function<
void(Eigen::Matrix<real, 1, nVarsFixed> &)>;
1045 template <
int nVarsFixed>
1048 const Eigen::Vector<real, nVarsFixed> &
varsSee,
1056 template <
int nVarsFixed>
1059 template <
int nVarsFixed>
1060 using tFMEig = std::function<tLimitBatch<nVarsFixed>(
1061 const Eigen::Vector<real, nVarsFixed> &
uL,
1062 const Eigen::Vector<real, nVarsFixed> &
uR,
1070 template <
int nVarsFixed>
1085 template <
int nVarsFixed>
1098 using namespace Geom;
1099 std::string name =
"VR_Matrix";
1104 mesh->BuildCell2CellFace();
1105 mesh->cell2cellFace.WriteSerialize(
serializerP,
"cell2cellFace",
true);
1106 mesh->AdjGlobal2LocalC2CFace();
1108 DNDS_assert(coefficients_.matrixAAInvB.father->Size() ==
mesh->NumCell());
1109 DNDS_assert(coefficients_.matrixAAInvB.son->Size() ==
mesh->NumCellGhost());
1110 coefficients_.matrixAAInvB.WriteSerialize(
serializerP,
"matrixAAInvB",
false);
1117#define DNDS_VARIATIONALRECONSTRUCTION_RECONSTRUCTION_INS_EXTERN(dim, nVarsFixed, ext) \
1118 namespace DNDS::CFV \
1120 ext template void VariationalReconstruction<dim>::DoReconstruction2ndGrad<nVarsFixed>( \
1121 tUGrad<nVarsFixed, dim> & uRec, \
1122 tUDof<nVarsFixed> &u, \
1123 const TFBoundary<nVarsFixed> &FBoundary, \
1126 ext template void VariationalReconstruction<dim>::DoReconstruction2nd<nVarsFixed>( \
1127 tURec<nVarsFixed> & uRec, \
1128 tUDof<nVarsFixed> &u, \
1129 const TFBoundary<nVarsFixed> &FBoundary, \
1131 const std::vector<int> &mask); \
1133 ext template void VariationalReconstruction<dim>::DoReconstructionIter<nVarsFixed>( \
1134 tURec<nVarsFixed> & uRec, \
1135 tURec<nVarsFixed> &uRecNew, \
1136 tUDof<nVarsFixed> &u, \
1137 const TFBoundary<nVarsFixed> &FBoundary, \
1142 ext template void VariationalReconstruction<dim>::DoReconstructionIterDiff<nVarsFixed>( \
1143 tURec<nVarsFixed> & uRec, \
1144 tURec<nVarsFixed> &uRecDiff, \
1145 tURec<nVarsFixed> &uRecNew, \
1146 tUDof<nVarsFixed> &u, \
1147 const TFBoundaryDiff<nVarsFixed> &FBoundaryDiff); \
1149 ext template void VariationalReconstruction<dim>::DoReconstructionIterSOR<nVarsFixed>( \
1150 tURec<nVarsFixed> & uRec, \
1151 tURec<nVarsFixed> &uRecInc, \
1152 tURec<nVarsFixed> &uRecNew, \
1153 tUDof<nVarsFixed> &u, \
1154 const TFBoundaryDiff<nVarsFixed> &FBoundaryDiff, \
1168#define DNDS_VARIATIONALRECONSTRUCTION_LIMITERPROCEDURE_INS_EXTERN(dim, nVarsFixed, ext) \
1169 namespace DNDS::CFV \
1171 ext template void VariationalReconstruction<dim>::DoCalculateSmoothIndicator<nVarsFixed, 2>( \
1172 tScalarPair & si, tURec<nVarsFixed> &uRec, tUDof<nVarsFixed> &u, \
1173 const std::array<int, 2> &varsSee); \
1175 ext template void VariationalReconstruction<dim>::DoCalculateSmoothIndicatorV1<nVarsFixed>( \
1176 tScalarPair & si, tURec<nVarsFixed> &uRec, tUDof<nVarsFixed> &u, \
1177 const Eigen::Vector<real, nVarsFixed> &varsSee, \
1178 const TFPost<nVarsFixed> &FPost); \
1180 ext template void VariationalReconstruction<dim>::DoLimiterWBAP_C( \
1181 tUDof<nVarsFixed> &u, \
1182 tURec<nVarsFixed> &uRec, \
1183 tURec<nVarsFixed> &uRecNew, \
1184 tURec<nVarsFixed> &uRecBuf, \
1187 const tFMEig<nVarsFixed> &FM, const tFMEig<nVarsFixed> &FMI, \
1190 ext template void VariationalReconstruction<dim>::DoLimiterWBAP_3( \
1191 tUDof<nVarsFixed> &u, \
1192 tURec<nVarsFixed> &uRec, \
1193 tURec<nVarsFixed> &uRecNew, \
1194 tURec<nVarsFixed> &uRecBuf, \
1197 const tFMEig<nVarsFixed> &FM, const tFMEig<nVarsFixed> &FMI, \
#define DNDS_assert_info(expr, info)
Debug-only assertion with an extra std::string info message.
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
#define DNDS_VARIATIONALRECONSTRUCTION_RECONSTRUCTION_INS_EXTERN(dim, nVarsFixed, ext)
#define DNDS_VARIATIONALRECONSTRUCTION_LIMITERPROCEDURE_INS_EXTERN(dim, nVarsFixed, ext)
t3MatPair cellMajorCoord
constructed using ConstructMetrics()
real GetCellMaxLenScale(index iCell)
Geom::tPoint GetCellBary(index iCell)
t3VecPair cellCent
constructed using ConstructMetrics()
Geom::tPoint GetCellQuadraturePPhys(index iCell, int iG)
Geom::tPoint GetOtherCellBaryFromCell(index iCell, index iCellOther, index iFace)
real GetCellNodeMinLenScale(index iCell)
ssp< Geom::UnstructuredMesh > mesh
Geom::tPoint GetFaceNorm(index iFace, int iG) const
bool CellIsFaceBack(index iCell, index iFace) const
Geom::tPoint GetFaceQuadraturePPhysFromCell(index iFace, index iCell, rowsize if2c, int iG)
FiniteVolumeSettings settings
FiniteVolumeDeviceView< B > t_deviceView
real GetFaceArea(index iFace) const
t3VecPair cellMajorHBox
constructed using ConstructMetrics()
t3VecPair cellAlignedHBox
constructed using ConstructMetrics()
RecAtr & GetFaceAtr(index iFace)
RecAtr & GetCellAtr(index iCell)
The VR class that provides any information needed in high-order CFV.
void FDiffBaseValue(TOut &DiBj, const Geom::tPoint &pPhy, index iCell, index iFace, int iG, int flag=0)
flag = 0 means use moment data, or else use no moment (as 0) pPhy must be relative to cell if iFace <...
void BuildScalar(tScalarPair &u, bool buildSon=true, bool buildTrans=true)
real GetCellAR(index iCell)
auto & get_matrixAAInvB()
void WriteSerializeRecMatrix(const Serializer::SerializerBaseSSP &serializerP)
void SetPeriodicTransformations(const TFTrans &nFTransPeriodic, const TFTrans &nFTransPeriodicBack)
auto DownCastURecOrder(int curOrder, index iCell, tURec< nVarsFixed > &uRec, int downCastMethod)
void parseSettings(VRSettings::json &j)
Backward-compatible overload accepting JSON (used by Python bindings).
void DoLimiterWBAP_3(tUDof< nVarsFixed > &u, tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRecNew, tURec< nVarsFixed > &uRecBuf, tScalarPair &si, bool ifAll, const tFMEig< nVarsFixed > &FM, const tFMEig< nVarsFixed > &FMI, bool putIntoNew=false)
FM(uLeft,uRight,norm) gives vsize * vsize mat of Left Eigen Vectors.
std::function< Eigen::Vector< real, nVarsFixed >(const Eigen::Vector< real, nVarsFixed > &, const Eigen::Vector< real, nVarsFixed > &, const Eigen::Vector< real, nVarsFixed > &, index, index, int, const Geom::tPoint &, const Geom::tPoint &, Geom::t_index fType)> TFBoundaryDiff
void ApplyPeriodicTransform(int if2c, Geom::t_index faceID, Ts &...data) const
Applies the appropriate periodic transformation to one or more data matrices.
void ConstructBaseAndWeight(const tFGetBoundaryWeight &id2faceDircWeight=[](Geom::t_index id, int iOrder) { return 1.0;})
std::function< void(Eigen::Matrix< real, 1, nVarsFixed > &)> TFPost
void BuildUGrad(tUGrad< nVarsFixed, dim > &u, int nVars, bool buildSon=true, bool buildTrans=true)
void BuildURec(tURec< nVarsFixed > &u, int nVars, bool buildSon=true, bool buildTrans=true)
VariationalReconstruction(MPIInfo nMpi, ssp< Geom::UnstructuredMesh > nMesh)
auto GetCellRecMatAInv(index iCell)
auto GetMatrixSecondary(index iCell, index iFace, index if2c)
if if2c < 0, then calculated with iCell hen seen as all diffs
auto GetCellRecMatAInvB(index iCell, int ic2f)
std::function< void(Eigen::Ref< MatrixXR >, Geom::t_index)> TFTrans
void DoReconstruction2ndGrad(tUGrad< nVarsFixed, dim > &uRec, tUDof< nVarsFixed > &u, const TFBoundary< nVarsFixed > &FBoundary, int method)
fallback reconstruction method, explicit 2nd order FV reconstruction
void DoLimiterWBAP_C(tUDof< nVarsFixed > &u, tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRecNew, tURec< nVarsFixed > &uRecBuf, tScalarPair &si, bool ifAll, const tFMEig< nVarsFixed > &FM, const tFMEig< nVarsFixed > &FMI, bool putIntoNew=false)
FM(uLeft,uRight,norm) gives vsize * vsize mat of Left Eigen Vectors.
void DoCalculateSmoothIndicatorV1(tScalarPair &si, tURec< nVarsFixed > &uRec, tUDof< nVarsFixed > &u, const Eigen::Vector< real, nVarsFixed > &varsSee, const TFPost< nVarsFixed > &FPost)
static const int maxNeighbour
void DoReconstructionIter(tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRecNew, tUDof< nVarsFixed > &u, const TFBoundary< nVarsFixed > &FBoundary, bool putIntoNew=false, bool recordInc=false, bool uRecIsZero=false)
iterative variational reconstruction method
void SetPeriodicTransformations(std::array< int, pDim > Seq123)
static const int maxRecDOF
void DoCalculateSmoothIndicator(tScalarPair &si, tURec< nVarsFixed > &uRec, tUDof< nVarsFixed > &u, const std::array< int, nVarsSee > &varsSee)
void parseSettings(const VRSettings &s)
static const int maxRecDOFBatch
void MatrixAMult(tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRec1)
Eigen::Matrix< real, -1, nVarsFixed, 0, CFV::VariationalReconstruction< dim >::maxRecDOFBatch > tLimitBatch
void DoReconstruction2nd(tURec< nVarsFixed > &uRec, tUDof< nVarsFixed > &u, const TFBoundary< nVarsFixed > &FBoundary, int method, const std::vector< int > &mask)
fallback reconstruction method, explicit 2nd order FV reconstruction
void DoReconstructionIterSOR(tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRecInc, tURec< nVarsFixed > &uRecNew, tUDof< nVarsFixed > &u, const TFBoundaryDiff< nVarsFixed > &FBoundaryDiff, bool reverse=false)
do a SOR iteration from uRecNew, with uRecInc as the RHSterm of Block-Jacobi preconditioned system
const VRSettings & getSettings() const
static const int maxNDiff
real GetGreenGauss1WeightOnCell(index iCell)
std::function< Eigen::Vector< real, nVarsFixed >(const Eigen::Vector< real, nVarsFixed > &, const Eigen::Vector< real, nVarsFixed > &, index, index, int, const Geom::tPoint &, const Geom::tPoint &, Geom::t_index fType)> TFBoundary
void DoReconstructionIterDiff(tURec< nVarsFixed > &uRec, tURec< nVarsFixed > &uRecDiff, tURec< nVarsFixed > &uRecNew, tUDof< nVarsFixed > &u, const TFBoundaryDiff< nVarsFixed > &FBoundaryDiff)
puts into uRecNew with Mat * uRecDiff; uses the Block-jacobi preconditioned reconstruction system as ...
void SetPeriodicTransformations()
std::function< tLimitBatch< nVarsFixed >(const Eigen::Vector< real, nVarsFixed > &uL, const Eigen::Vector< real, nVarsFixed > &uR, const Geom::tPoint &uNorm, const Eigen::Ref< tLimitBatch< nVarsFixed > > &data)> tFMEig
MatrixXR GetIntPointDiffBaseValue(index iCell, index iFace, rowsize if2c, int iG, TList &&diffList=EigenAll, uint8_t maxDiff=UINT8_MAX)
if if2c < 0, then calculated, if maxDiff == 255, then seen as all diffs if iFace < 0,...
std::function< real(Geom::t_index, int)> tFGetBoundaryWeight
auto FFaceFunctional(const Eigen::MatrixBase< TDiffIDerived > &DiffI, const Eigen::MatrixBase< TDiffJDerived > &DiffJ, index iFace, index iCellL, index iCellR)
void BuildUDofNode(tUDof< nVarsFixed > &u, int nVars, bool buildSon=true, bool buildTrans=true)
void AccumulateDiffOrderContributions(const Eigen::MatrixBase< TDiffI > &DiffI, const Eigen::MatrixBase< TDiffJ > &DiffJ, MatrixXR &Conj, const Eigen::Vector< real, Eigen::Dynamic > &wgd, int cnDiffs, real faceL)
Accumulates the weighted diff-order tensor inner product into Conj across all polynomial orders prese...
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicDonor(t_index id)
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicMain(t_index id)
ssp< SerializerBase > SerializerBaseSSP
DNDS_CONSTANT const index UnInitIndex
Sentinel "not initialised" index value (= INT64_MIN).
DNDS_CONSTANT const real verySmallReal
Catch-all lower bound ("effectively zero").
int32_t rowsize
Row-width / per-row element-count type (signed 32-bit).
Eigen::Matrix< real, Eigen::Dynamic, Eigen::Dynamic > MatrixXR
Column-major dynamic Eigen matrix of reals (default layout).
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
Eigen::RowVector< real, Eigen::Dynamic > RowVectorXR
Dynamic row-vector of reals.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
void TransAttach()
Bind the transformer to the current father / son pointers.
ssp< TArray > father
Owned-side array (must be resized before ghost setup).
index Size() const
Combined row count (father->Size() + son->Size()).
void InitPair(const std::string &name, Args &&...args)
Allocate both father and son arrays, forwarding all args to TArray constructor.
ssp< TArray > son
Ghost-side array (sized automatically by createMPITypes / BorrowAndPull).
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...
struct DNDS::CFV::VRSettings::BaseSettings baseSettings
struct DNDS::CFV::VRSettings::FunctionalSettings functionalSettings
nlohmann::ordered_json json
bool cacheDiffBase
integration degree for VR matrices on BC faces, -1 means using int Order, < -1 means using intOrderVR...
uint8_t cacheDiffBaseSize
if cache the base function values on each of the quadrature points
cached diff-base values at face centroids
Lightweight bundle of an MPI communicator and the calling rank's coordinates.
Eigen::Matrix< real, 5, 1 > v