13 template <
int dim,
int nVarsFixed,
typename Tin1,
typename Tin2,
typename Tout>
15 const Tin1 &uThis,
const Tin2 &uOther,
18 switch (limiterBiwayAlter)
27 FWBAP_L2_Biway_PolynomialNorm<dim, nVarsFixed>(uThis, uOther, uOut,
n);
30 FMEMM_Biway_PolynomialNorm<dim, nVarsFixed>(uThis, uOther, uOut,
n);
41 template <
int nVarsFixed,
int nVarsSee>
44 const std::array<int, nVarsSee> &
varsSee)
47 static const int maxNDiff = dim == 2 ? 10 : 20;
49#if defined(DNDS_DIST_MT_USE_OMP)
50# pragma omp parallel for schedule(runtime)
57 Eigen::Matrix<real, nVarsSee, 2>
IJIISIsum;
66 gFace.IntegrationSimple(
74 Eigen::Matrix<real, Eigen::Dynamic, nVarsSee, Eigen::DontAlign, maxNDiff, nVarsSee>
90 Eigen::Matrix<real, nVarsSee, nVarsSee>
IJI,
ISI;
94 finc(EigenAll, 0) =
IJI.diagonal();
95 finc(EigenAll, 1) =
ISI.diagonal();
111 template <
int nVarsFixed>
114 const Eigen::Vector<real, nVarsFixed> &
varsSee,
117 using namespace Geom;
118 static const int maxNDiff = dim == 2 ? 10 : 20;
119 int nVars = u.RowSize();
121#if defined(DNDS_DIST_MT_USE_OMP)
122# pragma omp parallel for schedule(runtime)
129 Eigen::Matrix<real, nVarsFixed, 2>
IJIISIsum;
145 gFace.IntegrationSimple(
151 Eigen::Matrix<real, 1, nVarsFixed>
154 uRecValL = this->GetIntPointDiffBaseValue(
iCell,
iFace, -1, -1, std::array<int, 1>{0}, 1) *
169 for (
int i = 0; i < nVars; i++)
189 template <
int nVarsFixed>
200 using namespace Geom;
202#if defined(DNDS_DIST_MT_USE_OMP)
203# pragma omp parallel for schedule(runtime)
208 si(
iCell, 0) < settings.smoothThreshold)
215 std::vector<Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOF>>
uFaces(
c2f.size());
227 int cPOrder = settings.maxOrder;
232 std::vector<Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>>
234 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
267 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOF>
275 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
279 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
290 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
293 real n = settings.WBAP_nStd;
295 settings.limiterBiwayAlter,
308 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
311 real n = settings.WBAP_nStd;
312 if (settings.normWBAP)
324 uRecNew.trans.startPersistentPull();
325 uRecNew.trans.waitPersistentPull();
328#if defined(DNDS_DIST_MT_USE_OMP)
329# pragma omp parallel for schedule(runtime)
337 template <
int nVarsFixed>
348 using namespace Geom;
350 int cPOrder = settings.maxOrder;
351#if defined(DNDS_DIST_MT_USE_OMP)
352# pragma omp parallel for schedule(runtime)
359#if defined(DNDS_DIST_MT_USE_OMP)
360# pragma omp parallel for schedule(runtime)
364#if defined(DNDS_DIST_MT_USE_OMP)
365# pragma omp parallel for schedule(runtime)
370 si(
iCell, 0) < settings.smoothThreshold)
389 std::vector<Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>>
391 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
424 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOF>
432 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
436 Eigen::Matrix<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
447 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
450 real n = settings.WBAP_nStd;
453 settings.limiterBiwayAlter,
466 Eigen::Array<real, Eigen::Dynamic, nVarsFixed, 0, maxRecDOFBatch>
469 real n = settings.WBAP_nStd;
470 if (settings.normWBAP)
482 uRecNew.trans.startPersistentPull();
483 uRecNew.trans.waitPersistentPull();
487#if defined(DNDS_DIST_MT_USE_OMP)
488# pragma omp parallel for schedule(runtime)
#define DNDS_assert_info(expr, info)
Debug-only assertion with an extra std::string info message.
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.
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)
void DoCalculateSmoothIndicator(tScalarPair &si, tURec< nVarsFixed > &uRec, tUDof< nVarsFixed > &u, const std::array< int, nVarsSee > &varsSee)
void DispatchBiwayLimiter(int limiterBiwayAlter, const Tin1 &uThis, const Tin2 &uOther, Tout &uOut, real n)
Dispatches the biway limiter function selected by limiterBiwayAlter.
void FWBAP_L2_Cut_Biway(const Tin1 &u1, const Tin2 &u2, Tout &uOut, real n)
void FWBAP_L2_Multiway(const TinOthers &uOthers, int Nother, Tout &uOut, real n1=1.0)
input vector<Eigen::Array-like>
void FMINMOD_Biway(const Tin1 &u1, const Tin2 &u2, Tout &uOut, real n)
input eigen arrays
void FWBAP_L2_Biway(const Tin1 &u1, const Tin2 &u2, Tout &uOut, real n)
input eigen arrays
DNDS_CONSTANT const index UnInitIndex
Sentinel "not initialised" index value (= INT64_MIN).
DNDS_CONSTANT const real verySmallReal
Catch-all lower bound ("effectively zero").
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
constexpr T sqr(const T &a)
a * a, constexpr. Works for all arithmetic types.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
Eigen::Vector3d n(1.0, 0.0, 0.0)