47 RiXj.resize(cent.cols(), xs.cols());
48 for (
int iC = 0; iC < cent.cols(); iC++)
50 RiXj(iC, EigenAll) = (xs.colwise() - cent(EigenAll, iC)).colwise().norm();
52 return RiXj.array().maxCoeff();
68 NiXj = 1 + RiXj.array();
71 NiXj = (1 + RiXj.array()).inverse();
74 NiXj = (0.2 + RiXj.array()).inverse() - 1 / 1.2;
75 NiXj.array() *= (RiXj.array() < 1.0).
template cast<real>();
79 NiXj = (1 - RiXj.array()).square().square() * (RiXj.array() * 4 + 1);
80 NiXj.array() *= (RiXj.array() < 1.0).
template cast<real>();
84 NiXj = (1 - RiXj.array()).square();
85 NiXj.array() *= (RiXj.array() < 1.0).
template cast<real>();
89 NiXj = (-(RiXj.array().square())).exp();
97 template <
class Tcent,
class Tx>
102 RiXj.resize(cent.cols(), xs.cols());
103 for (
int iC = 0; iC < cent.cols(); iC++)
105 RiXj(iC, EigenAll) = (xs.colwise() - cent(EigenAll, iC)).colwise().norm() * (1. / R);
116 PT.resize(4, xs.cols());
117 PT(0, EigenAll).setConstant(1);
118 PT({1, 2, 3}, EigenAll) = xs;
121 A.setZero(xs.cols() + 4, xs.cols() + 4);
122 A.topLeftCorner(xs.cols(), xs.cols()) = M;
123 A.bottomLeftCorner(4, xs.cols()) = PT;
124 A.topRightCorner(xs.cols(), 4) = PT.transpose();
126 RHS.setZero(xs.cols() + 4, fs.cols());
128 RHS.topRows(xs.cols()) = fs;
129 auto LDLT = A.ldlt();
140 ret.setZero(xs.cols() + 4, fs.cols());
141 auto LDLTm = M.ldlt();
142 ret.topRows(xs.cols()) = LDLTm.solve(fs);
Extended enum-to-JSON serialization macro that also exposes allowed string values for JSON Schema gen...
#define DNDS_DEFINE_ENUM_JSON(EnumType_,...)
Define JSON serialization for an enum AND expose its allowed string values.
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
JSON-to-Eigen conversion utilities and nlohmann_json helper macros.
MatrixXR RBFCPC2(Tcent cent, Tx xs, real R, RBFKernelType kernel=Gaussian)
MatrixXR FRBFBasis(TIn RiXj, RBFKernelType kernel)
MatrixXR RBFInterpolateSolveCoefs(const tSmallCoords &xs, const TF fs, real R, RBFKernelType kernel=Gaussian)
MatrixXR RBFInterpolateSolveCoefsNoPoly(const tSmallCoords &xs, const TF fs, real R, RBFKernelType kernel=Gaussian)
real GetMaxRij(const tSmallCoords ¢, const tSmallCoords &xs)
@ InversedDistanceA1Compact
Eigen::Matrix< real, 3, Eigen::Dynamic > tSmallCoords
Eigen::Matrix< real, Eigen::Dynamic, Eigen::Dynamic > MatrixXR
Column-major dynamic Eigen matrix of reals (default layout).
double real
Canonical floating-point scalar used throughout DNDSR (double precision).