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

Point on a Hilbert-Peano 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, hilbert_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.
 
 hilbert_key (const std::array< point_t, 2 > &range, const point_t &p, const std::size_t depth=max_depth_)
 Create a Hilbert key at a specific depth.
 
- Public Member Functions inherited from filling_curve_key< DIM, T, hilbert_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, hilbert_key< DIM, T > >
static constexpr hilbert_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 hilbert_key< DIM, T > min ()
 Smallest value possible at max_depth.
 
static constexpr hilbert_key< DIM, T > root ()
 Get the root key (depth 0)
 
- Protected Attributes inherited from filling_curve_key< DIM, T, hilbert_key< DIM, T > >
int_t value_
 Value of the filling curve key.
 

Detailed Description

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

Point on a Hilbert-Peano 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

◆ hilbert_key()

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

Create a Hilbert key at a specific depth.

For Hilbert key, they key is generated to the max_depth_ and then truncated

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