Implementation of Peano-Hilbert space-filling curve. More...
#include <PeanoHilbert.h>
Public Member Functions | |
PeanoHilbert () | |
Default Constructor. | |
PeanoHilbert (const int dim, const int levs) | |
Other Constructors. | |
PeanoHilbert (PeanoHilbert const &other) | |
The copy constructor. | |
void | SetIndex (const int index, const int idxlev) |
void | SetIndex (const int index, const int idxlev, const int nlev) |
void | Map (const int *coords) |
Generates the sfcIndex corresponding to "c". | |
void | Invert (int *coords, const int index) |
Generates the sfcdim coordinate values corresponding to "index". | |
void | Invert (int *coords, const int index, const int idxlev) |
Generates the sfcdim coordinate values corresponding to index "index" at level "idxlevel". | |
void | Invert (int *coords, const int index, const int idxlev, const int nlev) |
Generates the sfcdim coordinate values corresponding to "index" at "idxlevel"and for "nlev levels. | |
PeanoHilbert * | GetBox (const int lev, const int nlev) const |
Get the bounding box for the GridUnit whose base is maintained by "this" This routine is used to get the bounding box of the GridUnit whose baseindex is maintained by this. | |
void | SetBox (const int lev, const int nlev) |
PeanoHilbert * | GetMax (const int lev, const int nlev) const |
Get the maximum index in the GridUnit whose base is maintained by "this". | |
void | SetMax (const int lev, const int nlev) |
void | ResetBase (const int lev, const int nlev) |
Set the index to the baseindex at that level. | |
void | GetCoords (int *coords, const int lev=1) const |
Returns a copy of the coordinates in "c" at level "lev" of refinement. | |
int * | GetCoords (const int lev=1) const |
int | GetCardinality (const int dim, const int lev) const |
number of cells at a level | |
int | GetCardinality (const int lev) const |
int | GetDimCardinality (const int lev) const |
essentially the step size at a level | |
int | GetDimMax (const int lev) const |
max value of an index along a dimension |
Implementation of Peano-Hilbert space-filling curve.
Class PeanoHilbert defines the Peano-Hilbert sfc mapping. This class is derived from sfcIndex and defines mapping and inverse mapping routines.
PeanoHilbert::PeanoHilbert | ( | const int | dim, | |
const int | levs | |||
) | [inline] |
Other Constructors.
PeanoHilbert::PeanoHilbert | ( | PeanoHilbert const & | other | ) | [inline] |
The copy constructor.
PeanoHilbert * PeanoHilbert::GetBox | ( | const int | lev, | |
const int | nlev | |||
) | const |
Get the bounding box for the GridUnit whose base is maintained by "this" This routine is used to get the bounding box of the GridUnit whose baseindex is maintained by this.
References PeanoHilbert(), sfcIndex::sfcdim, sfcIndex::sfclevs, sfcIndex::sfcMaxDigit(), and sfcIndex::sfcSetDigit().
int PeanoHilbert::GetCardinality | ( | const int | lev | ) | const [inline] |
References sfcIndex::sfcdim.
int PeanoHilbert::GetCardinality | ( | const int | dim, | |
const int | lev | |||
) | const [inline] |
number of cells at a level
int * PeanoHilbert::GetCoords | ( | const int | lev = 1 |
) | const |
References GetDimCardinality(), sfcIndex::sfcdim, and sfcIndex::sfclevs.
void PeanoHilbert::GetCoords | ( | int * | coords, | |
const int | lev = 1 | |||
) | const |
Returns a copy of the coordinates in "c" at level "lev" of refinement.
References GetDimCardinality(), sfcIndex::sfcdim, and sfcIndex::sfclevs.
int PeanoHilbert::GetDimCardinality | ( | const int | lev | ) | const [inline] |
int PeanoHilbert::GetDimMax | ( | const int | lev | ) | const [inline] |
PeanoHilbert * PeanoHilbert::GetMax | ( | const int | lev, | |
const int | nlev | |||
) | const |
Get the maximum index in the GridUnit whose base is maintained by "this".
References PeanoHilbert(), sfcIndex::sfclevs, and sfcIndex::sfcMaxDigit().
void PeanoHilbert::Invert | ( | int * | coords, | |
const int | index, | |||
const int | idxlev, | |||
const int | nlev | |||
) |
Generates the sfcdim coordinate values corresponding to "index" at "idxlevel"and for "nlev levels.
References sfcIndex::sfcSetIndex().
void PeanoHilbert::Invert | ( | int * | coords, | |
const int | index, | |||
const int | idxlev | |||
) |
Generates the sfcdim coordinate values corresponding to index "index" at level "idxlevel".
References sfcIndex::sfcSetIndex().
void PeanoHilbert::Invert | ( | int * | coords, | |
const int | index | |||
) |
Generates the sfcdim coordinate values corresponding to "index".
References sfcIndex::sfcSetIndex().
void PeanoHilbert::Map | ( | const int * | coords | ) |
Generates the sfcIndex corresponding to "c".
References GetDimMax(), sfcIndex::sfcCreateLocNum(), sfcIndex::sfcdim, sfcIndex::sfcGetDigit(), and sfcIndex::sfclevs.
void PeanoHilbert::ResetBase | ( | const int | lev, | |
const int | nlev | |||
) |
Set the index to the baseindex at that level.
References sfcIndex::sfclevs, and sfcIndex::sfcSetDigit().
void PeanoHilbert::SetBox | ( | const int | lev, | |
const int | nlev | |||
) |
void PeanoHilbert::SetIndex | ( | const int | index, | |
const int | idxlev, | |||
const int | nlev | |||
) | [inline] |
References sfcIndex::sfcSetIndex().
void PeanoHilbert::SetIndex | ( | const int | index, | |
const int | idxlev | |||
) | [inline] |
References sfcIndex::sfcSetIndex().
void PeanoHilbert::SetMax | ( | const int | lev, | |
const int | nlev | |||
) |
References sfcIndex::sfclevs, sfcIndex::sfcMaxDigit(), and sfcIndex::sfcUnsetDigit().