MAIA bb96820c
Multiphysics at AIA
|
Namespaces | |
namespace | detail_ |
Functions | |
template<MInt nDim, typename FloatType , typename IdType > | |
IdType | index (const FloatType *const x, const IdType level) |
Return Hilbert index for given location and level in 2D or 3D. More... | |
template<MInt nDim, typename FloatType , typename IdType > | |
MBool | coordinatesToTreeId (IdType &treeId, const FloatType *const x, const IdType level, const FloatType *const centerOfGravity, FloatType const lengthOnLevel0) |
template<MInt nDim, typename FloatType , typename IdType > | |
void | treeIdToCoordinates (FloatType *const x, const IdType treeId, const IdType level, const FloatType *const centerOfGravity, const FloatType lengthOnLevel0) |
MBool maia::grid::hilbert::coordinatesToTreeId | ( | IdType & | treeId, |
const FloatType *const | x, | ||
const IdType | level, | ||
const FloatType *const | centerOfGravity, | ||
FloatType const | lengthOnLevel0 | ||
) |
Definition at line 188 of file hilbert.h.
IdType maia::grid::hilbert::index | ( | const FloatType *const | x, |
const IdType | level | ||
) |
nDim | Dimension for which the Hilbert index should be generated. |
FloatType | The floating point type for the coordinates. |
IdType | The integer type that should be used for the index. |
[in] | x | Pointer to nDim coordinates for which the index is calculated. The coordinates must be within the unit square (2D, [0,1]x[0,1])/unit cube (3D, [0,1]x[0,1]x[0,1]). |
[in] | level | Refinement level (not Hilbert level) for which the index should be calculated. |
The algorithms used here are taken from
Peter Philippen. Investigation of two different domain decompositioning methods for a cartesian flow solver. Studienarbeit, 2009.
The original implementation is by Peter, it was only simplified (no recursion!) and its robustness against bad input parameters increased. Also, the original implementation did not have any comments.
This is the basic idea:
Definition at line 165 of file hilbert.h.
void maia::grid::hilbert::treeIdToCoordinates | ( | FloatType *const | x, |
const IdType | treeId, | ||
const IdType | level, | ||
const FloatType *const | centerOfGravity, | ||
const FloatType | lengthOnLevel0 | ||
) |
Definition at line 232 of file hilbert.h.