DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
Octree.hpp
Go to the documentation of this file.
1#include "DNDS/Defines.hpp"
2#include "Geometric.hpp"
3
4namespace DNDS::Geom
5{
6 class Octree
7 {
8 public:
9 static const int LLL = 0;
10 static const int LLR = 1;
11 static const int LRL = 2;
12 static const int LRR = 3;
13 static const int RLL = 4;
14 static const int RLR = 5;
15 static const int RRL = 6;
16 static const int RRR = 7;
17 using tRange = Eigen::Vector2d;
18
19 private:
20 struct Node
21 {
22 std::array<Node *, 8> children;
23 tRange xRange, yRange, zRange;
25 tPoint p;
26 Node(DNDS::index ni, const tPoint &np, const tRange &nX, const tRange &nY, const tRange &nZ)
27 : xRange(nX), yRange(nY), zRange(nZ), i(ni), p(np)
28 {
29 for (auto &i : children)
30 i = nullptr;
31 }
32
33 bool InsertIfUnique(DNDS::index ni, const tPoint &np, double tol)
34 {
35 // TODO
36 return false;
37 }
38 } root;
39
40 public:
41 };
42}
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
static const int RLL
Definition Octree.hpp:13
static const int RRR
Definition Octree.hpp:16
static const int LRL
Definition Octree.hpp:11
static const int LLL
Definition Octree.hpp:9
static const int RLR
Definition Octree.hpp:14
Eigen::Vector2d tRange
Definition Octree.hpp:17
static const int LRR
Definition Octree.hpp:12
static const int RRL
Definition Octree.hpp:15
static const int LLR
Definition Octree.hpp:10
Eigen::Vector3d tPoint
Definition Geometric.hpp:9
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
Definition Defines.hpp:107