10 real d00 = (x1 - x0) / NInterval;
13 d.setLinSpaced(NInterval + 1, x0, x1);
18 {
return -1 + std::tanh(h - 2 * h / NInterval) / (std::tanh(h) +
verySmallReal) + d0 * 2 / (x1 - x0); },
20 real Mh = std::tanh(h);
22 d = (Eigen::VectorXd::LinSpaced(NInterval + 1, -h, h).array().tanh() + Mh) / (2 * Mh) * (x1 - x0) + x0;
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
void GetTanhDistributionBilateral(real x0, real x1, index NInterval, real d0, Eigen::Vector< real, Eigen::Dynamic > &d)
real BisectSolveLower(TF &&F, real v0, real v1, real fTarget, int maxIter)
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).
double real
Canonical floating-point scalar used throughout DNDSR (double precision).