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))>
static int peclet::amr::FvFaceEmit< Dim, Bits >::faceIndex ( int  axis,
int  dir 
)
inlinestatic

Definition at line 51 of file assembly.hpp.

Referenced by peclet::amr::FvFaceEmit< Dim, Bits >::openness().

◆ openness()

◆ 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 peclet::amr::FvFaceEmit< Dim, Bits >::h0, and peclet::amr::transferFieldGradients().

Referenced by peclet::amr::FvFaceEmit< Dim, Bits >::bcDiag(), and peclet::amr::FvFaceEmit< Dim, Bits >::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

◆ 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

◆ 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

◆ 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

◆ cellVolume()

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

◆ bcDiag()

◆ 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

Member Data Documentation

◆ ov

◆ 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::FvFaceEmit< Dim, Bits >::openness().

◆ fineExt

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

◆ h0

◆ hasOpen

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

◆ 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::FvFaceEmit< Dim, Bits >::bcDiag().

◆ kFaces

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

Definition at line 50 of file assembly.hpp.

Referenced by peclet::amr::FvFaceEmit< Dim, Bits >::openness().


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