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

#include <ReorderPlan.hpp>

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

Public Member Functions

void apply (ReorderRegistry &registry, const MPIInfo &mpi) const
 
template<class TPair >
void remapEntries (TPair &pair, EntityKind targetKind) const
 Remap entries of an adjacency array whose target kind is targetKind.
 
template<class TPair >
void relocateRows (TPair &pair, EntityKind sourceKind, const MPIInfo &mpi) const
 Relocate rows of an array pair whose source kind is sourceKind.
 

Static Public Member Functions

static ReorderPlan build (const ReorderInput &input, const ReorderRegistry &registry, const MPIInfo &mpi)
 

Public Attributes

std::unordered_map< EntityKind, PermutationTransfertransfers
 Per reordered entity kind: the computed transfer.
 
std::unordered_map< EntityKind, PermutationTransfer::LookupResultlookups
 Per reordered entity kind: the old->new global lookup.
 
std::unordered_set< EntityKindreorderedKinds
 Set of entity kinds being reordered.
 
bool isLocalOnly {false}
 Whether all transfers are local-only (collective agreement).
 

Detailed Description

Standalone plan object containing all computed PermutationTransfers and LookupResults for a set of entity kinds.

After construction (via build), this object has no dependency on UnstructuredMesh. It can apply to any ReorderRegistry.

Definition at line 189 of file ReorderPlan.hpp.

Member Function Documentation

◆ apply()

void DNDS::Geom::ReorderPlan::apply ( ReorderRegistry registry,
const MPIInfo mpi 
) const

Apply the plan to all entries in a registry.

Phase 1: REMAP all adj entries (target kind's lookup). Phase 2: RELOCATE all adj rows (source kind's transfer). Phase 3: RELOCATE all companions of reordered kinds.

Warning
Collective (when !isLocalOnly).

Definition at line 169 of file Mesh_Reorder.cpp.

Here is the call graph for this function:

◆ build()

ReorderPlan DNDS::Geom::ReorderPlan::build ( const ReorderInput input,
const ReorderRegistry registry,
const MPIInfo mpi 
)
static

Build a ReorderPlan from input + registry + MPI.

Steps:

  1. Compute follow maps (ghost-pull leader targetRanks, min-rank rule).
  2. Build PermutationTransfer per entity kind.
  3. Collect pull sets per entity kind from registry adj entries.
  4. Build lookups (ghost-pullable old->new global).
Warning
Collective.

Definition at line 101 of file Mesh_Reorder.cpp.

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

◆ relocateRows()

template<class TPair >
void DNDS::Geom::ReorderPlan::relocateRows ( TPair &  pair,
EntityKind  sourceKind,
const MPIInfo mpi 
) const
inline

Relocate rows of an array pair whose source kind is sourceKind.

Definition at line 258 of file ReorderPlan.hpp.

◆ remapEntries()

template<class TPair >
void DNDS::Geom::ReorderPlan::remapEntries ( TPair &  pair,
EntityKind  targetKind 
) const
inline

Remap entries of an adjacency array whose target kind is targetKind.

Definition at line 240 of file ReorderPlan.hpp.

Member Data Documentation

◆ isLocalOnly

bool DNDS::Geom::ReorderPlan::isLocalOnly {false}

Whether all transfers are local-only (collective agreement).

Definition at line 201 of file ReorderPlan.hpp.

◆ lookups

std::unordered_map<EntityKind, PermutationTransfer::LookupResult> DNDS::Geom::ReorderPlan::lookups

Per reordered entity kind: the old->new global lookup.

Definition at line 195 of file ReorderPlan.hpp.

◆ reorderedKinds

std::unordered_set<EntityKind> DNDS::Geom::ReorderPlan::reorderedKinds

Set of entity kinds being reordered.

Definition at line 198 of file ReorderPlan.hpp.

◆ transfers

std::unordered_map<EntityKind, PermutationTransfer> DNDS::Geom::ReorderPlan::transfers

Per reordered entity kind: the computed transfer.

Definition at line 192 of file ReorderPlan.hpp.


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