5#include <nanoflann.hpp>
7#include <unordered_set>
30 ret += (*
this)[
i].dot(
R[
i]);
47 (*
this)[
i].setConstant(v);
95 if (!
mesh.nTotalMoved)
98 log() <<
"UnstructuredMesh === ElevatedNodesSolveInternalSmooth() "
99 "early exit for no nodes were moved";
105 for (
index iN = 0; iN <
mesh.coords.father->Size(); iN++)
133 std::vector<index> boundInterpPullIdx(boundInterpGlobSize);
134 for (
index i = 0;
i < boundInterpGlobSize;
i++)
135 boundInterpPullIdx[
i] =
i;
165 return ref->operator[](
idx)(dim);
167 template <
class BBOX>
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
std::optional< SmoothSolverSetup > PrepareSmoothSolverSetup(UnstructuredMesh &mesh)
Common preamble for all smooth solver variants.
decltype(tCoordPair::father) tCoord
MPI_int Allreduce(const void *sendbuf, void *recvbuf, MPI_int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
Wrapper over MPI_Allreduce.
DNDS_CONSTANT const real UnInitReal
Sentinel "not initialised" real value (NaN). Cheap to detect with std::isnan or IsUnInitReal; survive...
DNDS_CONSTANT const real largeReal
Loose upper bound (e.g., for non-dimensional limits).
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).
std::ostream & log()
Return the current DNDSR log stream (either std::cout or the installed file).
const MPI_Datatype DNDS_MPI_REAL
MPI datatype matching real (= MPI_REAL8).
DNDS_DEVICE_CALLABLE index Size() const
Combined father + son row count.
Mutable device view onto an ArrayPair (for CUDA kernels).
void TransAttach()
Bind the transformer to the current father / son pointers.
ArrayPairDeviceView< B, DNDS::ArrayEigenVector< 3 > > t_deviceView
Device-view template alias: t_deviceView<DeviceBackend::CUDA> gives the mutable CUDA view type for th...
ssp< DNDS::ArrayEigenVector< 3 > > 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.
TTrans trans
Ghost-communication engine bound to father and son.
CoordPairDOF(const CoordPairDOF &)=default
void operator=(CoordPairDOF &R)
real dot(CoordPairDOF &R)
CoordPairDOF & operator=(CoordPairDOF &&)=default
void addTo(CoordPairDOF &R, real alpha)
CoordPairDOF(CoordPairDOF &&)=default
CoordPairDOF & operator=(const CoordPairDOF &)=default
real kdtree_get_pt(const size_t idx, const size_t dim) const
PointCloudKDTreeCoordPair(tCoord &v)
bool kdtree_get_bbox(BBOX &bbox) const
size_t kdtree_get_point_count() const
Result of the shared smooth solver setup.
std::unordered_set< index > nodesBoundInterpolated
tCoordPair boundInterpVal
tCoordPair boundInterpCoo
Eigen::Matrix< real, 5, 1 > v