FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
morton_key< DIM, T > Class Template Reference

Point on a Morton space filling curve. More...

Public Types

using point_t = flecsi::util::point< double, DIM >
 Point type to represent coordinates.
 
- Public Types inherited from filling_curve_key< DIM, T, morton_key< DIM, T > >
using int_t = T
 Integer type used to represent the key.
 

Public Member Functions

point_t coordinates (const std::array< point_t, 2 > &range) const
 Convert this key to coordinates in range.
 
 morton_key (const std::array< point_t, 2 > &range, const point_t &p, const std::size_t depth=max_depth_)
 Create a Morton key at a specific depth.
 
std::array< point_t, 2 > range (const std::array< point_t, 2 > &range) const
 Compute the bounding box of a branch from its key in the overall domain The space is recursively decomposed regarding the dimension.
 
- Public Member Functions inherited from filling_curve_key< DIM, T, morton_key< DIM, T > >
std::size_t depth () const
 Find the depth of the current key.
 
constexpr filling_curve_key ()
 Default constructor: create an invalid key containing only zeros.
 
constexpr filling_curve_key (int_t value)
 Construct a key from an integer of type int_t.
 
int_t last_value () const
 Return the last bits of the key.
 
constexpr filling_curve_key parent () const
 Return the parent of this key (depth - 1)
 
int_t pop ()
 Pop last bits and return its value.
 
void pop (std::size_t d)
 Pop the depth d bits from the end of this key.
 
constexpr auto push (int_t bits) const
 Push bits onto the end of this key.
 
constexpr int_t value () const
 Get the value associated to this key.
 
constexpr bool operator<= (const filling_curve_key &bid) const
 Less than or equal to operator.
 
constexpr bool operator>= (const filling_curve_key &bid) const
 Greater than or equal to operator.
 
constexpr bool operator> (const filling_curve_key &bid) const
 Greater than operator.
 
constexpr bool operator< (const filling_curve_key &bid) const
 Less than operator.
 
constexpr bool operator!= (const filling_curve_key &bid) const
 Inequality operator.
 

Additional Inherited Members

- Static Public Member Functions inherited from filling_curve_key< DIM, T, morton_key< DIM, T > >
static constexpr morton_key< DIM, T > max ()
 Biggest value possible at max_depth.
 
static constexpr std::size_t max_depth ()
 Max depth possible for this type of key.
 
static constexpr morton_key< DIM, T > min ()
 Smallest value possible at max_depth.
 
static constexpr morton_key< DIM, T > root ()
 Get the root key (depth 0)
 
- Protected Attributes inherited from filling_curve_key< DIM, T, morton_key< DIM, T > >
int_t value_
 Value of the filling curve key.
 

Detailed Description

template<Dimension DIM, typename T>
class flecsi::util::morton_key< DIM, T >

Point on a Morton space filling curve.

Member Typedef Documentation

◆ point_t

template<Dimension DIM, typename T >
using point_t = flecsi::util::point<double, DIM>

Point type to represent coordinates.

Constructor & Destructor Documentation

◆ morton_key()

template<Dimension DIM, typename T >
morton_key ( const std::array< point_t, 2 > &  range,
const point_t p,
const std::size_t  depth = max_depth_ 
)

Create a Morton key at a specific depth.

Parameters
rangeThe bounding box of the overall domain
pThe point that the key will represent in the range
depthThe depth at which to generate the key.

Member Function Documentation

◆ coordinates()

template<Dimension DIM, typename T >
point_t coordinates ( const std::array< point_t, 2 > &  range) const

Convert this key to coordinates in range.

Parameters
rangeThe bounding box of the overall domain

◆ range()

template<Dimension DIM, typename T >
std::array< point_t, 2 > range ( const std::array< point_t, 2 > &  range) const

Compute the bounding box of a branch from its key in the overall domain The space is recursively decomposed regarding the dimension.

Parameters
rangeThe bounding box of the overall domain