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

Class ParallelMap is a utility class for associating integer keys with arbitrary data items in parallel. More...

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

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

Public Member Functions

 ParallelMap ()=default
 Default constructor.
 
 ParallelMap (const ParallelMap &from)=default
 Copy constructor. More...
 
virtual ~ParallelMap ()=default
 Destructor.
 
ParallelMapoperator= (const ParallelMap &that)
 Assignment operator. More...
 
void addItem (int key, SAMRAI::tbox::Pointer< Streamable > item)
 Add an item with the specified key to the map. More...
 
void removeItem (int key)
 Remove an item from the map. More...
 
void communicateData ()
 Communicate data to (re-)initialize the map.
 
const std::map< int, SAMRAI::tbox::Pointer< Streamable > > & getMap () const
 Return a const reference to the map.
 

Detailed Description

Class ParallelMap is a utility class for associating integer keys with arbitrary data items in parallel.

Constructor & Destructor Documentation

◆ ParallelMap()

IBTK::ParallelMap::ParallelMap ( const ParallelMap from)
default

Copy constructor.

Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ addItem()

void IBTK::ParallelMap::addItem ( int  key,
SAMRAI::tbox::Pointer< Streamable item 
)

Add an item with the specified key to the 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 ParallelMap::communicateData() to finalize all parallel communication.
The underling map data structure is not updated until the collective method communicateData() is called, even for serial runs.

◆ operator=()

ParallelMap & IBTK::ParallelMap::operator= ( const ParallelMap that)

Assignment operator.

Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ removeItem()

void IBTK::ParallelMap::removeItem ( int  key)

Remove an item from the 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 ParallelMap::communicateData() to finalize all parallel communication.
The underling map data structure is not updated until the collective method communicateData() is called, even for serial runs.

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