peclet-amr 0.2.0
Block-local-Morton AMR octree + collocated cut-cell Navier–Stokes solver (header-only C++20, Kokkos + MPI)
Loading...
Searching...
No Matches
peclet::amr::FvFaceEmit< Dim, Bits > Struct Template Reference

Device-callable reproduction of AmrPoisson's per-cell face walk + geometry. More...

#include <assembly.hpp>

Public Types

using View_t = BlockOctreeView<Dim, Bits>
using M = typename View_t::M
using Code = typename View_t::Code
using Coord = typename View_t::Coord

Public Member Functions

double openness (Index leaf, int axis, int dir) const
Real areaOf (Coord s, int axis) const
 Area of a face NORMAL TO axis (Phase 3: the product over the OTHER axes).
Real coeff (Coord si, Coord sj, int axis) const
Coord wrap (long c, int axis) const
Real cellWidth (Index i, int axis) const
Real cellWidth (Index i) const
Real cellVolume (Index i) const
double bcDiag (Index i) const
 Σ over leaf i's Dirichlet-wall faces of A_f/(½·cellWidth) — mirrors AmrPoisson::boundaryDiag.
template<class Sink>
void operator() (Index i, Sink &sink) const
 Emit each face of leaf i as sink(neighbourLeaf, coef=openness·A_f/d_f) — the exact enumeration (axis-major, dir −1 then +1, 2:1 sub-faces in bit order) and weights of forEachFaceNeighbor.

Static Public Member Functions

static int faceIndex (int axis, int dir)

Public Attributes

View_t ov
 device octree (codes/levels/locate)
View< const double > alpha
 per-leaf·(2·Dim) openness, or empty when !hasOpen
Coord fineExt [Dim] = {}
 periodic-wrap modulus per axis
Real h0 [Dim] = {}
 finest cell width PER AXIS (Phase 3); set by the emitters
bool hasOpen = false
bool periodic = true
bool immersedWall = false

Static Public Attributes

static constexpr int kFaces = 2 * Dim

Detailed Description

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
struct peclet::amr::FvFaceEmit< Dim, Bits >

Device-callable reproduction of AmrPoisson's per-cell face walk + geometry.

Trivially copyable (Views are handles, the rest are scalars), so it captures by value into Kokkos kernels. Drives both the CSR emit (operator()) and the per-cell diagonal (cellVolume/bcDiag).

Definition at line 36 of file assembly.hpp.

Member Typedef Documentation

◆ View_t

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::amr::FvFaceEmit< Dim, Bits >::View_t = BlockOctreeView<Dim, Bits>

Definition at line 37 of file assembly.hpp.

◆ M

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::amr::FvFaceEmit< Dim, Bits >::M = typename View_t::M

Definition at line 38 of file assembly.hpp.

◆ Code

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::amr::FvFaceEmit< Dim, Bits >::Code = typename View_t::Code

Definition at line 39 of file assembly.hpp.

◆ Coord

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::amr::FvFaceEmit< Dim, Bits >::Coord = typename View_t::Coord

Definition at line 40 of file assembly.hpp.

Member Function Documentation

◆ faceIndex()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
int peclet::amr::FvFaceEmit< Dim, Bits >::faceIndex ( int axis,
int dir )
inlinestatic

Definition at line 51 of file assembly.hpp.

Referenced by openness().

◆ openness()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
double peclet::amr::FvFaceEmit< Dim, Bits >::openness ( Index leaf,
int axis,
int dir ) const
inline

Definition at line 54 of file assembly.hpp.

References alpha, faceIndex(), hasOpen, and kFaces.

Referenced by bcDiag(), and operator()().

◆ areaOf()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::areaOf ( Coord s,
int axis ) const
inline

Area of a face NORMAL TO axis (Phase 3: the product over the OTHER axes).

Definition at line 60 of file assembly.hpp.

References h0.

Referenced by bcDiag(), and coeff().

◆ coeff()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::coeff ( Coord si,
Coord sj,
int axis ) const
inline

Definition at line 67 of file assembly.hpp.

References areaOf(), and h0.

Referenced by operator()().

◆ wrap()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Coord peclet::amr::FvFaceEmit< Dim, Bits >::wrap ( long c,
int axis ) const
inline

Definition at line 71 of file assembly.hpp.

References fineExt.

Referenced by operator()().

◆ cellWidth() [1/2]

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::cellWidth ( Index i,
int axis ) const
inline

Definition at line 75 of file assembly.hpp.

References h0, and ov.

◆ cellWidth() [2/2]

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::cellWidth ( Index i) const
inline

Definition at line 78 of file assembly.hpp.

References cellWidth().

Referenced by cellWidth().

◆ cellVolume()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::cellVolume ( Index i) const
inline

Definition at line 79 of file assembly.hpp.

References h0, and ov.

Referenced by peclet::amr::assembleFv().

◆ bcDiag()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
double peclet::amr::FvFaceEmit< Dim, Bits >::bcDiag ( Index i) const
inline

Σ over leaf i's Dirichlet-wall faces of A_f/(½·cellWidth) — mirrors AmrPoisson::boundaryDiag.

Definition at line 88 of file assembly.hpp.

References areaOf(), fineExt, h0, immersedWall, openness(), ov, and periodic.

Referenced by peclet::amr::assembleFv().

◆ operator()()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
template<class Sink>
void peclet::amr::FvFaceEmit< Dim, Bits >::operator() ( Index i,
Sink & sink ) const
inline

Emit each face of leaf i as sink(neighbourLeaf, coef=openness·A_f/d_f) — the exact enumeration (axis-major, dir −1 then +1, 2:1 sub-faces in bit order) and weights of forEachFaceNeighbor.

Definition at line 112 of file assembly.hpp.

References coeff(), fineExt, openness(), ov, periodic, and wrap().

Member Data Documentation

◆ ov

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
View_t peclet::amr::FvFaceEmit< Dim, Bits >::ov

device octree (codes/levels/locate)

Definition at line 42 of file assembly.hpp.

Referenced by peclet::amr::assembleFv(), peclet::amr::assembleMomentum(), bcDiag(), cellVolume(), cellWidth(), and operator()().

◆ alpha

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
View<const double> peclet::amr::FvFaceEmit< Dim, Bits >::alpha

per-leaf·(2·Dim) openness, or empty when !hasOpen

Definition at line 43 of file assembly.hpp.

Referenced by peclet::amr::assembleFv(), and openness().

◆ fineExt

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Coord peclet::amr::FvFaceEmit< Dim, Bits >::fineExt[Dim] = {}

periodic-wrap modulus per axis

Definition at line 44 of file assembly.hpp.

Referenced by peclet::amr::assembleFv(), peclet::amr::assembleMomentum(), bcDiag(), operator()(), and wrap().

◆ h0

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::amr::FvFaceEmit< Dim, Bits >::h0[Dim] = {}

finest cell width PER AXIS (Phase 3); set by the emitters

Definition at line 45 of file assembly.hpp.

Referenced by areaOf(), peclet::amr::assembleFv(), peclet::amr::assembleMomentum(), bcDiag(), cellVolume(), cellWidth(), and coeff().

◆ hasOpen

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
bool peclet::amr::FvFaceEmit< Dim, Bits >::hasOpen = false

Definition at line 46 of file assembly.hpp.

Referenced by peclet::amr::assembleFv(), peclet::amr::assembleMomentum(), and openness().

◆ periodic

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
bool peclet::amr::FvFaceEmit< Dim, Bits >::periodic = true

◆ immersedWall

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
bool peclet::amr::FvFaceEmit< Dim, Bits >::immersedWall = false

Definition at line 48 of file assembly.hpp.

Referenced by peclet::amr::assembleFv(), and bcDiag().

◆ kFaces

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
int peclet::amr::FvFaceEmit< Dim, Bits >::kFaces = 2 * Dim
staticconstexpr

Definition at line 50 of file assembly.hpp.

Referenced by openness().


The documentation for this struct was generated from the following file: