|
DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
|
Namespaces | |
| namespace | Adj |
| Convenience constants for common adjacency kinds. | |
| namespace | Base |
| namespace | detail |
| namespace | Elem |
| namespace | OpenFOAM |
| namespace | RBF |
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< real > | JacobiToSTDVector (const tJacobi &j) |
| tJacobi | STDVectorToJacobi (const std::vector< real > &v) |
| std::vector< real > | VectorToSTDVector (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< SmoothSolverSetup > | PrepareSmoothSolverSetup (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< tAdjPair > | CheckedInverse (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< index > | 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. | |
| 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 |
| 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.
| 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.
| using DNDS::Geom::AdjVariant = typedef std::variant< tAdjPair, tAdj1Pair, tAdj2Pair, tAdj3Pair, tAdj4Pair, tAdj8Pair> |
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.
| using DNDS::Geom::ArrayNodePeriodicBitsPair = typedef ArrayPair<ArrayNodePeriodicBits<_row_size, _row_max, _align> > |
Definition at line 185 of file PeriodicInfo.hpp.
| using DNDS::Geom::InterpolateDistributedResult = typedef InterpolateDistributedResultT<> |
Default InterpolateDistributedResult: entity2parent is fixed-2 (as before).
Definition at line 813 of file MeshConnectivity.hpp.
| using DNDS::Geom::InterpolateGlobalResult = typedef InterpolateGlobalResultT<> |
Default: all fields variable-width.
Definition at line 716 of file MeshConnectivity.hpp.
| using DNDS::Geom::InterpolateResult = typedef InterpolateResultT<> |
Default InterpolateResult: all fields are variable-width (NonUniformSize).
Definition at line 775 of file MeshConnectivity.hpp.
| 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.
| 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.
| parents | All parent indices (local-appended) of this entity. [0, nLocalParents) = owned, [nLocal, nTotal) = ghost. |
| nLocalParents | Number of owned (father) parents on this rank. |
| parentRanks | Rank owning each parent (parallel to parents vector). |
Definition at line 634 of file MeshConnectivity.hpp.
| using DNDS::Geom::t_FBCID_2_Name = typedef std::function<std::string(t_index)> |
Definition at line 47 of file BoundaryCondition.hpp.
| using DNDS::Geom::t_FBCName_2_ID = typedef std::function<t_index(const std::string &)> |
Definition at line 46 of file BoundaryCondition.hpp.
| using DNDS::Geom::t_index = typedef int32_t |
Definition at line 6 of file Geometric.hpp.
| using DNDS::Geom::t_real = typedef double |
Definition at line 8 of file Geometric.hpp.
| using DNDS::Geom::tAdj = typedef decltype(tAdjPair::father) |
Definition at line 65 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj1 = typedef decltype(tAdj1Pair::father) |
Definition at line 69 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj1Pair = typedef DNDS::ArrayAdjacencyPair<1> |
Definition at line 68 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj2 = typedef decltype(tAdj2Pair::father) |
Definition at line 71 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj2Pair = typedef DNDS::ArrayAdjacencyPair<2> |
Definition at line 70 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj3 = typedef decltype(tAdj3Pair::father) |
Definition at line 73 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj3Pair = typedef DNDS::ArrayAdjacencyPair<3> |
Definition at line 72 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj4 = typedef decltype(tAdj4Pair::father) |
Definition at line 75 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj4Pair = typedef DNDS::ArrayAdjacencyPair<4> |
Definition at line 74 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj8 = typedef decltype(tAdj8Pair::father) |
Definition at line 77 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdj8Pair = typedef DNDS::ArrayAdjacencyPair<8> |
Definition at line 76 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tAdjPair = typedef DNDS::ArrayAdjacencyPair<DNDS::NonUniformSize> |
Definition at line 64 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tCoord = typedef decltype(tCoordPair::father) |
Definition at line 79 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tCoordPair = typedef DNDS::ArrayPair<DNDS::ArrayEigenVector<3> > |
Definition at line 78 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tElemInfoArray = typedef DNDS::ssp<DNDS::ParArray<ElemInfo> > |
Definition at line 81 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tElemInfoArrayPair = typedef DNDS::ArrayPair<DNDS::ParArray<ElemInfo> > |
Definition at line 80 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tFDataFieldName = typedef std::function<std::string(int)> |
| using DNDS::Geom::tFDataFieldQuery = typedef tFGetData |
| using DNDS::Geom::tFGetData = typedef std::function<DNDS::real(int, DNDS::index)> |
Definition at line 86 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tFGetName = typedef std::function<std::string(int)> |
Definition at line 85 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tFGetVecData = typedef std::function<DNDS::real(int, DNDS::index, DNDS::rowsize)> |
Definition at line 87 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tGPoint = typedef Eigen::Matrix3d |
Definition at line 11 of file Geometric.hpp.
| using DNDS::Geom::tGPointConstMap = typedef Eigen::Map<const tGPoint, Eigen::Unaligned> |
Definition at line 15 of file Geometric.hpp.
| using DNDS::Geom::tGPointMap = typedef Eigen::Map<tGPoint, Eigen::Unaligned> |
Definition at line 14 of file Geometric.hpp.
| using DNDS::Geom::tInd = typedef decltype(tIndPair::father) |
Definition at line 83 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tIndexMapFunc = typedef std::function<index(index)> |
Definition at line 24 of file Mesh_Legacy.cpp.
| using DNDS::Geom::tIndPair = typedef DNDS::ArrayPair<DNDS::ArrayIndex> |
Definition at line 82 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tJacobi = typedef Eigen::Matrix3d |
Definition at line 10 of file Geometric.hpp.
| using DNDS::Geom::tLocalMatStruct = typedef std::vector<std::vector<index> > |
Definition at line 66 of file Geometric.hpp.
| using DNDS::Geom::tPbi = typedef decltype(tPbiPair::father) |
Definition at line 67 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tPbiPair = typedef ArrayPair<ArrayNodePeriodicBits<DNDS::NonUniformSize> > |
Definition at line 66 of file Mesh_DeviceView.hpp.
| using DNDS::Geom::tPoint = typedef Eigen::Vector3d |
Definition at line 9 of file Geometric.hpp.
| using DNDS::Geom::tPointConstMap = typedef Eigen::Map<const tPoint, Eigen::Unaligned> |
Definition at line 13 of file Geometric.hpp.
| using DNDS::Geom::tPointMap = typedef Eigen::Map<tPoint, Eigen::Unaligned> |
Definition at line 12 of file Geometric.hpp.
| 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.
| using DNDS::Geom::tPy_AutoAppendName2ID = typedef py_class_ssp<AutoAppendName2ID> |
Definition at line 11 of file Boundary_bind.hpp.
| using DNDS::Geom::tPy_ElemInfo = typedef py_class_ssp<ElemInfo> |
Definition at line 13 of file Mesh_bind.hpp.
| using DNDS::Geom::tPy_UnstructuredMesh = typedef py_class_ssp<UnstructuredMesh> |
Definition at line 43 of file Mesh_bind.hpp.
| using DNDS::Geom::tPy_UnstructuredMeshSerialRW = typedef py_class_ssp<UnstructuredMeshSerialRW> |
Definition at line 205 of file Mesh_bind.hpp.
| using DNDS::Geom::tSmallCoords = typedef Eigen::Matrix<real, 3, Eigen::Dynamic> |
Definition at line 50 of file Geometric.hpp.
|
strong |
Action to take on an adjacency during reorder.
Definition at line 80 of file ReorderPlan.hpp.
|
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.
| Enumerator | |
|---|---|
| Adj_Unknown | |
| Adj_PointToLocal | |
| Adj_PointToGlobal | |
Definition at line 89 of file Mesh_DeviceView.hpp.
| Enumerator | |
|---|---|
| Elevation_Untouched | |
| Elevation_O1O2 | |
Definition at line 96 of file Mesh_DeviceView.hpp.
|
strong |
|
constexpr |
|
constexpr |
| 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.
|
inline |
Extract the boundary surface mesh from a solver-ready volume mesh.
| mesh | The volume mesh (must have faces built). |
| meshBnd | Output boundary mesh (constructed with dim-1). |
| readerBnd | Reader bound to meshBnd. |
| buildSerialOut | Whether to build serial output for the bnd mesh. |
Definition at line 248 of file Mesh_Helpers.hpp.
|
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).
| nGhostLayers | Number of cell2cell hops for ghost cells (default 1). |
Definition at line 32 of file Mesh_Helpers.hpp.
| 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:
AB must have a valid trans.pLGhostMapping (e.g., via EnsureGhostMapping).
Definition at line 81 of file MeshConnectivity_StateChecked.hpp.
| 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.
| 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:
| cone | A → B (global state, from-entity = A). |
| toPair | Any ArrayPair for entity B (must have trans.pLGhostMapping). |
| nToLocal | Number of local B-entities. |
| mpi | MPI communicator. |
Definition at line 32 of file MeshConnectivity_StateChecked.hpp.
|
inline |
Classify an adjacency given the set of reordered entity kinds.
Definition at line 90 of file ReorderPlan.hpp.
| 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.
Definition at line 202 of file Geometric.hpp.
|
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.
|
inline |
String name for an EntityKind (for diagnostics).
Definition at line 77 of file MeshConnectivity.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 90 of file BoundaryCondition.hpp.
get normal vector from facial jacobian note that $$ J_{ij} = \partial_{\xi_j} x_i $$
Definition at line 113 of file Geometric.hpp.
|
inline |
|
inline |
|
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.
|
inline |
input uNorm should already be normalized
Definition at line 135 of file Geometric.hpp.
| 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.
| 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.
|
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.
| ind_offset | Absolute 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.
|
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.
| mesh | Distributed mesh (output of ReadMeshFromCGNS / ReadMeshFromH5). |
| reader | The reader bound to mesh. |
| opts | Options controlling reordering and serial output. |
Definition at line 204 of file Mesh_Helpers.hpp.
|
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.
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.
| mesh | The mesh being smoothed (must have elevState == Elevation_O1O2, adjPrimaryState/adjFacialState/adjC2FState == Adj_PointToLocal, and nTotalMoved >= 0). |
Definition at line 83 of file Mesh_Elevation_SmoothHelpers.hpp.
| 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:
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.
inefficient, use Partition2Serial2Global ! only used for convenient comparison
Definition at line 58 of file Mesh.cpp.
|
inline |
| 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.
| 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.
| std::string DNDS::Geom::pybind11_AdjPairTracked_name | ( | ) |
Definition at line 22 of file AdjPairTracked_bind.hpp.
|
inline |
Definition at line 24 of file Mesh_bind.hpp.
|
inline |
Definition at line 13 of file Boundary_bind.hpp.
|
inline |
|
inline |
Definition at line 34 of file AdjPairTracked_bind.hpp.
|
inline |
Definition at line 32 of file Mesh_bind.hpp.
|
inline |
|
inline |
|
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).
| mesh | Fresh UnstructuredMesh (constructed with mpi, dim). |
| reader | UnstructuredMeshSerialRW bound to mesh. |
| meshFile | Path to the CGNS file. |
| partOpts | Metis partition options. |
| periodicTol | Tolerance for periodic boundary deduplication. |
| elevation | 0 = none, 1 = O1->O2. |
| bisect | Number of bisection passes (0..4). |
| nameMapper | Optional 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.
|
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.
|
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.
|
inline |
|
inline |
|
inline |
Definition at line 282 of file SerialAdjReordering.hpp.
|
inline |
check overflow!
Definition at line 105 of file SerialAdjReordering.hpp.
| 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:
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.
| full_mat_begin | Iterator 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_elem | Total 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.
Definition at line 183 of file Geometric.hpp.
|
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.
|
inline |
| 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.
|
inline |
| const t_index DNDS::Geom::invalid_index = INT32_MAX |
Definition at line 7 of file Geometric.hpp.