|
| 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 > > |
| |
| using | tIndexMapFunc = std::function< index(index)> |
| |
| 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)> |
| |
| template<rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign> |
| using | ArrayNodePeriodicBitsPair = ArrayPair< ArrayNodePeriodicBits< _row_size, _row_max, _align > > |
| |
|
| 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) |
| |
| 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) |
| |
| 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) |
| |
| bool | isCollaborativeNodePeriodicBits (const std::vector< NodePeriodicBits > &a, const std::vector< NodePeriodicBits > &b) |
| |
| 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) |
| |
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 71 of file Mesh.cpp.
| 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:
- Metis and the partition-adjacency builder require a self-contained local graph; cross-sub-graph edges must be excluded from these operations.
- 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_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.