DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
MeshConnectivity.hpp File Reference

Layered DAG of mesh adjacency relations with composable DSL operations. More...

#include "DNDS/ArrayPair.hpp"
#include "DNDS/ArrayDerived/ArrayAdjacency.hpp"
#include "Mesh_DeviceView.hpp"
#include <variant>
#include <unordered_map>
#include <unordered_set>
#include "MeshConnectivity_Interpolate.hxx"
Include dependency graph for MeshConnectivity.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DNDS::Geom::AdjKind
 
struct  DNDS::Geom::AdjKindHash
 Hash for AdjKind (for use in unordered containers). More...
 
struct  DNDS::Geom::GhostChain
 
struct  DNDS::Geom::GhostSpec
 
struct  DNDS::Geom::GhostTreeNode
 One node in the compiled ghost tree. More...
 
struct  DNDS::Geom::LevelEntry
 
struct  DNDS::Geom::CompiledGhostTree
 
struct  DNDS::Geom::GhostResult
 
struct  DNDS::Geom::ConeAdj
 
struct  DNDS::Geom::SupportAdj
 
struct  DNDS::Geom::SharedCountPredicate
 
struct  DNDS::Geom::SubEntityDesc
 
struct  DNDS::Geom::SubEntityQuery
 
struct  DNDS::Geom::SubEntityQueryPbi
 
struct  DNDS::Geom::OwnershipDecision
 
struct  DNDS::Geom::InterpolateGlobalResultT< e2p_rs >
 
struct  DNDS::Geom::InterpolateResultT< p2e_rs, e2n_rs, e2p_rs >
 
struct  DNDS::Geom::InterpolateDistributedResultT< p2e_rs, e2n_rs, e2p_rs >
 
struct  DNDS::Geom::MeshConnectivity
 

Namespaces

namespace  DNDS
 the host side operators are provided as implemented
 
namespace  DNDS::Geom
 
namespace  DNDS::Geom::Adj
 Convenience constants for common adjacency kinds.
 

Typedefs

using DNDS::Geom::AdjVariant = std::variant< tAdjPair, tAdj1Pair, tAdj2Pair, tAdj3Pair, tAdj4Pair, tAdj8Pair >
 
using DNDS::Geom::OwnershipResolverMulti = std::function< OwnershipDecision(const std::vector< index > &parents, const std::vector< MPI_int > &parentRanks, index nLocalParents)>
 
using DNDS::Geom::OwnershipResolver2 = std::function< OwnershipDecision(index parentL, index parentR, index nLocalParents)>
 Legacy 2-parent ownership resolver (used by InterpolateDistributed).
 
using DNDS::Geom::InterpolateGlobalResult = InterpolateGlobalResultT<>
 Default: all fields variable-width.
 
using DNDS::Geom::InterpolateResult = InterpolateResultT<>
 Default InterpolateResult: all fields are variable-width (NonUniformSize).
 
using DNDS::Geom::InterpolateDistributedResult = InterpolateDistributedResultT<>
 Default InterpolateDistributedResult: entity2parent is fixed-2 (as before).
 

Enumerations

enum class  DNDS::Geom::EntityKind : int8_t {
  DNDS::Geom::Cell = 0 , DNDS::Geom::Face = 1 , DNDS::Geom::Edge = 2 , DNDS::Geom::Node = 3 ,
  DNDS::Geom::Bnd = 4 , DNDS::Geom::NUM_KINDS = 5
}
 

Functions

int DNDS::Geom::entityDepth (EntityKind kind, int dim)
 
const char * DNDS::Geom::entityKindName (EntityKind kind)
 String name for an EntityKind (for diagnostics).
 
std::string DNDS::Geom::adjKindName (const AdjKind &kind)
 Format an AdjKind as a diagnostic string, e.g. "Cell2Node", "Cell2Cell(Node)".
 

Variables

constexpr AdjKind DNDS::Geom::Adj::Cell2Node {EntityKind::Cell, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Cell2Face {EntityKind::Cell, EntityKind::Face}
 
constexpr AdjKind DNDS::Geom::Adj::Cell2Edge {EntityKind::Cell, EntityKind::Edge}
 
constexpr AdjKind DNDS::Geom::Adj::Face2Node {EntityKind::Face, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Face2Edge {EntityKind::Face, EntityKind::Edge}
 
constexpr AdjKind DNDS::Geom::Adj::Edge2Node {EntityKind::Edge, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Bnd2Node {EntityKind::Bnd, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Node2Cell {EntityKind::Node, EntityKind::Cell}
 
constexpr AdjKind DNDS::Geom::Adj::Node2Face {EntityKind::Node, EntityKind::Face}
 
constexpr AdjKind DNDS::Geom::Adj::Node2Edge {EntityKind::Node, EntityKind::Edge}
 
constexpr AdjKind DNDS::Geom::Adj::Node2Bnd {EntityKind::Node, EntityKind::Bnd}
 
constexpr AdjKind DNDS::Geom::Adj::Face2Cell {EntityKind::Face, EntityKind::Cell}
 
constexpr AdjKind DNDS::Geom::Adj::Edge2Face {EntityKind::Edge, EntityKind::Face}
 
constexpr AdjKind DNDS::Geom::Adj::Edge2Cell {EntityKind::Edge, EntityKind::Cell}
 
constexpr AdjKind DNDS::Geom::Adj::Bnd2Cell {EntityKind::Bnd, EntityKind::Cell}
 
constexpr AdjKind DNDS::Geom::Adj::Bnd2Face {EntityKind::Bnd, EntityKind::Face}
 
constexpr AdjKind DNDS::Geom::Adj::Face2Bnd {EntityKind::Face, EntityKind::Bnd}
 
constexpr AdjKind DNDS::Geom::Adj::Cell2Cell {EntityKind::Cell, EntityKind::Cell, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Bnd2Bnd {EntityKind::Bnd, EntityKind::Bnd, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Face2Face {EntityKind::Face, EntityKind::Face, EntityKind::Node}
 
constexpr AdjKind DNDS::Geom::Adj::Cell2CellFace {EntityKind::Cell, EntityKind::Cell, EntityKind::Face}
 

Detailed Description

Layered DAG of mesh adjacency relations with composable DSL operations.

MeshConnectivity manages adjacency (connectivity) tables between entity strata of different topological depths (cells, faces, edges, nodes). It provides three core operations:

  • Inverse: cone (A→B) → support (B→A)
  • Compose: A→B + B→C → A→C
  • ComposeFiltered: A→B + B→C → A→C with on-the-fly predicate filtering

Cone adjacencies (downward: higher→lower depth) are ordered by element topology. Support adjacencies (upward: lower→higher depth) are ordered by creation method (typically the order entities were discovered during inversion).

Periodic bits (pbi) are only stored on cones whose target depth is 0 (nodes), since pbi tracks how each node's coordinates transform under periodicity.

Definition in file MeshConnectivity.hpp.