SAMRAI::hier::LayerNode< DIM > Class Template Reference

Encapsulates the node on a DLBG. More...

#include <source/hierarchy/dlbg/LayerNode.h>

List of all members.

Support for message passing

void putToIntBuffer (int *buffer) const
 Put self into a int buffer.
void getFromIntBuffer (const int *buffer)
 Set self according to data in int buffer.
static int commBufferSize ()
 Give number of ints required in message passing buffer.

Public Types

typedef int LocalIndex

Public Member Functions

 LayerNode ()
 Constructor.
 LayerNode (const hier::Box< DIM > &box, const LocalIndex index=-1, const int owner_rank=-1)
 Constructor.
virtual ~LayerNode (void)
 Destructor.
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.
bool operator!= (const LayerNode &r) const
 Inequality operator.
bool operator< (const LayerNode &r) const
 Less-than operator.
bool operator> (const LayerNode &r) const
 Greater-than operator.
bool operator<= (const LayerNode &r) const
 Less-than-or-equal-to operator.
bool operator>= (const LayerNode &r) const
 Greater-thanor-equal-to operator.

Friends

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


Detailed Description

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

Encapsulates the node on a DLBG.

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

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


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::LayerNode< DIM >::LayerNode (  )  [inline]

Constructor.

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

Constructor.

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

Destructor.

Deallocate internal data.


Member Function Documentation

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

template<int DIM>
int SAMRAI::hier::LayerNode< DIM >::getLocalIndex (  )  const [inline]

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

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

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

Equality operator.

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.

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

Inequality operator.

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

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

Less-than operator.

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

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

Greater-than operator.

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

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

Less-than-or-equal-to operator.

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

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

Greater-thanor-equal-to operator.

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

template<int DIM>
int SAMRAI::hier::LayerNode< DIM >::commBufferSize (  )  [inline, static]

Give number of ints required in message passing buffer.

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

See also:
putToIntBuffer(), getFromIntBuffer().

template<int DIM>
void SAMRAI::hier::LayerNode< DIM >::putToIntBuffer ( int *  buffer  )  const [inline]

Put self into a int buffer.

Number of ints written is given by communicationSize().

template<int DIM>
void SAMRAI::hier::LayerNode< DIM >::getFromIntBuffer ( const int *  buffer  )  [inline]

Set self according to data in int buffer.

Number of ints read is given by communicationSize().


Friends And Related Function Documentation

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


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:28 2009 for SAMRAI by  doxygen 1.5.1