|
peclet-amr 0.2.0
Block-local-Morton AMR octree + collocated cut-cell Navier–Stokes solver (header-only C++20, Kokkos + MPI)
|
World-space placement of a block-local octree: fine coordinate (0,..,0) sits at origin, and one level-0 fine cell is h0[d] wide on axis d. More...
#include <leaf_field.hpp>
Public Member Functions | |
| void | setIsotropic (Real h) |
| Set all axes to one spacing (the cubic case), in place. | |
| Real | hMin () const |
| Real | hMax () const |
| bool | isotropic () const |
| Real | cellVolume () const |
| World volume of a level-0 fine cell. | |
| Real | leafSize (unsigned level, int d) const |
| World width of a leaf at level on axis d (it covers 2^level fine cells). | |
| Vec< Dim > | leafSize (unsigned level) const |
| World widths of a leaf at level, per axis. | |
| template<class Coord> | |
| 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). | |
| template<class Coord> | |
| 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). | |
Static Public Member Functions | |
| static AmrGeometry | isotropicAt (const Vec< Dim > &o, Real h) |
| Cubic-cell convenience: the pre-Phase-3 {origin, h} construction. | |
Public Attributes | |
| Vec< Dim > | origin {} |
| Vec< Dim > | h0 = detail::filledVec<Dim>(1.0) |
World-space placement of a block-local octree: fine coordinate (0,..,0) sits at origin, and one level-0 fine cell is h0[d] wide on axis d.
h0 is PER AXIS (Phase 3 of suite/docs/PHYSICAL_UNITS_PLAN.md; the design is docs/amr_anisotropic.md). The octree refines by 2 on every axis, so a level-l leaf is h0[d] * 2^l wide on axis d and every level inherits the root aspect ratio — the Morton codes, bounds(), level(), the halo, the ORB and the 2:1 balance are integer fine-unit arithmetic and know nothing about it.
leafSize() and lowerCorner() are the two funnels every world-coordinate computation goes through; making h0 a Vec breaks every scalar caller at COMPILE time, which is the inventory mechanism the port relies on. Cubic geometry is AmrGeometry::isotropicAt(origin, h).
Definition at line 47 of file leaf_field.hpp.
|
inlinestatic |
Cubic-cell convenience: the pre-Phase-3 {origin, h} construction.
Definition at line 52 of file leaf_field.hpp.
References peclet::amr::detail::filledVec(), h0, and origin.
|
inline |
Set all axes to one spacing (the cubic case), in place.
Definition at line 59 of file leaf_field.hpp.
References peclet::amr::detail::filledVec(), and h0.
|
inline |
Definition at line 61 of file leaf_field.hpp.
References h0.
|
inline |
Definition at line 67 of file leaf_field.hpp.
References h0.
Referenced by peclet::amr::refineToSdf().
|
inline |
Definition at line 73 of file leaf_field.hpp.
References h0.
|
inline |
|
inline |
World width of a leaf at level on axis d (it covers 2^level fine cells).
Definition at line 88 of file leaf_field.hpp.
References h0.
Referenced by peclet::amr::pybind::leafSizes(), peclet::amr::refineToSdf(), and peclet::amr::refineToSdfGraded().
|
inline |
World widths of a leaf at level, per axis.
Definition at line 92 of file leaf_field.hpp.
References h0.
|
inline |
World coordinate of a leaf's lower corner, given its integer lower bound (fine units).
Definition at line 102 of file leaf_field.hpp.
|
inline |
World coordinate of a leaf centre, from its integer bounds [lo,hi] (inclusive, fine units).
Definition at line 111 of file leaf_field.hpp.
Referenced by peclet::amr::pybind::leafCenters(), peclet::amr::refineToSdf(), and peclet::amr::refineToSdfGraded().
| Vec<Dim> peclet::amr::AmrGeometry< Dim >::origin {} |
Definition at line 48 of file leaf_field.hpp.
Referenced by center(), peclet::amr::pybind::DistributedOctree::DistributedOctree(), peclet::amr::pybind::Flow::Flow(), isotropicAt(), peclet::amr::DistributedOctree< Dim, Bits >::localGeometry(), lowerCorner(), and peclet::amr::writeVtu().
| Vec<Dim> peclet::amr::AmrGeometry< Dim >::h0 = detail::filledVec<Dim>(1.0) |
Definition at line 49 of file leaf_field.hpp.
Referenced by peclet::amr::DistributedMultigrid< Dim, Bits >::build(), peclet::amr::DistributedMultigridView< Dim, Bits >::build(), cellVolume(), center(), peclet::amr::pybind::DistributedOctree::DistributedOctree(), peclet::amr::pybind::Flow::Flow(), hMax(), hMin(), isotropic(), isotropicAt(), leafSize(), leafSize(), lowerCorner(), peclet::amr::pybind::Poisson::Poisson(), setIsotropic(), and peclet::amr::writeVtu().