|
IBAMR
IBAMR version 0.19.
|
#include <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) |
Private Member Functions | |
| void | blendOneCoord (const unsigned int coord, const int coord_offset) |
Private Attributes | |
| int | d_bits_per_int |
| unsigned int | d_key [NUM_COORDS_MIXED_FOR_SPATIAL_KEY] |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const SpatialKey &spatial_key) |
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.
| 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 | ) |
Assignment operator for spatial key.
| bool SAMRAI::mesh::SpatialKey::operator== | ( | const SpatialKey & | spatial_key | ) | const |
Return true if argument key is equal to this key. Otherwise, return false.
| bool SAMRAI::mesh::SpatialKey::operator!= | ( | const SpatialKey & | spatial_key | ) | const |
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 | ( | ) |
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.
|
private |
|
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).
|
private |
|
private |
1.8.17