FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Global::FloodFill Class Reference

Distributed flood fill. More...

#include <flood_fill.hpp>

Static Public Member Functions

static Adjacency::Graph run (const std::vector< Index > &first_node_of_rank, const Adjacency::Graph &graph, Dist::Comm &comm)
 Distributed flood fill. More...
 

Static Private Member Functions

static std::vector< Index > exchange_nodes (Dist::Comm &comm, const std::vector< int > &ranks, const std::vector< Index > &nodes)
 alltoallv for exchanging nodes that have been visited in the last flood fill iteration More...
 
static int get_rank_of_node (const std::vector< Index > &first_of_rank, Index node)
 

Detailed Description

Distributed flood fill.

Definition at line 20 of file flood_fill.hpp.

Member Function Documentation

◆ exchange_nodes()

static std::vector< Index > FEAT::Global::FloodFill::exchange_nodes ( Dist::Comm &  comm,
const std::vector< int > &  ranks,
const std::vector< Index > &  nodes 
)
inlinestaticprivate

alltoallv for exchanging nodes that have been visited in the last flood fill iteration

Definition at line 217 of file flood_fill.hpp.

References FEAT::Dist::Comm::alltoall(), FEAT::Dist::Comm::alltoallv(), and FEAT::Dist::Comm::size().

Referenced by run().

◆ get_rank_of_node()

static int FEAT::Global::FloodFill::get_rank_of_node ( const std::vector< Index > &  first_of_rank,
Index  node 
)
inlinestaticprivate

Definition at line 264 of file flood_fill.hpp.

◆ run()

static Adjacency::Graph FEAT::Global::FloodFill::run ( const std::vector< Index > &  first_node_of_rank,
const Adjacency::Graph &  graph,
Dist::Comm &  comm 
)
inlinestatic

Distributed flood fill.

Parameters
[in]first_node_of_rankVector that contains the first node of each rank
[in]graphSubgraph of current rank
[in]commCommunicator that graph is distributed over
Returns
A Colors x Nodes graph which assigns a color to each local node of the input graph
Note
This method assumes that the input graph on rank i contains all nodes from first_node_on_rank[i] to first_node_on_rank[i + 1] - 1.

Definition at line 36 of file flood_fill.hpp.

References FEAT::Dist::Comm::allreduce(), exchange_nodes(), FEAT::Adjacency::Graph::get_domain_ptr(), FEAT::Adjacency::Graph::get_image_idx(), FEAT::Dist::op_min, and FEAT::Dist::Comm::rank().


The documentation for this class was generated from the following file: