IBAMR  IBAMR version 0.19.
Public Types | Public Member Functions | List of all members
SAMRAI::hier::LayerNode< DIM > Class Template Reference

Encapsulates the node on a DLBG. More...

#include <LayerNode.h>

Public Types

typedef int LocalIndex
 

Public Member Functions

 LayerNode ()
 Constructor. More...
 
 LayerNode (const hier::Box< DIM > &box, const LocalIndex index=-1, const int owner_rank=-1)
 Constructor. More...
 
virtual ~LayerNode (void)
 Destructor. More...
 
int getOwnerRank () const
 
LocalIndex getLocalIndex () const
 
hier::Box< DIM > & getBox ()
 
const hier::Box< DIM > & getBox () const
 
Comparison operators
bool operator== (const LayerNode &r) const
 Equality operator. More...
 
bool operator!= (const LayerNode &r) const
 Inequality operator. More...
 
bool operator< (const LayerNode &r) const
 Less-than operator. More...
 
bool operator> (const LayerNode &r) const
 Greater-than operator. More...
 
bool operator<= (const LayerNode &r) const
 Less-than-or-equal-to operator. More...
 
bool operator>= (const LayerNode &r) const
 Greater-thanor-equal-to operator. More...
 

Support for message passing

int d_owner_rank
 Rank of owner of this node. More...
 
LocalIndex d_local_index
 Local index on the owner process. More...
 
Box< DIM > d_box
 
void putToIntBuffer (int *buffer) const
 Put self into a int buffer. More...
 
void getFromIntBuffer (const int *buffer)
 Set self according to data in int buffer. More...
 
static int commBufferSize ()
 Give number of ints required in message passing buffer. More...
 
template<int D>
std::ostream & operator<< (std::ostream &co, const LayerNode< D > &r)
 

Detailed Description

template<int DIM>
class SAMRAI::hier::LayerNode< DIM >

A DLBG node is basically a box with a specific owner process and an index on that process.

Comparison operators are implemented for sorting nodes and instantiating (STL) sets of LayerNode's. The owners and local indices are used for all comparisons The owners ranks are compared first, followed by the local indices. Less-than and greater-than comparisons are primarily used for sorting nodes.

Member Typedef Documentation

◆ LocalIndex

template<int DIM>
typedef int SAMRAI::hier::LayerNode< DIM >::LocalIndex

Constructor & Destructor Documentation

◆ LayerNode() [1/2]

template<int DIM>
SAMRAI::hier::LayerNode< DIM >::LayerNode ( )

◆ LayerNode() [2/2]

template<int DIM>
SAMRAI::hier::LayerNode< DIM >::LayerNode ( const hier::Box< DIM > &  box,
const LocalIndex  index = -1,
const int  owner_rank = -1 
)

◆ ~LayerNode()

template<int DIM>
virtual SAMRAI::hier::LayerNode< DIM >::~LayerNode ( void  )
virtual

Deallocate internal data.

Member Function Documentation

◆ getOwnerRank()

template<int DIM>
int SAMRAI::hier::LayerNode< DIM >::getOwnerRank ( ) const

◆ getLocalIndex()

template<int DIM>
LocalIndex SAMRAI::hier::LayerNode< DIM >::getLocalIndex ( ) const

◆ getBox() [1/2]

template<int DIM>
hier::Box<DIM>& SAMRAI::hier::LayerNode< DIM >::getBox ( )

◆ getBox() [2/2]

template<int DIM>
const hier::Box<DIM>& SAMRAI::hier::LayerNode< DIM >::getBox ( ) const

◆ operator==()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator== ( const LayerNode< DIM > &  r) const

For the equality operator, The box should be the same if data is consistent. If debug is turned on and the boxes do not match while the owners and indices match, then an unrecoverable exception is thrown.

◆ operator!=()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator!= ( const LayerNode< DIM > &  r) const

See note on comparison for operator==(const LayerNode&);

◆ operator<()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator< ( const LayerNode< DIM > &  r) const

See note on comparison for operator==(const LayerNode&);

◆ operator>()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator> ( const LayerNode< DIM > &  r) const

See note on comparison for operator==(const LayerNode&);

◆ operator<=()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator<= ( const LayerNode< DIM > &  r) const

See note on comparison for operator==(const LayerNode&);

◆ operator>=()

template<int DIM>
bool SAMRAI::hier::LayerNode< DIM >::operator>= ( const LayerNode< DIM > &  r) const

See note on comparison for operator==(const LayerNode&);

◆ commBufferSize()

template<int DIM>
static int SAMRAI::hier::LayerNode< DIM >::commBufferSize ( )
static

This number is independent of instance (but dependent on dimension).

See also
putToIntBuffer(), getFromIntBuffer().

◆ putToIntBuffer()

template<int DIM>
void SAMRAI::hier::LayerNode< DIM >::putToIntBuffer ( int buffer) const

Number of ints written is given by communicationSize().

◆ getFromIntBuffer()

template<int DIM>
void SAMRAI::hier::LayerNode< DIM >::getFromIntBuffer ( const int buffer)

Number of ints read is given by communicationSize().

Friends And Related Function Documentation

◆ operator<<

template<int DIM>
template<int D>
std::ostream& operator<< ( std::ostream &  co,
const LayerNode< D > &  r 
)
friend

Member Data Documentation

◆ d_owner_rank

template<int DIM>
int SAMRAI::hier::LayerNode< DIM >::d_owner_rank
private

The DLBG is inherently distributed, so a node always has an owner. One thing that requires the owner be a state variable is that neighbor containers do not explicitly keep track of the owners of the neighbor nodes.

◆ d_local_index

template<int DIM>
LocalIndex SAMRAI::hier::LayerNode< DIM >::d_local_index
private

The node may be referenced on processes that do not own it. For example, a process that owns the node's neighbor needs to reference the node. When communicating with the owner about the node, other processes need to state the local index of the node so the owner knows what node is being talked about.

◆ d_box

template<int DIM>
Box<DIM> SAMRAI::hier::LayerNode< DIM >::d_box
private

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