EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
EBGeometry::SFC::Nested Struct Reference

Implementation of a nested index SFC. More...

#include <EBGeometry_SFC.hpp>

Static Public Member Functions

static uint64_t encode (const Index &a_point) noexcept
 Encode the input point into the SFC code.
 
static Index decode (const uint64_t &a_code) noexcept
 Decode the 64-bit SFC code into an Index.
 

Detailed Description

Implementation of a nested index SFC.

The SFC is encoded by the code = i + j * N + k * N * N in 3D, where i,j,k are the block indices.

Member Function Documentation

◆ decode()

static Index EBGeometry::SFC::Nested::decode ( const uint64_t a_code)
inlinestaticnoexcept

Decode the 64-bit SFC code into an Index.

Parameters
[in]a_codeSFC code to decode. Must be a code actually produced by encode(), i.e. at most (ValidSpan+1)^3 - 1.
Returns
3D grid index corresponding to a_code.

◆ encode()

static uint64_t EBGeometry::SFC::Nested::encode ( const Index a_point)
inlinestaticnoexcept

Encode the input point into the SFC code.

Parameters
[in]a_point3D grid index to encode. Each component must be <= ValidSpan.
Returns
64-bit nested SFC code for a_point.

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