Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::spin::Mortonizer< CoordType, MortonIndexType, DIM > Class Template Reference

Helper class for MortonIndexing of a point's coordinate. More...

#include </home/docs/checkouts/>

Detailed Description

template<typename CoordType, typename MortonIndexType, int DIM>
class axom::spin::Mortonizer< CoordType, MortonIndexType, DIM >

Helper class for MortonIndexing of a point's coordinate.

The Morton index of a point interleaves the bits of its coordinates (with the least significant bit coming from the x-coordinate E.g. if we have a point in 2D (6,3) == (0b0110, 0b0011) in its binary representation.If we label the individual set bits we get (0b0ab0, 0b00yz). When we expand the bits by inserting a 0 (denoted with *), we get (0b*0*a*b*0,0b*0*0*y*z). Finally, by shifting the y-coordinate and interleaving, we get the Morton index of this point: 0b000yazb0 == 0b00011110 == 30

The documentation for this class was generated from the following file: