IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBTK::ParallelEdgeMap Class Reference

Class ParallelEdgeMap is a utility class for managing edge maps (i.e., maps from vertices to links between vertices) in parallel. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/ParallelEdgeMap.h>

Inheritance diagram for IBTK::ParallelEdgeMap:
Inheritance graph
[legend]

Public Member Functions

 ParallelEdgeMap ()=default
 Default constructor.
 
virtual ~ParallelEdgeMap ()=default
 Destructor.
 
int addEdge (const std::pair< int, int > &link, int mastr_idx=invalid_index)
 Add an edge to the edge map. More...
 
void removeEdge (const std::pair< int, int > &link, int mastr_idx=invalid_index)
 Remove an edge from the edge map. More...
 
void communicateData ()
 Communicate data to (re-)initialize the edge map.
 
const std::multimap< int, std::pair< int, int > > & getEdgeMap () const
 Return a const reference to the edge map.
 

Detailed Description

Class ParallelEdgeMap is a utility class for managing edge maps (i.e., maps from vertices to links between vertices) in parallel.

Member Function Documentation

◆ addEdge()

int IBTK::ParallelEdgeMap::addEdge ( const std::pair< int, int > &  link,
int  mastr_idx = invalid_index 
)

Add an edge to the edge map.

Returns
The master node index to be associated with the edge in the edge map.
Note
This method is not collective (i.e., it does not have to be called by all MPI tasks); however, it is necessary to call the collective function ParallelEdgeMap::communicateData() to finalize all parallel communication.
By default, the master index associated with each edge is the vertex with minimum index in the link.

◆ removeEdge()

void IBTK::ParallelEdgeMap::removeEdge ( const std::pair< int, int > &  link,
int  mastr_idx = invalid_index 
)

Remove an edge from the edge map.

Note
This method is not collective (i.e., it does not have to be called by all MPI tasks); however, it is necessary to call the collective function ParallelEdgeMap::communicateData() to finalize all parallel communication.
The master index argument is optional and is only used as a hint to attempt to find the link in the link table.

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