|
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::AmrGeometry< Dim >::h0, peclet::amr::AmrGeometry< Dim >::origin, and peclet::amr::transferFieldGradients().
|
inline |
Set all axes to one spacing (the cubic case), in place.
Definition at line 59 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
|
inline |
Definition at line 61 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
|
inline |
Definition at line 67 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
Referenced by peclet::amr::pybind::Octree::refine_to_gap_floor().
|
inline |
Definition at line 73 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0.
|
inline |
World volume of a level-0 fine cell.
Definition at line 80 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
|
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 peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
|
inline |
World widths of a leaf at level, per axis.
Definition at line 92 of file leaf_field.hpp.
References peclet::amr::AmrGeometry< Dim >::h0, and peclet::amr::transferFieldGradients().
|
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.
References peclet::amr::AmrGeometry< Dim >::h0, peclet::amr::AmrGeometry< Dim >::origin, and peclet::amr::transferFieldGradients().
|
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.
References peclet::amr::AmrGeometry< Dim >::h0, peclet::amr::AmrGeometry< Dim >::origin, and peclet::amr::transferFieldGradients().
| Vec<Dim> peclet::amr::AmrGeometry< Dim >::origin {} |
Definition at line 48 of file leaf_field.hpp.
Referenced by peclet::amr::AmrGeometry< Dim >::center(), peclet::amr::pybind::DistributedOctree::DistributedOctree(), peclet::amr::pybind::Octree::find(), peclet::amr::AmrGeometry< Dim >::isotropicAt(), peclet::amr::DistributedOctree< Dim, Bits >::localGeometry(), peclet::amr::AmrGeometry< Dim >::lowerCorner(), peclet::amr::pybind::Octree::Octree(), and peclet::amr::pybind::Octree::origin().
| 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(), peclet::amr::AmrGeometry< Dim >::cellVolume(), peclet::amr::AmrGeometry< Dim >::center(), peclet::amr::pybind::DistributedOctree::DistributedOctree(), peclet::amr::pybind::Octree::extent(), peclet::amr::pybind::Octree::find(), peclet::amr::AmrGeometry< Dim >::hMax(), peclet::amr::AmrGeometry< Dim >::hMin(), peclet::amr::AmrGeometry< Dim >::isotropic(), peclet::amr::AmrGeometry< Dim >::isotropicAt(), peclet::amr::AmrGeometry< Dim >::leafSize(), peclet::amr::AmrGeometry< Dim >::leafSize(), peclet::amr::AmrGeometry< Dim >::lowerCorner(), peclet::amr::pybind::Octree::Octree(), peclet::amr::AmrGeometry< Dim >::setIsotropic(), and peclet::amr::pybind::Octree::spacing().