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

Class ParallelSet is a utility class for storing collections of integer keys in parallel.

#include <ibtk/ParallelSet.h>

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

Public Member Functions

 ParallelSet ()=default
 Default constructor. More...
 
 ParallelSet (const ParallelSet &from)=default
 Copy constructor. More...
 
virtual ~ParallelSet ()=default
 Destructor. More...
 
ParallelSetoperator= (const ParallelSet &that)
 Assignment operator. More...
 
void addItem (int key)
 Add an item with the specified key to the set. More...
 
void removeItem (int key)
 Remove an item from the set. More...
 
void communicateData ()
 Communicate data to (re-)initialize the set. More...
 
const std::set< int > & getSet () const
 Return a const reference to the set. More...
 

Private Attributes

std::set< intd_set
 
std::vector< intd_pending_additions
 
std::vector< intd_pending_removals
 

Constructor & Destructor Documentation

◆ ParallelSet() [1/2]

IBTK::ParallelSet::ParallelSet ( )
default

◆ ParallelSet() [2/2]

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

◆ ~ParallelSet()

virtual IBTK::ParallelSet::~ParallelSet ( )
virtualdefault

Member Function Documentation

◆ operator=()

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

◆ addItem()

void IBTK::ParallelSet::addItem ( 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 ParallelSet::communicateData() to finalize all parallel communication.
The underling set data structure is not updated until the collective method communicateData() is called, even for serial runs.

◆ removeItem()

void IBTK::ParallelSet::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 ParallelSet::communicateData() to finalize all parallel communication.
The underling set data structure is not updated until the collective method communicateData() is called, even for serial runs.

◆ communicateData()

void IBTK::ParallelSet::communicateData ( )

◆ getSet()

const std::set<int>& IBTK::ParallelSet::getSet ( ) const

Member Data Documentation

◆ d_set

std::set<int> IBTK::ParallelSet::d_set
private

◆ d_pending_additions

std::vector<int> IBTK::ParallelSet::d_pending_additions
private

◆ d_pending_removals

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

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