|
IBAMR
IBAMR version 0.19.
|
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) |
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.
| typedef int SAMRAI::hier::LayerNode< DIM >::LocalIndex |
| SAMRAI::hier::LayerNode< DIM >::LayerNode | ( | ) |
| SAMRAI::hier::LayerNode< DIM >::LayerNode | ( | const hier::Box< DIM > & | box, |
| const LocalIndex | index = -1, |
||
| const int | owner_rank = -1 |
||
| ) |
|
virtual |
Deallocate internal data.
| int SAMRAI::hier::LayerNode< DIM >::getOwnerRank | ( | ) | const |
| LocalIndex SAMRAI::hier::LayerNode< DIM >::getLocalIndex | ( | ) | const |
| hier::Box<DIM>& SAMRAI::hier::LayerNode< DIM >::getBox | ( | ) |
| const hier::Box<DIM>& SAMRAI::hier::LayerNode< DIM >::getBox | ( | ) | const |
| 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.
| bool SAMRAI::hier::LayerNode< DIM >::operator!= | ( | const LayerNode< DIM > & | r | ) | const |
See note on comparison for operator==(const LayerNode&);
| bool SAMRAI::hier::LayerNode< DIM >::operator< | ( | const LayerNode< DIM > & | r | ) | const |
See note on comparison for operator==(const LayerNode&);
| bool SAMRAI::hier::LayerNode< DIM >::operator> | ( | const LayerNode< DIM > & | r | ) | const |
See note on comparison for operator==(const LayerNode&);
| bool SAMRAI::hier::LayerNode< DIM >::operator<= | ( | const LayerNode< DIM > & | r | ) | const |
See note on comparison for operator==(const LayerNode&);
| bool SAMRAI::hier::LayerNode< DIM >::operator>= | ( | const LayerNode< DIM > & | r | ) | const |
See note on comparison for operator==(const LayerNode&);
|
static |
This number is independent of instance (but dependent on dimension).
| void SAMRAI::hier::LayerNode< DIM >::putToIntBuffer | ( | int * | buffer | ) | const |
Number of ints written is given by communicationSize().
| void SAMRAI::hier::LayerNode< DIM >::getFromIntBuffer | ( | const int * | buffer | ) |
Number of ints read is given by communicationSize().
|
friend |
|
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.
|
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.
|
private |
1.8.17