11#ifndef PECLET_CORE_AMR_LEAF_FIELD_HPP
12#define PECLET_CORE_AMR_LEAF_FIELD_HPP
14#ifdef PECLET_CORE_HAVE_MORTON
36 template <
class Coord>
39 for (
int d = 0; d < Dim; ++d)
45 template <
class Coord>
48 for (
int d = 0; d < Dim; ++d)
50 (
static_cast<Real>(b[0][d]) + 0.5 * (
static_cast<Real>(b[1][d] - b[0][d]) + 1.0)) *
h0;
63 template <
int Dim,
unsigned Bits>
Per-block adaptive octree over block-local Morton codes.
std::vector< std::array< double, Dim > > transferFieldGradients(const BlockOctree< Dim, Bits > &oldT, const std::vector< double > &oldF)
Per-old-leaf minmod prolongation gradients (per fine-coordinate unit) — transferField's stencil,...
std::array< Real, Dim > Vec
Multi-dimensional real vector.
double Real
Default host floating type. Device kernels may use float; conversions happen at the boundary.
std::int64_t Index
Signed index type for grids and particles (supersedes block_decomposer's long int IndxT).
World-space placement of a block-local octree: fine coordinate (0,..,0) sits at origin,...
Real leafSize(unsigned level) const
World width of a leaf at level (covers 2^level fine cells).
Vec< Dim > center(const std::array< std::array< Coord, Dim >, 2 > &b) const
World coordinate of a leaf centre, from its integer bounds [lo,hi] (inclusive, fine units).
Vec< Dim > lowerCorner(const std::array< Coord, Dim > &lo) const
World coordinate of a leaf's lower corner, given its integer lower bound (fine units).
A value per leaf, in the octree's Z-order leaf slot order.
LeafField(const BlockOctree< Dim, Bits > &t, T init=T{})
LeafField(Index n, T init=T{})
const T & operator[](Index i) const