SAMRAI::mesh::SpatialKey Class Reference

#include <source/mesh/load_balance/SpatialKey.h>

List of all members.

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 ()
SpatialKeyoperator= (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)


Detailed Description

Class SpatialKey provides a mapping from coordinates in an abstract index space to a key that can be used to order the the points with a Morton-type space filling curve (See Gutman, Dr Dobb's Journal, July 1999, pg 115-21 for an introduction). This curve orders a set of points in space so that points near each other in space are likely, but not guaranteed, to be near each other in the ordering.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Friends And Related Function Documentation

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).


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