DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Geom Namespace Reference

Namespaces

namespace  Base
 
namespace  Elem
 
namespace  OpenFOAM
 
namespace  RBF
 

Classes

class  ArrayNodePeriodicBits
 
class  BCName_2_ID
 
struct  CoordPairDOF
 
struct  ElemInfo
 
struct  NodeIndexPBI
 
struct  NodePeriodicBits
 
class  NodePeriodicBitsRow
 
class  Octree
 
class  OffsetIterator
 
class  OffsetRange
 
struct  PartitionOptions
 
struct  Periodicity
 
struct  PointCloudFunctional
 
struct  PointCloudKDTree
 
struct  PointCloudKDTreeCoordPair
 
struct  SmallCoordsAsVector
 
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 > >
 
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 > >
 

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 }
 

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)
 
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< 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)
 

Variables

const t_index invalid_index = INT32_MAX
 

Typedef Documentation

◆ 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 174 of file PeriodicInfo.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 815 of file Mesh.hpp.

◆ tFDataFieldQuery

Definition at line 816 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 343 of file Mesh.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_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

◆ 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 24 of file Mesh.hpp.

◆ MeshReaderMode

Enumerator
UnknownMode 
SerialReadAndDistribute 
SerialOutput 

Definition at line 818 of file Mesh.hpp.

Function Documentation

◆ __getCGNSTypeFromElemType()

constexpr ElementType_t DNDS::Geom::__getCGNSTypeFromElemType ( Elem::ElemType  et)
inlineconstexpr

Definition at line 48 of file CGNS.hpp.

Here is the caller graph for this function:

◆ __getElemTypeFromCGNSType()

constexpr Elem::ElemType DNDS::Geom::__getElemTypeFromCGNSType ( ElementType_t  cgns_et)
inlineconstexpr

Definition at line 12 of file CGNS.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:

◆ 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:

◆ 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 30 of file SerialAdjReordering.hpp.

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 71 of file Mesh.cpp.

Here is the call graph for this function:

◆ 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_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 186 of file Mesh_bind.hpp.

Here is the call 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 151 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 176 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 279 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 103 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:

◆ 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:

◆ 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.