DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Geom Namespace Reference

Namespaces

namespace  Adj
 Convenience constants for common adjacency kinds.
 
namespace  Base
 
namespace  detail
 
namespace  Elem
 
namespace  OpenFOAM
 
namespace  RBF
 

Classes

struct  AdjEntry
 One registered adjacency entry. More...
 
struct  AdjIndexInfo
 Per-adjacency index state tracking. More...
 
struct  AdjIndexInfoDeviceView
 Device-side state for an adjacency (trivially copyable). More...
 
struct  AdjKind
 
struct  AdjKindHash
 Hash for AdjKind (for use in unordered containers). More...
 
struct  AdjPairTracked
 Flattened wrapper: inherits from TPair and adds AdjIndexInfo. More...
 
struct  AdjPairTrackedDeviceView
 Mutable device view for AdjPairTracked. More...
 
struct  AdjPairTrackedDeviceViewConst
 Const device view for AdjPairTracked. More...
 
class  ArrayNodePeriodicBits
 
class  BCName_2_ID
 
struct  CompanionEntry
 One registered companion entry. More...
 
struct  CompiledGhostTree
 
struct  ConeAdj
 
struct  CoordPairDOF
 
struct  ElemInfo
 
struct  EntityReorderMap
 Per-entity reorder specification: where each owned entity goes. More...
 
struct  FollowSpec
 
struct  GhostChain
 
struct  GhostResult
 
struct  GhostSpec
 
struct  GhostTreeNode
 One node in the compiled ghost tree. More...
 
struct  InterpolateDistributedResultT
 
struct  InterpolateGlobalResultT
 
struct  InterpolateResultT
 
struct  LevelEntry
 
struct  MeshConnectivity
 
struct  NodeIndexPBI
 
struct  NodePeriodicBits
 
class  NodePeriodicBitsRow
 
class  Octree
 
class  OffsetIterator
 
class  OffsetRange
 
struct  OwnershipDecision
 
struct  PartitionOptions
 
struct  Periodicity
 
struct  PointCloudFunctional
 
struct  PointCloudKDTree
 
struct  PointCloudKDTreeCoordPair
 
struct  PrepareMeshOptions
 Options for PrepareMesh. More...
 
struct  ReorderInput
 Input to the reorder framework. More...
 
struct  ReorderPlan
 
struct  ReorderRegistry
 
struct  SharedCountPredicate
 
struct  SmallCoordsAsVector
 
struct  SmoothSolverSetup
 Result of the shared smooth solver setup. More...
 
struct  SubEntityDesc
 
struct  SubEntityQuery
 
struct  SubEntityQueryPbi
 
struct  SupportAdj
 
struct  tGPointPortable
 
struct  tPointPortable
 
struct  UnstructuredMesh
 
struct  UnstructuredMeshDeviceView
 
struct  UnstructuredMeshSerialRW
 

Typedefs

using tPy_AutoAppendName2ID = py_class_ssp< AutoAppendName2ID >
 
using t_FBCName_2_ID = std::function< t_index(const std::string &)>
 
using t_FBCID_2_Name = std::function< std::string(t_index)>
 
using t_index = int32_t
 
using t_real = double
 
using tPoint = Eigen::Vector3d
 
using tJacobi = Eigen::Matrix3d
 
using tGPoint = Eigen::Matrix3d
 
using tPointMap = Eigen::Map< tPoint, Eigen::Unaligned >
 
using tPointConstMap = Eigen::Map< const tPoint, Eigen::Unaligned >
 
using tGPointMap = Eigen::Map< tGPoint, Eigen::Unaligned >
 
using tGPointConstMap = Eigen::Map< const tGPoint, Eigen::Unaligned >
 
using tSmallCoords = Eigen::Matrix< real, 3, Eigen::Dynamic >
 
using tLocalMatStruct = std::vector< std::vector< index > >
 
template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using tPy_AdjPairTracked = py_class_ssp< AdjPairTracked< ArrayAdjacencyPair< _row_size, _row_max, _align > > >
 
using tFDataFieldName = std::function< std::string(int)>
 
using tFDataFieldQuery = tFGetData
 
using tPy_ElemInfo = py_class_ssp< ElemInfo >
 
using tPy_UnstructuredMesh = py_class_ssp< UnstructuredMesh >
 
using tPy_UnstructuredMeshSerialRW = py_class_ssp< UnstructuredMeshSerialRW >
 
using tAdjPair = DNDS::ArrayAdjacencyPair< DNDS::NonUniformSize >
 
using tAdj = decltype(tAdjPair::father)
 
using tPbiPair = ArrayPair< ArrayNodePeriodicBits< DNDS::NonUniformSize > >
 
using tPbi = decltype(tPbiPair::father)
 
using tAdj1Pair = DNDS::ArrayAdjacencyPair< 1 >
 
using tAdj1 = decltype(tAdj1Pair::father)
 
using tAdj2Pair = DNDS::ArrayAdjacencyPair< 2 >
 
using tAdj2 = decltype(tAdj2Pair::father)
 
using tAdj3Pair = DNDS::ArrayAdjacencyPair< 3 >
 
using tAdj3 = decltype(tAdj3Pair::father)
 
using tAdj4Pair = DNDS::ArrayAdjacencyPair< 4 >
 
using tAdj4 = decltype(tAdj4Pair::father)
 
using tAdj8Pair = DNDS::ArrayAdjacencyPair< 8 >
 
using tAdj8 = decltype(tAdj8Pair::father)
 
using tCoordPair = DNDS::ArrayPair< DNDS::ArrayEigenVector< 3 > >
 
using tCoord = decltype(tCoordPair::father)
 
using tElemInfoArrayPair = DNDS::ArrayPair< DNDS::ParArray< ElemInfo > >
 
using tElemInfoArray = DNDS::ssp< DNDS::ParArray< ElemInfo > >
 
using tIndPair = DNDS::ArrayPair< DNDS::ArrayIndex >
 
using tInd = decltype(tIndPair::father)
 
using tFGetName = std::function< std::string(int)>
 
using tFGetData = std::function< DNDS::real(int, DNDS::index)>
 
using tFGetVecData = std::function< DNDS::real(int, DNDS::index, DNDS::rowsize)>
 
using tIndexMapFunc = std::function< index(index)>
 
using AdjVariant = std::variant< tAdjPair, tAdj1Pair, tAdj2Pair, tAdj3Pair, tAdj4Pair, tAdj8Pair >
 
using OwnershipResolverMulti = std::function< OwnershipDecision(const std::vector< index > &parents, const std::vector< MPI_int > &parentRanks, index nLocalParents)>
 
using OwnershipResolver2 = std::function< OwnershipDecision(index parentL, index parentR, index nLocalParents)>
 Legacy 2-parent ownership resolver (used by InterpolateDistributed).
 
using InterpolateGlobalResult = InterpolateGlobalResultT<>
 Default: all fields variable-width.
 
using InterpolateResult = InterpolateResultT<>
 Default InterpolateResult: all fields are variable-width (NonUniformSize).
 
using InterpolateDistributedResult = InterpolateDistributedResultT<>
 Default InterpolateDistributedResult: entity2parent is fixed-2 (as before).
 
using AdjRemapFn = std::function< void(const PermutationTransfer::LookupResult &lookup)>
 Callback invoked during REMAP phase for an adjacency array.
 
using AdjRelocateFn = std::function< void(const PermutationTransfer &transfer, const MPIInfo &mpi)>
 Callback invoked during RELOCATE phase for an adjacency or companion array.
 
template<rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using ArrayNodePeriodicBitsPair = ArrayPair< ArrayNodePeriodicBits< _row_size, _row_max, _align > >
 

Enumerations

enum class  MeshLoc : uint8_t { Unknown = 0 , Node = 1 , Face = 3 , Cell = 4 }
 
enum  MeshReaderMode { UnknownMode , SerialReadAndDistribute , SerialOutput }
 
enum  MeshAdjState { Adj_Unknown = 0 , Adj_PointToLocal , Adj_PointToGlobal }
 
enum  MeshElevationState { Elevation_Untouched = 0 , Elevation_O1O2 }
 
enum class  EntityKind : int8_t {
  Cell = 0 , Face = 1 , Edge = 2 , Node = 3 ,
  Bnd = 4 , NUM_KINDS = 5
}
 
enum class  AdjAction {
  SKIP , RELOCATE , REMAP , RELOCATE_REMAP ,
  SELF
}
 Action to take on an adjacency during reorder. More...
 

Functions

void pybind11_AutoAppendName2ID_define (py::module_ &m)
 
auto GetFaceName2IDDefault ()
 
DNDS_DEVICE_CALLABLE bool FaceIDIsExternalBC (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsInternal (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsTrueInternal (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic1 (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic2 (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic3 (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicMain (t_index id)
 
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicDonor (t_index id)
 
constexpr Elem::ElemType _getElemTypeFromCGNSType (ElementType_t cgns_et)
 
constexpr ElementType_t _getCGNSTypeFromElemType (Elem::ElemType et)
 
std::vector< realJacobiToSTDVector (const tJacobi &j)
 
tJacobi STDVectorToJacobi (const std::vector< real > &v)
 
std::vector< realVectorToSTDVector (const Eigen::VectorXd &v)
 
Eigen::VectorXd STDVectorToVector (const std::vector< real > &v)
 
template<int d>
tPoint FacialJacobianToNormVec (const tJacobi &J)
 get normal vector from facial jacobian note that $$ J_{ij} = \partial_{\xi_j} x_i $$
 
template<int dim>
Eigen::Matrix< real, dim, dim > NormBuildLocalBaseV (const Eigen::Ref< const Eigen::Vector< real, dim > > &uNorm)
 input uNorm should already be normalized
 
tGPoint RotZ (real theta)
 
tGPoint RotX (real theta)
 
tGPoint RotY (real theta)
 
tGPoint RotateAxis (const tPoint &axis)
 
tGPoint CrossVecToMat (const tPoint &axn)
 
tPoint CrossMatToVec (const tGPoint &axnM)
 
template<int dim>
tPoint ToThreeDim (const Eigen::Vector< real, dim > &v)
 
void GetTanhDistributionBilateral (real x0, real x1, index NInterval, real d0, Eigen::Vector< real, Eigen::Dynamic > &d)
 
template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
std::string pybind11_AdjPairTracked_name ()
 
void pybind11_MeshAdjState_define (py::module_ &m)
 
void pybind11_AdjIndexInfo_define (py::module_ &m)
 
template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
tPy_AdjPairTracked< _row_size, _row_max, _align > pybind11_AdjPairTracked_declare (py::module_ &m)
 
template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void pybind11_AdjPairTracked_define (py::module_ &m)
 Define all AdjPairTracked-specific methods on the pybind11 class.
 
void PushInfo2Serial2Global (std::vector< DNDS::index > &serial2Global, DNDS::index localSize, const std::vector< DNDS::index > &pushIndex, const std::vector< DNDS::index > &pushIndexStart, const DNDS::MPIInfo &mpi)
 Reserved skeleton for parallel topology interpolation.
 
void pybind11_ElemInfo_define (py::module_ &m)
 
void pybind11_ArrayElemInfo_define (py::module_ &m)
 
void pybind11_MeshLocDefine (py::module_ &m)
 
void pybind11_UnstructuredMesh_define (py::module_ &m)
 
void pybind11_UnstructuredMeshSerialRW_define (py::module_ &m)
 
std::optional< SmoothSolverSetupPrepareSmoothSolverSetup (UnstructuredMesh &mesh)
 Common preamble for all smooth solver variants.
 
void BuildGhostPrimary (UnstructuredMesh &mesh, int nGhostLayers=1)
 Build connectivity and ghost layer for a freshly-distributed mesh.
 
void ReadMeshFromCGNS (ssp< UnstructuredMesh > &mesh, ssp< UnstructuredMeshSerialRW > &reader, const std::string &meshFile, const PartitionOptions &partOpts={}, real periodicTol=1e-9, int elevation=0, int bisect=0, std::function< t_index(const std::string &)> nameMapper=nullptr)
 Read a CGNS mesh, partition, and optionally elevate/bisect.
 
void ReadMeshFromH5 (UnstructuredMesh &mesh, Serializer::SerializerFactory factory, const std::string &h5Path, const PartitionOptions &partOpts={})
 Read a mesh from DNDSR H5 with even-split + ParMetis repartition.
 
void ReadMeshFromH5Parallel (UnstructuredMesh &mesh, Serializer::SerializerFactory factory, const std::string &h5Path)
 Read a pre-partitioned mesh from H5 (exact np match required).
 
void PrepareMesh (UnstructuredMesh &mesh, UnstructuredMeshSerialRW &reader, const PrepareMeshOptions &opts={})
 Prepare a distributed mesh for solver use.
 
void BuildBndMesh (UnstructuredMesh &mesh, UnstructuredMesh &meshBnd, UnstructuredMeshSerialRW &readerBnd, bool buildSerialOut=true)
 Extract the boundary surface mesh from a solver-ready volume mesh.
 
void SerializeMesh (UnstructuredMesh &mesh, const std::string &outputPath, Serializer::SerializerFactory &factory)
 Write a partitioned mesh to H5 for later distributed read.
 
std::string MeshH5Path (const std::string &base, int mpiSize, int elevation=0, int bisect=0)
 Build the conventional H5 filename for a partitioned mesh.
 
template<class TPartitionIdx >
void Partition2LocalIdx (const std::vector< TPartitionIdx > &partition, std::vector< DNDS::index > &localPush, std::vector< DNDS::index > &localPushStart, const DNDS::MPIInfo &mpi)
 
template<class TPartitionIdx >
void Partition2Serial2Global (const std::vector< TPartitionIdx > &partition, std::vector< DNDS::index > &serial2Global, const DNDS::MPIInfo &mpi, DNDS::MPI_int nPart)
 
template<class TAdj = tAdj1>
void ConvertAdjSerial2Global (TAdj &arraySerialAdj, const std::vector< DNDS::index > &partitionJSerial2Global, const DNDS::MPIInfo &mpi)
 
template<class TArr = tAdj1>
void TransferDataSerial2Global (TArr &arraySerial, TArr &arrayDist, const std::vector< DNDS::index > &pushIndex, const std::vector< DNDS::index > &pushIndexStart, const DNDS::MPIInfo &mpi)
 
std::string adjKindName (const AdjKind &kind)
 Format an AdjKind as a diagnostic string, e.g. "Cell2Node", "Cell2Cell(Node)".
 
int entityDepth (EntityKind kind, int dim)
 
const char * entityKindName (EntityKind kind)
 String name for an EntityKind (for diagnostics).
 
template<rowsize cone_rs = NonUniformSize, class ToPair >
AdjPairTracked< tAdjPairCheckedInverse (const AdjPairTracked< ArrayAdjacencyPair< cone_rs > > &cone, const ToPair &toPair, index nToLocal, const MPIInfo &mpi)
 
template<rowsize rs_AB = NonUniformSize, rowsize rs_BC = NonUniformSize, rowsize out_rs = NonUniformSize, class Predicate , class... TArgs>
AdjPairTracked< ArrayAdjacencyPair< out_rs > > CheckedComposeFiltered (const AdjPairTracked< ArrayAdjacencyPair< rs_AB > > &AB, const AdjPairTracked< ArrayAdjacencyPair< rs_BC > > &BC, const std::unordered_map< index, index > &bGlobal2Local, Predicate &&pred, TArgs &&...args)
 
template<rowsize p2n_rs = NonUniformSize, rowsize e2p_rs = NonUniformSize>
auto CheckedInterpolateGlobal (const AdjPairTracked< ArrayAdjacencyPair< p2n_rs > > &parent2node, const tPbiPair &parent2nodePbi, const OffsetAscendIndexMapping &parentGhostMapping, const GlobalOffsetsMapping &parentGlobalMapping, const OffsetAscendIndexMapping &nodeGhostMapping, const SubEntityQueryPbi &query, index nLocalParents, index nTotalParents, index nNode, const OwnershipResolverMulti &resolver, const MPIInfo &mpi)
 State-checked wrapper for MeshConnectivity::InterpolateGlobal.
 
AdjAction classifyAdj (AdjKind adj, const std::unordered_set< EntityKind > &reorderedKinds)
 Classify an adjacency given the set of reordered entity kinds.
 
std::vector< indexReorderSerialAdj_PartitionMetisC (tLocalMatStruct::iterator mat_begin, tLocalMatStruct::iterator mat_end, std::vector< index >::iterator i_new2old_begin, std::vector< index >::iterator i_new2old_end, int nParts, index ind_offset, bool do_rcm, index &bwOldM, index &bwNewM, tLocalMatStruct::iterator full_mat_begin, index full_n_elem)
 Partition a sub-graph into nParts and optionally apply RCM reordering within each part.
 
auto PartitionSerialAdj_Metis (tLocalMatStruct::const_iterator mat_begin, tLocalMatStruct::const_iterator mat_end, int nPart, index ind_offset=0, std::string metisType="KWAY", int metisNcuts=3, int metisUfactor=5, int metisSeed=0)
 Partition a (sub-)graph using Metis.
 
std::pair< std::vector< index >, std::vector< index > > ReorderSerialAdj_Metis (const tLocalMatStruct &mat)
 
std::pair< std::vector< index >, std::vector< index > > ReorderSerialAdj_BoostMMD (const tLocalMatStruct &mat)
 
std::pair< std::vector< index >, std::vector< index > > ReorderSerialAdj_BoostRCM (const tLocalMatStruct &mat, index &bandWidthOld, index &bandWidthNew)
 
std::pair< std::vector< index >, std::vector< index > > ReorderSerialAdj_CorrectRCM (tLocalMatStruct::const_iterator mat_begin, tLocalMatStruct::const_iterator mat_end, index &bandWidthOld, index &bandWidthNew, index offset=0)
 
bool isCollaborativeNodePeriodicBits (const std::vector< NodePeriodicBits > &a, const std::vector< NodePeriodicBits > &b)
 

Variables

const t_index invalid_index = INT32_MAX
 

Typedef Documentation

◆ AdjRelocateFn

using DNDS::Geom::AdjRelocateFn = typedef std::function<void(const PermutationTransfer &transfer, const MPIInfo &mpi)>

Callback invoked during RELOCATE phase for an adjacency or companion array.

Definition at line 115 of file ReorderPlan.hpp.

◆ AdjRemapFn

using DNDS::Geom::AdjRemapFn = typedef std::function<void(const PermutationTransfer::LookupResult &lookup)>

Callback invoked during REMAP phase for an adjacency array.

Definition at line 112 of file ReorderPlan.hpp.

◆ AdjVariant

Variant of all supported fixed-width adjacency pair types. tAdjPair (NonUniformSize) is the general variable-width CSR; tAdj1Pair..tAdj8Pair are compile-time fixed-width for performance on hot-path adjacencies (face2cell = Adj2, bnd2face = Adj1, etc.).

Definition at line 345 of file MeshConnectivity.hpp.

◆ ArrayNodePeriodicBitsPair

template<rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Geom::ArrayNodePeriodicBitsPair = typedef ArrayPair<ArrayNodePeriodicBits<_row_size, _row_max, _align> >

Definition at line 185 of file PeriodicInfo.hpp.

◆ InterpolateDistributedResult

Default InterpolateDistributedResult: entity2parent is fixed-2 (as before).

Definition at line 813 of file MeshConnectivity.hpp.

◆ InterpolateGlobalResult

Default: all fields variable-width.

Definition at line 716 of file MeshConnectivity.hpp.

◆ InterpolateResult

Default InterpolateResult: all fields are variable-width (NonUniformSize).

Definition at line 775 of file MeshConnectivity.hpp.

◆ OwnershipResolver2

using DNDS::Geom::OwnershipResolver2 = typedef std::function<OwnershipDecision( index parentL, index parentR, index nLocalParents)>

Legacy 2-parent ownership resolver (used by InterpolateDistributed).

Definition at line 640 of file MeshConnectivity.hpp.

◆ OwnershipResolverMulti

using DNDS::Geom::OwnershipResolverMulti = typedef std::function<OwnershipDecision( const std::vector<index> &parents, const std::vector<MPI_int> &parentRanks, index nLocalParents)>

Callback for ownership resolution during distributed interpolation.

Called for each locally-enumerated entity with its parent information. Faces have exactly 2 parents; edges can have N >= 2.

Parameters
parentsAll parent indices (local-appended) of this entity. [0, nLocalParents) = owned, [nLocal, nTotal) = ghost.
nLocalParentsNumber of owned (father) parents on this rank.
parentRanksRank owning each parent (parallel to parents vector).
Returns
OwnershipDecision: whether this rank owns the entity and which peers need it pushed.

Definition at line 634 of file MeshConnectivity.hpp.

◆ t_FBCID_2_Name

using DNDS::Geom::t_FBCID_2_Name = typedef std::function<std::string(t_index)>

Definition at line 47 of file BoundaryCondition.hpp.

◆ t_FBCName_2_ID

using DNDS::Geom::t_FBCName_2_ID = typedef std::function<t_index(const std::string &)>

Definition at line 46 of file BoundaryCondition.hpp.

◆ t_index

using DNDS::Geom::t_index = typedef int32_t

Definition at line 6 of file Geometric.hpp.

◆ t_real

using DNDS::Geom::t_real = typedef double

Definition at line 8 of file Geometric.hpp.

◆ tAdj

using DNDS::Geom::tAdj = typedef decltype(tAdjPair::father)

Definition at line 65 of file Mesh_DeviceView.hpp.

◆ tAdj1

using DNDS::Geom::tAdj1 = typedef decltype(tAdj1Pair::father)

Definition at line 69 of file Mesh_DeviceView.hpp.

◆ tAdj1Pair

Definition at line 68 of file Mesh_DeviceView.hpp.

◆ tAdj2

using DNDS::Geom::tAdj2 = typedef decltype(tAdj2Pair::father)

Definition at line 71 of file Mesh_DeviceView.hpp.

◆ tAdj2Pair

Definition at line 70 of file Mesh_DeviceView.hpp.

◆ tAdj3

using DNDS::Geom::tAdj3 = typedef decltype(tAdj3Pair::father)

Definition at line 73 of file Mesh_DeviceView.hpp.

◆ tAdj3Pair

Definition at line 72 of file Mesh_DeviceView.hpp.

◆ tAdj4

using DNDS::Geom::tAdj4 = typedef decltype(tAdj4Pair::father)

Definition at line 75 of file Mesh_DeviceView.hpp.

◆ tAdj4Pair

Definition at line 74 of file Mesh_DeviceView.hpp.

◆ tAdj8

using DNDS::Geom::tAdj8 = typedef decltype(tAdj8Pair::father)

Definition at line 77 of file Mesh_DeviceView.hpp.

◆ tAdj8Pair

Definition at line 76 of file Mesh_DeviceView.hpp.

◆ tAdjPair

◆ tCoord

using DNDS::Geom::tCoord = typedef decltype(tCoordPair::father)

Definition at line 79 of file Mesh_DeviceView.hpp.

◆ tCoordPair

Definition at line 78 of file Mesh_DeviceView.hpp.

◆ tElemInfoArray

Definition at line 81 of file Mesh_DeviceView.hpp.

◆ tElemInfoArrayPair

◆ tFDataFieldName

using DNDS::Geom::tFDataFieldName = typedef std::function<std::string(int)>

Definition at line 1074 of file Mesh.hpp.

◆ tFDataFieldQuery

Definition at line 1075 of file Mesh.hpp.

◆ tFGetData

using DNDS::Geom::tFGetData = typedef std::function<DNDS::real(int, DNDS::index)>

Definition at line 86 of file Mesh_DeviceView.hpp.

◆ tFGetName

using DNDS::Geom::tFGetName = typedef std::function<std::string(int)>

Definition at line 85 of file Mesh_DeviceView.hpp.

◆ tFGetVecData

using DNDS::Geom::tFGetVecData = typedef std::function<DNDS::real(int, DNDS::index, DNDS::rowsize)>

Definition at line 87 of file Mesh_DeviceView.hpp.

◆ tGPoint

using DNDS::Geom::tGPoint = typedef Eigen::Matrix3d

Definition at line 11 of file Geometric.hpp.

◆ tGPointConstMap

using DNDS::Geom::tGPointConstMap = typedef Eigen::Map<const tGPoint, Eigen::Unaligned>

Definition at line 15 of file Geometric.hpp.

◆ tGPointMap

using DNDS::Geom::tGPointMap = typedef Eigen::Map<tGPoint, Eigen::Unaligned>

Definition at line 14 of file Geometric.hpp.

◆ tInd

using DNDS::Geom::tInd = typedef decltype(tIndPair::father)

Definition at line 83 of file Mesh_DeviceView.hpp.

◆ tIndexMapFunc

using DNDS::Geom::tIndexMapFunc = typedef std::function<index(index)>

Definition at line 24 of file Mesh_Legacy.cpp.

◆ tIndPair

Definition at line 82 of file Mesh_DeviceView.hpp.

◆ tJacobi

using DNDS::Geom::tJacobi = typedef Eigen::Matrix3d

Definition at line 10 of file Geometric.hpp.

◆ tLocalMatStruct

using DNDS::Geom::tLocalMatStruct = typedef std::vector<std::vector<index> >

Definition at line 66 of file Geometric.hpp.

◆ tPbi

using DNDS::Geom::tPbi = typedef decltype(tPbiPair::father)

Definition at line 67 of file Mesh_DeviceView.hpp.

◆ tPbiPair

◆ tPoint

using DNDS::Geom::tPoint = typedef Eigen::Vector3d

Definition at line 9 of file Geometric.hpp.

◆ tPointConstMap

using DNDS::Geom::tPointConstMap = typedef Eigen::Map<const tPoint, Eigen::Unaligned>

Definition at line 13 of file Geometric.hpp.

◆ tPointMap

using DNDS::Geom::tPointMap = typedef Eigen::Map<tPoint, Eigen::Unaligned>

Definition at line 12 of file Geometric.hpp.

◆ tPy_AdjPairTracked

template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Geom::tPy_AdjPairTracked = typedef py_class_ssp<AdjPairTracked<ArrayAdjacencyPair<_row_size, _row_max, _align> >>

Definition at line 28 of file AdjPairTracked_bind.hpp.

◆ tPy_AutoAppendName2ID

using DNDS::Geom::tPy_AutoAppendName2ID = typedef py_class_ssp<AutoAppendName2ID>

Definition at line 11 of file Boundary_bind.hpp.

◆ tPy_ElemInfo

Definition at line 13 of file Mesh_bind.hpp.

◆ tPy_UnstructuredMesh

Definition at line 43 of file Mesh_bind.hpp.

◆ tPy_UnstructuredMeshSerialRW

◆ tSmallCoords

using DNDS::Geom::tSmallCoords = typedef Eigen::Matrix<real, 3, Eigen::Dynamic>

Definition at line 50 of file Geometric.hpp.

Enumeration Type Documentation

◆ AdjAction

enum class DNDS::Geom::AdjAction
strong

Action to take on an adjacency during reorder.

Enumerator
SKIP 

Neither source nor target reordered.

RELOCATE 

Source reordered, target not: move rows.

REMAP 

Target reordered, source not: update entries.

RELOCATE_REMAP 

Both reordered: update entries then move rows.

SELF 

Intra-level (A==A): update entries then move rows.

Definition at line 80 of file ReorderPlan.hpp.

◆ EntityKind

enum class DNDS::Geom::EntityKind : int8_t
strong

Logical entity roles in the mesh. Topological depth depends on the mesh dimension (2D or 3D).

In 3D: Cell=3, Face=2, Edge=1, Node=0. In 2D: Cell=2, Face=1, Edge=1 (==Face), Node=0. Bnd shares Face's depth but is stored separately (zone-labeled subset).

Enumerator
Cell 
Face 
Edge 
Node 
Bnd 
NUM_KINDS 

Definition at line 43 of file MeshConnectivity.hpp.

◆ MeshAdjState

Enumerator
Adj_Unknown 
Adj_PointToLocal 
Adj_PointToGlobal 

Definition at line 89 of file Mesh_DeviceView.hpp.

◆ MeshElevationState

Enumerator
Elevation_Untouched 
Elevation_O1O2 

Definition at line 96 of file Mesh_DeviceView.hpp.

◆ MeshLoc

enum class DNDS::Geom::MeshLoc : uint8_t
strong
Enumerator
Unknown 
Node 
Face 
Cell 

Definition at line 27 of file Mesh.hpp.

◆ MeshReaderMode

Enumerator
UnknownMode 
SerialReadAndDistribute 
SerialOutput 

Definition at line 1077 of file Mesh.hpp.

Function Documentation

◆ _getCGNSTypeFromElemType()

constexpr ElementType_t DNDS::Geom::_getCGNSTypeFromElemType ( Elem::ElemType  et)
constexpr

Definition at line 53 of file CGNS.hpp.

Here is the caller graph for this function:

◆ _getElemTypeFromCGNSType()

constexpr Elem::ElemType DNDS::Geom::_getElemTypeFromCGNSType ( ElementType_t  cgns_et)
constexpr

Definition at line 16 of file CGNS.hpp.

Here is the caller graph for this function:

◆ adjKindName()

std::string DNDS::Geom::adjKindName ( const AdjKind kind)

Format an AdjKind as a diagnostic string, e.g. "Cell2Node", "Cell2Cell(Node)".

Definition at line 15 of file MeshConnectivity.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildBndMesh()

void DNDS::Geom::BuildBndMesh ( UnstructuredMesh mesh,
UnstructuredMesh meshBnd,
UnstructuredMeshSerialRW readerBnd,
bool  buildSerialOut = true 
)
inline

Extract the boundary surface mesh from a solver-ready volume mesh.

Parameters
meshThe volume mesh (must have faces built).
meshBndOutput boundary mesh (constructed with dim-1).
readerBndReader bound to meshBnd.
buildSerialOutWhether to build serial output for the bnd mesh.

Definition at line 248 of file Mesh_Helpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildGhostPrimary()

void DNDS::Geom::BuildGhostPrimary ( UnstructuredMesh mesh,
int  nGhostLayers = 1 
)
inline

Build connectivity and ghost layer for a freshly-distributed mesh.

This 5-step sequence is identical across all read paths (CGNS serial, H5 parallel, H5 distributed).

Parameters
nGhostLayersNumber of cell2cell hops for ghost cells (default 1).

Definition at line 32 of file Mesh_Helpers.hpp.

Here is the caller graph for this function:

◆ CheckedComposeFiltered()

template<rowsize rs_AB = NonUniformSize, rowsize rs_BC = NonUniformSize, rowsize out_rs = NonUniformSize, class Predicate , class... TArgs>
AdjPairTracked< ArrayAdjacencyPair< out_rs > > DNDS::Geom::CheckedComposeFiltered ( const AdjPairTracked< ArrayAdjacencyPair< rs_AB > > &  AB,
const AdjPairTracked< ArrayAdjacencyPair< rs_BC > > &  BC,
const std::unordered_map< index, index > &  bGlobal2Local,
Predicate &&  pred,
TArgs &&...  args 
)

State-checked wrapper for MeshConnectivity::ComposeFiltered.

Extracts aLocal2Global from AB's ghost mapping. Returns an AdjPairTracked with:

  • father adopted from the DSL result (no copy)
  • idx.state() == Adj_PointToGlobal

AB must have a valid trans.pLGhostMapping (e.g., via EnsureGhostMapping).

Definition at line 81 of file MeshConnectivity_StateChecked.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckedInterpolateGlobal()

template<rowsize p2n_rs = NonUniformSize, rowsize e2p_rs = NonUniformSize>
auto DNDS::Geom::CheckedInterpolateGlobal ( const AdjPairTracked< ArrayAdjacencyPair< p2n_rs > > &  parent2node,
const tPbiPair parent2nodePbi,
const OffsetAscendIndexMapping parentGhostMapping,
const GlobalOffsetsMapping parentGlobalMapping,
const OffsetAscendIndexMapping nodeGhostMapping,
const SubEntityQueryPbi query,
index  nLocalParents,
index  nTotalParents,
index  nNode,
const OwnershipResolverMulti resolver,
const MPIInfo mpi 
)

State-checked wrapper for MeshConnectivity::InterpolateGlobal.

Definition at line 120 of file MeshConnectivity_StateChecked.hpp.

◆ CheckedInverse()

template<rowsize cone_rs = NonUniformSize, class ToPair >
AdjPairTracked< tAdjPair > DNDS::Geom::CheckedInverse ( const AdjPairTracked< ArrayAdjacencyPair< cone_rs > > &  cone,
const ToPair &  toPair,
index  nToLocal,
const MPIInfo mpi 
)

State-checked wrapper for MeshConnectivity::Inverse.

Extracts L2G callbacks from cone and toPair ghost mappings. Returns an AdjPairTracked with:

  • father adopted from the DSL result (no copy)
  • idx.state() == Adj_PointToGlobal
Parameters
coneA → B (global state, from-entity = A).
toPairAny ArrayPair for entity B (must have trans.pLGhostMapping).
nToLocalNumber of local B-entities.
mpiMPI communicator.

Definition at line 32 of file MeshConnectivity_StateChecked.hpp.

Here is the caller graph for this function:

◆ classifyAdj()

AdjAction DNDS::Geom::classifyAdj ( AdjKind  adj,
const std::unordered_set< EntityKind > &  reorderedKinds 
)
inline

Classify an adjacency given the set of reordered entity kinds.

Definition at line 90 of file ReorderPlan.hpp.

Here is the caller graph for this function:

◆ ConvertAdjSerial2Global()

template<class TAdj = tAdj1>
void DNDS::Geom::ConvertAdjSerial2Global ( TAdj &  arraySerialAdj,
const std::vector< DNDS::index > &  partitionJSerial2Global,
const DNDS::MPIInfo mpi 
)

Converts adjacency entries from old (serial/evenly-split) indices to new global indices using a lookup table communicated via ArrayTransformer.

Definition at line 73 of file Mesh_PartitionHelpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CrossMatToVec()

tPoint DNDS::Geom::CrossMatToVec ( const tGPoint axnM)
inline

Definition at line 202 of file Geometric.hpp.

◆ CrossVecToMat()

tGPoint DNDS::Geom::CrossVecToMat ( const tPoint axn)
inline

Definition at line 195 of file Geometric.hpp.

Here is the caller graph for this function:

◆ entityDepth()

int DNDS::Geom::entityDepth ( EntityKind  kind,
int  dim 
)
inline

Resolve EntityKind to topological depth for a given mesh dimension. In 2D, Edge and Face both resolve to dim-1 = 1. Bnd resolves to dim-1 (same depth as Face).

Definition at line 56 of file MeshConnectivity.hpp.

Here is the caller graph for this function:

◆ entityKindName()

const char * DNDS::Geom::entityKindName ( EntityKind  kind)
inline

String name for an EntityKind (for diagnostics).

Definition at line 77 of file MeshConnectivity.hpp.

Here is the caller graph for this function:

◆ FaceIDIsExternalBC()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsExternalBC ( t_index  id)
inline

Definition at line 80 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsInternal()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsInternal ( t_index  id)
inline

Definition at line 85 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodic()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodic ( t_index  id)
inline

Definition at line 95 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodic1()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodic1 ( t_index  id)
inline

Definition at line 105 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodic2()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodic2 ( t_index  id)
inline

Definition at line 111 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodic3()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodic3 ( t_index  id)
inline

Definition at line 117 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodicDonor()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodicDonor ( t_index  id)
inline

Definition at line 130 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsPeriodicMain()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsPeriodicMain ( t_index  id)
inline

Definition at line 123 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ FaceIDIsTrueInternal()

DNDS_DEVICE_CALLABLE bool DNDS::Geom::FaceIDIsTrueInternal ( t_index  id)
inline

Definition at line 90 of file BoundaryCondition.hpp.

◆ FacialJacobianToNormVec()

template<int d>
tPoint DNDS::Geom::FacialJacobianToNormVec ( const tJacobi J)
inline

get normal vector from facial jacobian note that $$ J_{ij} = \partial_{\xi_j} x_i $$

Definition at line 113 of file Geometric.hpp.

◆ GetFaceName2IDDefault()

auto DNDS::Geom::GetFaceName2IDDefault ( )
inline

Definition at line 49 of file BoundaryCondition.hpp.

Here is the caller graph for this function:

◆ GetTanhDistributionBilateral()

void DNDS::Geom::GetTanhDistributionBilateral ( real  x0,
real  x1,
index  NInterval,
real  d0,
Eigen::Vector< real, Eigen::Dynamic > &  d 
)
inline

Definition at line 7 of file Grid.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCollaborativeNodePeriodicBits()

bool DNDS::Geom::isCollaborativeNodePeriodicBits ( const std::vector< NodePeriodicBits > &  a,
const std::vector< NodePeriodicBits > &  b 
)
inline

Definition at line 90 of file PeriodicInfo.hpp.

Here is the call graph for this function:

◆ JacobiToSTDVector()

std::vector< real > DNDS::Geom::JacobiToSTDVector ( const tJacobi j)
inline

Definition at line 72 of file Geometric.hpp.

Here is the caller graph for this function:

◆ MeshH5Path()

std::string DNDS::Geom::MeshH5Path ( const std::string &  base,
int  mpiSize,
int  elevation = 0,
int  bisect = 0 
)
inline

Build the conventional H5 filename for a partitioned mesh.

Convention: {base}_part_{mpiSize}[_elevated][_bisectN] (The caller / SerializerFactory appends the actual extension.)

Definition at line 296 of file Mesh_Helpers.hpp.

Here is the caller graph for this function:

◆ NormBuildLocalBaseV()

template<int dim>
Eigen::Matrix< real, dim, dim > DNDS::Geom::NormBuildLocalBaseV ( const Eigen::Ref< const Eigen::Vector< real, dim > > &  uNorm)
inline

input uNorm should already be normalized

Definition at line 135 of file Geometric.hpp.

◆ Partition2LocalIdx()

template<class TPartitionIdx >
void DNDS::Geom::Partition2LocalIdx ( const std::vector< TPartitionIdx > &  partition,
std::vector< DNDS::index > &  localPush,
std::vector< DNDS::index > &  localPushStart,
const DNDS::MPIInfo mpi 
)

Builds CSR-style push indices from a partition vector. partition[i] = rank that element i should go to. Output: localPush[localPushStart[r]..localPushStart[r+1]) = local indices going to rank r.

Definition at line 22 of file Mesh_PartitionHelpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Partition2Serial2Global()

template<class TPartitionIdx >
void DNDS::Geom::Partition2Serial2Global ( const std::vector< TPartitionIdx > &  partition,
std::vector< DNDS::index > &  serial2Global,
const DNDS::MPIInfo mpi,
DNDS::MPI_int  nPart 
)

Computes the serial-to-global index mapping after repartitioning. Elements assigned to the same rank are grouped contiguously in the new global numbering. Uses MPI_Allreduce + MPI_Scan for prefix sums.

Definition at line 47 of file Mesh_PartitionHelpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PartitionSerialAdj_Metis()

auto DNDS::Geom::PartitionSerialAdj_Metis ( tLocalMatStruct::const_iterator  mat_begin,
tLocalMatStruct::const_iterator  mat_end,
int  nPart,
index  ind_offset = 0,
std::string  metisType = "KWAY",
int  metisNcuts = 3,
int  metisUfactor = 5,
int  metisSeed = 0 
)
inline

Partition a (sub-)graph using Metis.

Adjacency entries in [mat_begin, mat_end) are absolute indices offset by ind_offset. This function internally subtracts ind_offset and filters out cross-sub-graph references (entries outside [ind_offset, ind_offset + n_elem)) before building the 0-based CSR that Metis requires.

Parameters
ind_offsetAbsolute index of the first row in this sub-graph. For a full graph this is 0 and no filtering occurs.

Build CSR with 0-based local indices: subtract ind_offset and skip entries outside [ind_offset, ind_offset + nCell) (cross-sub-graph edges).

Definition at line 31 of file SerialAdjReordering.hpp.

Here is the caller graph for this function:

◆ PrepareMesh()

void DNDS::Geom::PrepareMesh ( UnstructuredMesh mesh,
UnstructuredMeshSerialRW reader,
const PrepareMeshOptions opts = {} 
)
inline

Prepare a distributed mesh for solver use.

Steps: cell reorder, face interpolation, ghost N2CB, optional serial output. Does NOT include: elevation smoothing, wall distance, coord transforms, periodic nodes, VTK connectivity, boundary mesh. Those remain solver / caller responsibility.

Parameters
meshDistributed mesh (output of ReadMeshFromCGNS / ReadMeshFromH5).
readerThe reader bound to mesh.
optsOptions controlling reordering and serial output.

Definition at line 204 of file Mesh_Helpers.hpp.

Here is the caller graph for this function:

◆ PrepareSmoothSolverSetup()

static std::optional< SmoothSolverSetup > DNDS::Geom::PrepareSmoothSolverSetup ( UnstructuredMesh mesh)
inline

Common preamble for all smooth solver variants.

Checks state assertions, identifies boundary-interpolated nodes, gathers boundary coordinates and displacement values, and sets up MPI ghost communication so every rank has a complete copy of the boundary interpolation data.

Returns
std::nullopt if nTotalMoved == 0 (nothing to do).

Checks state assertions, identifies boundary-interpolated nodes, gathers boundary coordinates and displacement values, and sets up MPI ghost communication so every rank has a complete copy of the boundary interpolation data.

Parameters
meshThe mesh being smoothed (must have elevState == Elevation_O1O2, adjPrimaryState/adjFacialState/adjC2FState == Adj_PointToLocal, and nTotalMoved >= 0).
Returns
std::nullopt if nTotalMoved == 0 (nothing to do); otherwise the populated SmoothSolverSetup.

Definition at line 83 of file Mesh_Elevation_SmoothHelpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushInfo2Serial2Global()

void DNDS::Geom::PushInfo2Serial2Global ( std::vector< DNDS::index > &  serial2Global,
DNDS::index  localSize,
const std::vector< DNDS::index > &  pushIndex,
const std::vector< DNDS::index > &  pushIndexStart,
const DNDS::MPIInfo mpi 
)

Reserved skeleton for parallel topology interpolation.

This commented-out method is preserved as a placeholder for a future generic topology management API. Currently, mesh topology (cell2face, face2cell, etc.) is constructed serially and distributed. However, a parallel interpolation capability may be needed for:

  • Dynamic mesh adaptation (refinement/coarsening)
  • Load balancing with topology migration
  • Multi-physics coupling with different mesh partitions

If implementing parallel topology construction, this skeleton provides the basic structure for building face-based adjacencies from cell2node without requiring a serial global mesh on rank 0.

Todo:
Evaluate need for parallel topology API in Phase 5 refactoring.

inefficient, use Partition2Serial2Global ! only used for convenient comparison

Definition at line 58 of file Mesh.cpp.

Here is the call graph for this function:

◆ pybind11_AdjIndexInfo_define()

void DNDS::Geom::pybind11_AdjIndexInfo_define ( py::module_ &  m)
inline

Definition at line 46 of file AdjPairTracked_bind.hpp.

Here is the call graph for this function:

◆ pybind11_AdjPairTracked_declare()

template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
tPy_AdjPairTracked< _row_size, _row_max, _align > DNDS::Geom::pybind11_AdjPairTracked_declare ( py::module_ &  m)

Declare the pybind11 class (creates the type stub in the module). Must be called AFTER the base ArrayAdjacencyPair type is registered (typically by importing DNDSR.DNDS).

Definition at line 65 of file AdjPairTracked_bind.hpp.

◆ pybind11_AdjPairTracked_define()

template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Geom::pybind11_AdjPairTracked_define ( py::module_ &  m)

Define all AdjPairTracked-specific methods on the pybind11 class.

Definition at line 76 of file AdjPairTracked_bind.hpp.

Here is the caller graph for this function:

◆ pybind11_AdjPairTracked_name()

template<rowsize _row_size, rowsize _row_max = _row_size, rowsize _align = NoAlign>
std::string DNDS::Geom::pybind11_AdjPairTracked_name ( )

Definition at line 22 of file AdjPairTracked_bind.hpp.

◆ pybind11_ArrayElemInfo_define()

void DNDS::Geom::pybind11_ArrayElemInfo_define ( py::module_ &  m)
inline

Definition at line 24 of file Mesh_bind.hpp.

◆ pybind11_AutoAppendName2ID_define()

void DNDS::Geom::pybind11_AutoAppendName2ID_define ( py::module_ &  m)
inline

Definition at line 13 of file Boundary_bind.hpp.

◆ pybind11_ElemInfo_define()

void DNDS::Geom::pybind11_ElemInfo_define ( py::module_ &  m)
inline

Definition at line 15 of file Mesh_bind.hpp.

Here is the call graph for this function:

◆ pybind11_MeshAdjState_define()

void DNDS::Geom::pybind11_MeshAdjState_define ( py::module_ &  m)
inline

Definition at line 34 of file AdjPairTracked_bind.hpp.

◆ pybind11_MeshLocDefine()

void DNDS::Geom::pybind11_MeshLocDefine ( py::module_ &  m)
inline

Definition at line 32 of file Mesh_bind.hpp.

◆ pybind11_UnstructuredMesh_define()

void DNDS::Geom::pybind11_UnstructuredMesh_define ( py::module_ &  m)
inline

!

Definition at line 45 of file Mesh_bind.hpp.

Here is the call graph for this function:

◆ pybind11_UnstructuredMeshSerialRW_define()

void DNDS::Geom::pybind11_UnstructuredMeshSerialRW_define ( py::module_ &  m)
inline

Definition at line 207 of file Mesh_bind.hpp.

Here is the call graph for this function:

◆ ReadMeshFromCGNS()

void DNDS::Geom::ReadMeshFromCGNS ( ssp< UnstructuredMesh > &  mesh,
ssp< UnstructuredMeshSerialRW > &  reader,
const std::string &  meshFile,
const PartitionOptions partOpts = {},
real  periodicTol = 1e-9,
int  elevation = 0,
int  bisect = 0,
std::function< t_index(const std::string &)>  nameMapper = nullptr 
)
inline

Read a CGNS mesh, partition, and optionally elevate/bisect.

After this call the mesh is distributed with ghost cells and local indices, but NOT solver-ready (no faces, no ghost N2CB).

Parameters
meshFresh UnstructuredMesh (constructed with mpi, dim).
readerUnstructuredMeshSerialRW bound to mesh.
meshFilePath to the CGNS file.
partOptsMetis partition options.
periodicTolTolerance for periodic boundary deduplication.
elevation0 = none, 1 = O1->O2.
bisectNumber of bisection passes (0..4).
nameMapperOptional callback mapping BC names to IDs (for the CGNS reader). If nullptr, the reader's default AutoAppendName2ID is used.

Definition at line 61 of file Mesh_Helpers.hpp.

Here is the caller graph for this function:

◆ ReadMeshFromH5()

void DNDS::Geom::ReadMeshFromH5 ( UnstructuredMesh mesh,
Serializer::SerializerFactory  factory,
const std::string &  h5Path,
const PartitionOptions partOpts = {} 
)
inline

Read a mesh from DNDSR H5 with even-split + ParMetis repartition.

Works with any number of MPI ranks regardless of how the file was written.

Definition at line 135 of file Mesh_Helpers.hpp.

Here is the caller graph for this function:

◆ ReadMeshFromH5Parallel()

void DNDS::Geom::ReadMeshFromH5Parallel ( UnstructuredMesh mesh,
Serializer::SerializerFactory  factory,
const std::string &  h5Path 
)
inline

Read a pre-partitioned mesh from H5 (exact np match required).

Uses ReadSerialize (no repartitioning). The file must have been written with the same number of MPI ranks.

Definition at line 161 of file Mesh_Helpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReorderSerialAdj_BoostMMD()

std::pair< std::vector< index >, std::vector< index > > DNDS::Geom::ReorderSerialAdj_BoostMMD ( const tLocalMatStruct mat)
inline

Definition at line 154 of file SerialAdjReordering.hpp.

Here is the caller graph for this function:

◆ ReorderSerialAdj_BoostRCM()

std::pair< std::vector< index >, std::vector< index > > DNDS::Geom::ReorderSerialAdj_BoostRCM ( const tLocalMatStruct mat,
index bandWidthOld,
index bandWidthNew 
)
inline

Definition at line 179 of file SerialAdjReordering.hpp.

Here is the caller graph for this function:

◆ ReorderSerialAdj_CorrectRCM()

std::pair< std::vector< index >, std::vector< index > > DNDS::Geom::ReorderSerialAdj_CorrectRCM ( tLocalMatStruct::const_iterator  mat_begin,
tLocalMatStruct::const_iterator  mat_end,
index bandWidthOld,
index bandWidthNew,
index  offset = 0 
)
inline

Definition at line 282 of file SerialAdjReordering.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReorderSerialAdj_Metis()

std::pair< std::vector< index >, std::vector< index > > DNDS::Geom::ReorderSerialAdj_Metis ( const tLocalMatStruct mat)
inline

check overflow!

Definition at line 105 of file SerialAdjReordering.hpp.

Here is the caller graph for this function:

◆ ReorderSerialAdj_PartitionMetisC()

std::vector< index > DNDS::Geom::ReorderSerialAdj_PartitionMetisC ( tLocalMatStruct::iterator  mat_begin,
tLocalMatStruct::iterator  mat_end,
std::vector< index >::iterator  i_new2old_begin,
std::vector< index >::iterator  i_new2old_end,
int  nParts,
index  ind_offset,
bool  do_rcm,
index bwOldM,
index bwNewM,
tLocalMatStruct::iterator  full_mat_begin,
index  full_n_elem 
)

Partition a sub-graph into nParts and optionally apply RCM reordering within each part.

Partition a sub-graph and optionally RCM-reorder within each partition.

This function operates on the sub-range [mat_begin, mat_end), which represents n_elem rows of an adjacency graph. Adjacency entries use absolute indices (offset by ind_offset), i.e., cell i's neighbors are stored as (ind_offset + local_index).

When called for second-level (inner) partitioning, the sub-range's adjacency rows may contain cross-sub-graph references pointing outside [ind_offset, ind_offset + n_elem). These arise because the first-level partitioning reindexed the full graph, and boundary cells retain edges to cells in other first-level partitions. Two problems follow:

  1. Metis and the partition-adjacency builder require a self-contained local graph; cross-sub-graph edges must be excluded from these operations.
  2. When cells within this sub-range are permuted, all references to them – including those in other sub-ranges' rows – must be updated to maintain the bidirectional graph invariant. The optional full_mat_begin / full_n_elem parameters provide access to the full graph for this cross-sub-graph fixup.

The RCM section trims cross-sub-partition edges before reordering (each sub-partition only needs internal connectivity for bandwidth reduction). The RCM reindex uses (ind_offset + local_offset) as the base for correct absolute index arithmetic.

Parameters
full_mat_beginIterator to the start of the full graph (for cross-sub-graph reference updates). Pass default (empty) when this sub-range IS the full graph (first-level call).
full_n_elemTotal number of rows in the full graph. 0 means no cross-sub-graph fixup is needed.

When used for second-level (inner) partitioning, pass full_mat_begin / full_n_elem so that cross-sub-graph references in the full graph are updated after permutation. See implementation in SerialAdjReordering.cpp for detailed documentation.

PartitionSerialAdj_Metis now handles the filtering and rebasing internally via its ind_offset parameter.

Build partition-level adjacency (which partitions neighbor which). Only intra-sub-graph edges matter for partition adjacency.

Permute rows according to partition assignment; build i_old2new mapping.

Remap in-range references within the permuted sub-range rows. Cross-sub-graph references (outside [ind_offset, ind_offset + n_elem)) are left unchanged here; they point to cells not touched by this permutation.

Update cross-sub-graph references: rows OUTSIDE [mat_begin, mat_end) may contain edges pointing into this sub-range with pre-permutation indices. Walk the full graph and apply i_old2new to any such references.

Per-partition RCM reordering. Cross-sub-partition edges are trimmed before RCM since bandwidth reduction only considers intra-partition connectivity. The reindex step uses (ind_offset + local_offset) as the absolute base.

Trim: remove edges outside [ind_offset + local_offset, ind_offset + local_offset + local_nelem)

Definition at line 35 of file SerialAdjReordering.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RotateAxis()

tGPoint DNDS::Geom::RotateAxis ( const tPoint axis)
inline

Definition at line 183 of file Geometric.hpp.

◆ RotX()

tGPoint DNDS::Geom::RotX ( real  theta)
inline

Definition at line 166 of file Geometric.hpp.

Here is the caller graph for this function:

◆ RotY()

tGPoint DNDS::Geom::RotY ( real  theta)
inline

Definition at line 174 of file Geometric.hpp.

Here is the caller graph for this function:

◆ RotZ()

tGPoint DNDS::Geom::RotZ ( real  theta)
inline

Definition at line 158 of file Geometric.hpp.

Here is the caller graph for this function:

◆ SerializeMesh()

void DNDS::Geom::SerializeMesh ( UnstructuredMesh mesh,
const std::string &  outputPath,
Serializer::SerializerFactory factory 
)
inline

Write a partitioned mesh to H5 for later distributed read.

The Python equivalent of the C++ partitionMeshOnly path.

Definition at line 271 of file Mesh_Helpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDVectorToJacobi()

tJacobi DNDS::Geom::STDVectorToJacobi ( const std::vector< real > &  v)
inline

Definition at line 80 of file Geometric.hpp.

Here is the caller graph for this function:

◆ STDVectorToVector()

Eigen::VectorXd DNDS::Geom::STDVectorToVector ( const std::vector< real > &  v)
inline

Definition at line 94 of file Geometric.hpp.

Here is the caller graph for this function:

◆ ToThreeDim()

template<int dim>
tPoint DNDS::Geom::ToThreeDim ( const Eigen::Vector< real, dim > &  v)

Definition at line 208 of file Geometric.hpp.

Here is the call graph for this function:

◆ TransferDataSerial2Global()

template<class TArr = tAdj1>
void DNDS::Geom::TransferDataSerial2Global ( TArr &  arraySerial,
TArr &  arrayDist,
const std::vector< DNDS::index > &  pushIndex,
const std::vector< DNDS::index > &  pushIndexStart,
const DNDS::MPIInfo mpi 
)

Transfers array data from current (serial/evenly-split) layout to the new distributed layout using ArrayTransformer push-based ghost mapping.

Definition at line 148 of file Mesh_PartitionHelpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VectorToSTDVector()

std::vector< real > DNDS::Geom::VectorToSTDVector ( const Eigen::VectorXd &  v)
inline

Definition at line 89 of file Geometric.hpp.

Here is the caller graph for this function:

Variable Documentation

◆ invalid_index

const t_index DNDS::Geom::invalid_index = INT32_MAX

Definition at line 7 of file Geometric.hpp.