2#ifndef STORMM_HILBERT_SFC_H
3#define STORMM_HILBERT_SFC_H
7#include "Constants/behavior.h"
8#include "DataTypes/stormm_vector_types.h"
9#include "math_enumerators.h"
14using constants::CartesianDimension;
15using constants::UnitCellAxis;
19const int3 hilbert_cube_hll[] = { { 0, 0, 0 }, { 0, 1, 0 }, { 0, 1, 1 }, { 0, 0, 1 },
20 { 1, 0, 1 }, { 1, 1, 1 }, { 1, 1, 0 }, { 1, 0, 0 } };
24const int3 hilbert_cube_hhh[] = { { 0, 0, 0 }, { 0, 1, 0 }, { 1, 1, 0 }, { 1, 0, 0 },
25 { 1, 0, 1 }, { 0, 0, 1 }, { 0, 1, 1 }, { 1, 1, 1 } };
30const int3 hilbert_square_hl[] = { { 0, 0, 0 }, { 0, 1, 0 }, { 1, 1, 0 }, { 1, 0, 0 } };
31const int3 peano_square[] = { { 0, 0, 0 }, { 0, 1, 0 }, { 0, 2, 0 },
32 { 1, 2, 0 }, { 1, 1, 0 }, { 1, 0, 0 },
33 { 2, 0, 0 }, { 2, 1, 0 }, { 2, 2, 0 } };
34const int3 hileano_square[] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 },
35 { 0, 1, 0 }, { 0, 2, 0 }, { 1, 2, 0 },
36 { 2, 2, 0 }, { 2, 1, 0 }, { 2, 0, 0 } };
47 HilbertSFC(
int x_span_in,
int y_span_in,
int z_span_in,
48 HilbertCurveMode method = HilbertCurveMode::OVERSPAN);
77 const std::vector<int3>&
getCurve()
const;
84 std::vector<int3> curve;
87 std::vector<int> curve_indices;
111void propagateHilbertCurve(
int s, std::vector<int3> *curve,
int x = 0,
int y = 0,
int z = 0,
112 int dx = 1,
int dy = 0,
int dz = 0,
int dx2 = 0,
int dy2 = 1,
113 int dz2 = 0,
int dx3 = 0,
int dy3 = 0,
int dz3 = 1);
119std::vector<int3> drawHilbertSpaceCurve(
int order);
int getCurveIndex(int grid_x, int grid_y, int grid_z) const
Get the curve index to which a particular grid element corresponds. The grid begins at (0,...
Definition hilbert_sfc.cpp:81
const std::vector< int3 > & getCurve() const
Get the Hilbert space filling curve, expressed in unitless integers with components for each Cartesia...
Definition hilbert_sfc.cpp:76
int getDimension(CartesianDimension dim) const
Get the dimension of the region filled by the curve along one axis.
Definition hilbert_sfc.cpp:50
int3 getDimensions() const
Get the dimensions of the region filled by the curve.
Definition hilbert_sfc.cpp:45
HilbertSFC(int x_span_in, int y_span_in, int z_span_in, HilbertCurveMode method=HilbertCurveMode::OVERSPAN)
The constructor takes as inputs a trio of integers indicating the overall unitless dimensions of the ...
Definition hilbert_sfc.cpp:13
Definition stormm_vector_types.h:27