4#define CGAL_DISABLE_ROUNDING_MATH_CHECK
5#include <CGAL/Simple_cartesian.h>
6#include <CGAL/AABB_tree.h>
7#include <CGAL/AABB_traits_3.h>
8#include <CGAL/AABB_triangle_primitive_3.h>
9#undef CGAL_DISABLE_ROUNDING_MATH_CHECK
20 std::vector<Eigen::Matrix<real, 3, 3>>
Triangles;
51 Eigen::Matrix<real, 3, 3>
tri;
62 Eigen::Matrix<real, 3, 3>
tri;
72 Eigen::Matrix<real, 3, 3>
tri;
84 DNDS_assert_info(
false,
"This elem not implemented yet for BuildNodeWallDist()");
105 Eigen::Matrix<real, 3, 3>
tri;
107 for (
int iV = 0;
iV < 3;
iV++)
135 log() << fmt::format(
"=== UnstructuredMesh::BuildNodeWallDist() with minWallDist = {:.4e}, ",
options.minWallDist)
141 log() << fmt::format(
"Start search rank [{}]",
getMPI().rank) << std::endl;
142 using K = CGAL::Simple_cartesian<double>;
146 using Point = K::Point_3;
148 using Iterator = std::vector<Triangle>::iterator;
149 using Primitive = CGAL::AABB_triangle_primitive_3<K, Iterator>;
151 using Tree = CGAL::AABB_tree<AABB_triangle_traits>;
189 real dist = (p - cp).norm();
191 dist = std::max(
options.minWallDist, dist);
204 log() << fmt::format(
"[{}] MinDist: ",
getMPI().rank) <<
minDist << std::endl;
206 if (
options.wallDistExecution == 1)
209 else if (
options.wallDistExecution > 1)
210 for (
int i = 0; i <
options.wallDistExecution; i++)
#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 + ...
Eigen::Matrix< t_real, 4, Eigen::Dynamic > tD01Nj
tPoint PPhysicsCoordD01Nj(const tCoordsIn &cs, Eigen::Ref< const tD01Nj > DiNj)
auto GetQuadPatches(Quadrature &q)
Eigen::Matrix< real, 3, Eigen::Dynamic > tSmallCoords
MPI_int Barrier(MPI_Comm comm)
Wrapper over MPI_Barrier.
void MPISerialDo(const MPIInfo &mpi, F f)
Execute f on each rank serially, in rank order.
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).
DNDS_CONSTANT const real veryLargeReal
Catch-all upper bound ("practically infinity") for physical scalars.
void TransAttach()
Bind the transformer to the current father / son pointers.
ssp< TArray > father
Owned-side array (must be resized before ghost setup).
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.
tCoordPair nodeWallDist
wall dist:
UnstructuredMeshDeviceView< B > t_deviceView
void GetCoordsOnFace(index iFace, tSmallCoords &cs)
std::vector< index > bnd2faceV
Elem::Element GetFaceElement(index iF)
t_index GetBndZone(index iB)
void BuildNodeWallDist(const std::function< bool(Geom::t_index)> &fBndIsWall, WallDistOptions options=WallDistOptions{})
int rank
This rank's 0-based index within comm (-1 until initialised).
Tag type for naming objects created via make_ssp.
Eigen::Matrix< real, 5, 1 > v