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

#include <MeshConnectivity.hpp>

Collaboration diagram for DNDS::Geom::CompiledGhostTree:
[legend]

Public Member Functions

std::unordered_set< AdjKind, AdjKindHashrequiredAdjs () const
 Collect all distinct AdjKind values used by any hop in the tree.
 
std::vector< AdjKindcheckAvailable (const MeshConnectivity &dag) const
 
std::unordered_set< EntityKindcollectedKinds () const
 Collect all EntityKind values that appear at COLLECT nodes.
 
std::string dump () const
 Pretty-print the tree (for diagnostics).
 

Static Public Member Functions

static CompiledGhostTree compile (const GhostSpec &spec)
 

Public Attributes

std::vector< GhostTreeNoderoots
 
int maxLevel {0}
 Maximum BFS depth across all nodes.
 
int totalNodes {0}
 Total number of nodes (for flat array sizing).
 
std::vector< std::vector< LevelEntry > > levels
 

Detailed Description

Compiled forest of ghost traversal chains.

Multiple chains sharing common prefixes are merged into a trie to avoid redundant traversals. The tree is evaluated BFS level-by-level with pull barriers between levels.

After compilation, levels[L] contains all tree nodes at BFS depth L, with parent references for efficient evaluation (no recursive scans).

Definition at line 277 of file MeshConnectivity.hpp.

Member Function Documentation

◆ checkAvailable()

std::vector< AdjKind > DNDS::Geom::CompiledGhostTree::checkAvailable ( const MeshConnectivity dag) const

Pre-check that all required adjacencies exist in the DAG. Returns the set of missing AdjKind values (empty = all available).

Definition at line 206 of file MeshConnectivity_Ghost.cpp.

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

◆ collectedKinds()

std::unordered_set< EntityKind > DNDS::Geom::CompiledGhostTree::collectedKinds ( ) const

Collect all EntityKind values that appear at COLLECT nodes.

Definition at line 229 of file MeshConnectivity_Ghost.cpp.

◆ compile()

CompiledGhostTree DNDS::Geom::CompiledGhostTree::compile ( const GhostSpec spec)
static

Compile a GhostSpec into a forest. Validates chain consistency. Assigns node IDs, builds per-level lists. Throws std::runtime_error on invalid chains.

Definition at line 120 of file MeshConnectivity_Ghost.cpp.

Here is the caller graph for this function:

◆ dump()

std::string DNDS::Geom::CompiledGhostTree::dump ( ) const

Pretty-print the tree (for diagnostics).

Definition at line 259 of file MeshConnectivity_Ghost.cpp.

◆ requiredAdjs()

std::unordered_set< AdjKind, AdjKindHash > DNDS::Geom::CompiledGhostTree::requiredAdjs ( ) const

Collect all distinct AdjKind values used by any hop in the tree.

Definition at line 198 of file MeshConnectivity_Ghost.cpp.

Member Data Documentation

◆ levels

std::vector<std::vector<LevelEntry> > DNDS::Geom::CompiledGhostTree::levels

Precomputed per-level node lists. levels[L] contains all tree nodes at BFS depth L. Level 0 = roots.

Definition at line 285 of file MeshConnectivity.hpp.

◆ maxLevel

int DNDS::Geom::CompiledGhostTree::maxLevel {0}

Maximum BFS depth across all nodes.

Definition at line 280 of file MeshConnectivity.hpp.

◆ roots

std::vector<GhostTreeNode> DNDS::Geom::CompiledGhostTree::roots

Definition at line 279 of file MeshConnectivity.hpp.

◆ totalNodes

int DNDS::Geom::CompiledGhostTree::totalNodes {0}

Total number of nodes (for flat array sizing).

Definition at line 281 of file MeshConnectivity.hpp.


The documentation for this struct was generated from the following files: