flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
scalar_cutcell_geometry.hpp File Reference
#include <cstdint>
#include <Kokkos_Core.hpp>
#include "mac_cutcell.hpp"
#include "peclet/core/scheme/cut_cell_geometry.hpp"
#include "peclet/core/scheme/probe_flux.hpp"
#include "policy.hpp"

Go to the source code of this file.

Classes

struct  peclet::flow::scg::ScalarFacetOverlay
 The facet overlay (§3.5): SoA, facet index fastest. Offsets are LINEAR offsets on the block. More...
 
struct  peclet::flow::scg::ScalarCutCensus
 The geometry part of diagnostics.scalar_census (§8.2). More...
 
struct  peclet::flow::scg::ScalarCutGeometry
 The whole record: per-cell fields on the extended block (kappa and unknown haloed; the apertures computed, never exchanged) plus the facet overlay and the census. More...
 
struct  peclet::flow::scg::CellPass
 Per-cell flags of the record pass, on the INNER grid (x fastest). More...
 
struct  peclet::flow::scg::BlockLookup
 The block Lookup of cs::buildProbe for one facet's cell: unknown flags (haloed) at lattice offsets, and the phase-signed SDF trilinear at an index-space point relative to the cell. More...
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 
namespace  peclet::flow::scg
 

Functions

template<class V >
double peclet::flow::scg::cornerSample (const V &s, long i0, long sy, long sz)
 Corner sample: the 8 cells whose lowest is i0, in the fixed order of §2.2.
 
template<class V >
void peclet::flow::scg::cellSamples (const V &s, long i, long sy, long sz, double corner[8], double face[6], double &centre)
 The 15 PL samples of the cell at extended linear index i (corner index bx + 2 by + 4 bz, faces -x,+x,-y,+y,-z,+z).
 
double peclet::flow::scg::lowFaceAperture (const CCConst &s, long i, int a, long sy, long sz)
 The snapped aperture of the -a face of the cell at extended index i (the fan of cs::fanFaceAperture: tangent axes t1 < t2, loop c00, c10, c11, c01).
 
void peclet::flow::scg::buildApertures (CCField sax, CCField say, CCField saz, CCConst sdf, C3 e, int g)
 Kernel 1 (§2.5): the snapped scalar apertures of every face of every inner cell, including the high-side face at ghost index ext - G.
 
template<class V >
void peclet::flow::scg::cellSnapped (const V &sax, const V &say, const V &saz, long i, long sy, long sz, double ap[6])
 The snapped apertures of cell i in face order -x,+x,-y,+y,-z,+z.
 
int peclet::flow::scg::cellFacets (const cs::CutCellGeometry &g, const double ap[6], const double h[3], double area[2][3], double cen[2][3])
 The operator facets of one cell (§2.3) from its PL record and snapped apertures: returns the count (0, 1 or 2) and, when area/cen are given, the area vectors and centroids.
 
void peclet::flow::scg::buildCells (CCField kappa, CCField unknown, const CellPass &cp, CCConst sdf, CCConst sax, CCConst say, CCConst saz, C3 e, int g, const double hp[3])
 Kernel 2 (§2.5): kappa, the unknown flag and the per-cell facet count/kind on the inner cells.
 
void peclet::flow::scg::buildFacets (ScalarFacetOverlay &fo, const CellPass &cp, CCConst sdf, CCConst sax, CCConst say, CCConst saz, C3 e, int g, const double hp[3])
 Kernel 3 (§2.5): exclusive scans of the facet counts and of the cut-cell indicator in x-fastest inner order; allocates the overlay and fills its geometric members (not body, not the probe).
 
void peclet::flow::scg::buildFluidProbes (ScalarFacetOverlay &fo, CCConst sdf, CCConst unknown, C3 e, const double hp[3])
 Kernel 5 (§2.5, §3.3): the fluid probe ladder of every facet.
 
void peclet::flow::scg::zeroGhostSlab (CCField f, C3 e, int g, int face)
 Zero f on every ghost layer beyond face face (0..5 = -x,+x,-y,+y,-z,+z), full transverse extent: the halo wraps periodically, so flags beyond a non-periodic global face are cleared.
 
ScalarCutCensus peclet::flow::scg::localCensus (const ScalarFacetOverlay &fo, const CellPass &cp, CCConst kappa, CCConst unknown, CCConst sax, CCConst say, CCConst saz, C3 e, int g, double vol)
 The census of the record on this rank (not yet summed over ranks); sealedVolume in internal volume units.
 

Variables

constexpr double peclet::flow::scg::kKappaUnknown = 1e-14
 kappa above which a cell with an open face is a fluid unknown (§2.4).
 
constexpr double peclet::flow::scg::kFacetAreaRel = 1e-14
 |A^snap| below this times max_a A_a: no facet (§2.3).