IBAMR  IBAMR version 0.19.
Public Member Functions | Private Attributes | List of all members
IBTK::ParallelMap Class Reference

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

#include <ibtk/ParallelMap.h>

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

Public Member Functions

 ParallelMap ()=default
 Default constructor. More...
 
 ParallelMap (const ParallelMap &from)=default
 Copy constructor. More...
 
virtual ~ParallelMap ()=default
 Destructor. More...
 
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. More...
 
const std::map< int, SAMRAI::tbox::Pointer< Streamable > > & getMap () const
 Return a const reference to the map. More...
 

Private Attributes

std::map< int, SAMRAI::tbox::Pointer< Streamable > > d_map
 
std::map< int, SAMRAI::tbox::Pointer< Streamable > > d_pending_additions
 
std::vector< intd_pending_removals
 

Constructor & Destructor Documentation

◆ ParallelMap() [1/2]

IBTK::ParallelMap::ParallelMap ( )
default

◆ ParallelMap() [2/2]

IBTK::ParallelMap::ParallelMap ( const ParallelMap from)
default
Parameters
fromThe value to copy to this object.

◆ ~ParallelMap()

virtual IBTK::ParallelMap::~ParallelMap ( )
virtualdefault

Member Function Documentation

◆ operator=()

ParallelMap& IBTK::ParallelMap::operator= ( const ParallelMap that)
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ addItem()

void IBTK::ParallelMap::addItem ( int  key,
SAMRAI::tbox::Pointer< Streamable item 
)
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.

◆ removeItem()

void IBTK::ParallelMap::removeItem ( int  key)
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.

◆ communicateData()

void IBTK::ParallelMap::communicateData ( )

◆ getMap()

const std::map<int, SAMRAI::tbox::Pointer<Streamable> >& IBTK::ParallelMap::getMap ( ) const

Member Data Documentation

◆ d_map

std::map<int, SAMRAI::tbox::Pointer<Streamable> > IBTK::ParallelMap::d_map
private

◆ d_pending_additions

std::map<int, SAMRAI::tbox::Pointer<Streamable> > IBTK::ParallelMap::d_pending_additions
private

◆ d_pending_removals

std::vector<int> IBTK::ParallelMap::d_pending_removals
private

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