64bit index.1 signaling bit: true if node exists, false otherwise.64bit/#of children.73bit.N: id of last node in use (not the total #of nodes in use!)N_{max}: max #of nodes allowedN < = N_{max}boost::flat_set is used to store the indices of Halo nodes: O(Nh * Np).Fundamentals:
nd - 1-dimensional face.nd - 1 are called diagonal neighbors.N is the #of nodes/cells.Np is the #of neighbor processes.Nh is the #of halo cells.O(Np * logNh) ~ O(Np).Immutable constants (access is O(1)):
nd: #of spatial dimensions (e.g. nd = 2 for 2D and nd = 3 for 3D).neighbor(i, pos) = n, neighbor(n, opposite(pos)) = i. 2 * (nd).2^(nd).Immutable algorithms (connectivity):
f: () -> size_t.O(N).n: f: (NodeIdx n) -> NodeIdx.O(1).lower_bound((n - 1) / #of children).n in position p: f: (NodeIdx n, ChildPos p) -> NodeIdx.O(1).n in grid g:f: (NodeIdx n, GridIdx g) -> CellIdx.O(1).n: f: (NodeIdx c) -> ChildPos.O(1).(c - 1) % #of children.d with sign s: f: (Direction d, Sign s) -> NghbrPos.O(1).p at sing s:f: (NghbrPos p, Sign s) -> bool.O(1).n at position p: f: (NodeIdx n, NghbrPos p) -> NodeIdx.O(logN).n: f: (NodeIdx n) -> (NodeIdx...).O(logN).#of same level neighbor positions.n at position p: f: (NodeIdx n, NghbrPos p) -> NodeIdx.O(logN).n: f: (NodeIdx n) -> (NodeIdx...).O(logN).#of same level diagonal neighbor positions.g:f: (GridIdx g) -> (NodeIdx...).O(N).g:f: (GridIdx g) -> (CellIdx...).O(N).n at position p in grid g: f: (NodeIdx n, NghbrPos p, GridIdx g) -> CellIdx.O(logN).n in grid g: f: (NodeIdx n, GridIdx g) -> (CellIdx...).O(logN).#of same level neighbor positions.n at position p in grid g: f: (NodeIdx n, NghbrPos p, GridIdx g) -> CellIdx.O(logN).n in grid g: f: (NodeIdx n, GridIdx g) -> (CellIdx...).O(logN).n in grid g: f: (NodeIdx n, GridIdx g) -> (CellIdx...).O(logN).max #of direct cell neighbors.n in grid g: f: (NodeIdx n, GridIdx g) -> (CellIdx...).O(logN).max #of diagonal cell neighbors.Mutable algorithms (connectivity):
f: () -> NodeIdx.O(1).f: () -> NodeIdx.O(1).n nodes before position p:f: (NodeIdx p, Size n) -> NodeIdx.O(N).p:f: (((NodeIdx) -> bool) p) -> NodeIdx.O(N).Immutable algorithms (geometry):
n:f: (NodeIdx n) -> Num.O(logN).n:f: (NodeIdx n) -> (Num...).O(logN).n:f: (NodeIdx n) -> ((Num...)...).O(logN).Boundary conditions (B is the #of boundaries):
c cut by boundary b:f: (CellIdx c, Boundary b) -> bool.O(1).c:f: (CellIdx c) -> (Boundary...).O(B).Immutable algorithms (distributed memory):
f: () -> (Rank...).O(1).g:f: (GridIdx g) -> (Rank...).O(1).g with process p:f: (GridIdx g, Rank p) -> (CellIdx...).O(Nh logN).l halo layers of grid g with process p:f: (GridIdx g, Size l, Rank p) -> HaloHandler.O(Nh logN).