#include <source/mesh/load_balance/SpatialKey.h>
Public Member Functions | |
SpatialKey () | |
SpatialKey (const unsigned int i, const unsigned int j=0, const unsigned int k=0, const unsigned int level_num=0) | |
SpatialKey (const SpatialKey &spatial_key) | |
~SpatialKey () | |
SpatialKey & | operator= (const SpatialKey &spatial_key) |
bool | operator== (const SpatialKey &spatial_key) const |
bool | operator!= (const SpatialKey &spatial_key) const |
bool | operator< (const SpatialKey &spatial_key) const |
bool | operator<= (const SpatialKey &spatial_key) const |
bool | operator> (const SpatialKey &spatial_key) const |
bool | operator>= (const SpatialKey &spatial_key) const |
void | setToZero () |
void | setKey (const unsigned int i=0, const unsigned int j=0, const unsigned int k=0, const unsigned int level_num=0) |
Friends | |
std::ostream & | operator<< (std::ostream &s, const SpatialKey &spatial_key) |
SAMRAI::mesh::SpatialKey::SpatialKey | ( | ) |
The default constructor creates a spatial key with zero value.
SAMRAI::mesh::SpatialKey::SpatialKey | ( | const unsigned int | i, | |
const unsigned int | j = 0 , |
|||
const unsigned int | k = 0 , |
|||
const unsigned int | level_num = 0 | |||
) |
Create a spatial key from given index space coordinates and level number.
SAMRAI::mesh::SpatialKey::SpatialKey | ( | const SpatialKey & | spatial_key | ) |
Copy constructor for spatial key.
SAMRAI::mesh::SpatialKey::~SpatialKey | ( | ) |
The destructor for a spatial key does nothing interesting.
SpatialKey & SAMRAI::mesh::SpatialKey::operator= | ( | const SpatialKey & | spatial_key | ) | [inline] |
Assignment operator for spatial key.
bool SAMRAI::mesh::SpatialKey::operator== | ( | const SpatialKey & | spatial_key | ) | const [inline] |
Return true if argument key is equal to this key. Otherwise, return false.
bool SAMRAI::mesh::SpatialKey::operator!= | ( | const SpatialKey & | spatial_key | ) | const [inline] |
Return true if argument key is not equal to this key. Otherwise, return false.
bool SAMRAI::mesh::SpatialKey::operator< | ( | const SpatialKey & | spatial_key | ) | const |
Return true if this key is less than argument key. Otherwise, return false.
bool SAMRAI::mesh::SpatialKey::operator<= | ( | const SpatialKey & | spatial_key | ) | const |
Return true if this key is less than or equal to argument key. Otherwise, return false.
bool SAMRAI::mesh::SpatialKey::operator> | ( | const SpatialKey & | spatial_key | ) | const |
Return true if this key is greater than argument key. Otherwise, return false.
bool SAMRAI::mesh::SpatialKey::operator>= | ( | const SpatialKey & | spatial_key | ) | const |
Return true if this key is greater than or equal to argument key. Otherwise, return false.
void SAMRAI::mesh::SpatialKey::setToZero | ( | ) | [inline] |
Set this key to zero key.
void SAMRAI::mesh::SpatialKey::setKey | ( | const unsigned int | i = 0 , |
|
const unsigned int | j = 0 , |
|||
const unsigned int | k = 0 , |
|||
const unsigned int | level_num = 0 | |||
) |
Set this key from the index space coordinates and the level number.
The values of i, j, and k default to 0 to handle cases where the number of dimensions in the problem is not 3. The default value of level_num is also 0.
std::ostream& operator<< | ( | std::ostream & | s, | |
const SpatialKey & | spatial_key | |||
) | [friend] |
Write a spatial key to an output stream. The spatial key is output in hex to avoid the binary to decimal conversion of the key.
Note that the proper functioning of this method depends on having 32 bits per integer (more specifically, 8 hex characters per integer).