flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
cut_cell_ibm.hpp File Reference

flow — portable (Kokkos) Robust-Scaled cut-cell IBM primitives + per-cut-cell overlay build. More...

#include <Kokkos_Core.hpp>
#include <Kokkos_MathematicalFunctions.hpp>
#include "mac_cutcell.hpp"
#include "policy.hpp"

Go to the source code of this file.

Classes

struct  peclet::flow::IbmOverlayT< Space, Real >
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 

Typedefs

using peclet::flow::IMem = Kokkos::DefaultExecutionSpace::memory_space
 
template<class Real >
using peclet::flow::IbmOverlayReal = IbmOverlayT< IMem, Real >
 

Functions

template<class Real >
Real peclet::flow::poly_D (Real xi)
 
template<class Real >
Real peclet::flow::poly_N_nb (Real xi)
 
template<class Real >
Real peclet::flow::poly_Nc (Real xi)
 
template<class Real >
Real peclet::flow::poly_Nbc (Real)
 
template<class Real >
Real peclet::flow::poly_D_avg (Real xi)
 
template<class Real >
Real peclet::flow::poly_Nnb_avg (Real xi)
 
template<class Real >
Real peclet::flow::poly_Nc_avg (Real xi)
 
template<class Real >
Real peclet::flow::poly_Nbc_avg (Real)
 
template<class Real >
Real peclet::flow::poly_D_slip (Real xi, Real lam)
 
template<class Real >
Real peclet::flow::poly_N_nb_slip (Real xi, Real lam)
 
template<class Real >
Real peclet::flow::poly_Nc_slip (Real xi, Real lam)
 
template<class Real >
Real peclet::flow::poly_D_sandwich (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_N_c_sandwich (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_Nbc_pp_sw (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_Nbc_mp_sw (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_D_sandwich_avg (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_N_c_sandwich_avg (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_Nbc_pp_sw_avg (Real xi_m, Real xi_p)
 
template<class Real >
Real peclet::flow::poly_Nbc_mp_sw_avg (Real xi_m, Real xi_p)
 
template<int SCHEME, class OV >
void peclet::flow::ibmFillEntry (const OV &o, int list_idx, int c_idx, typename OV::value_type sdf_c, const typename OV::value_type sdf_n[6], int bc_type, const typename OV::value_type *thEx, const typename OV::value_type *lamAxis=nullptr, int *sandwichSkipped=nullptr)
 
template<int SCHEME, class OV >
void peclet::flow::ibmFillEntry (const OV &o, int list_idx, int c_idx, typename OV::value_type sdf_c, const typename OV::value_type sdf_n[6], int bc_type)
 
template<class MV >
void peclet::flow::ibmBuildDiffusion (MV AC, MV AW, MV AE, MV AS, MV AN, MV AB, MV AT, int ex, int ey, int ez, double bx, double by, double bz, double idiag)
 
template<class MV >
void peclet::flow::ibmBuildDiffusion (MV AC, MV AW, MV AE, MV AS, MV AN, MV AB, MV AT, int ex, int ey, int ez, double beta, double idiag)
 
template<class FaceProps , class MV >
void peclet::flow::ibmBuildDiffusionVar (MV AC, MV AW, MV AE, MV AS, MV AN, MV AB, MV AT, int ex, int ey, int ez, int g, FaceProps fp, double wx=1.0, double wy=1.0, double wz=1.0)
 
template<class MV , class OV >
void peclet::flow::ibmModifyStencil (MV AC, MV AW, MV AE, MV AS, MV AN, MV AB, MV AT, Kokkos::View< double *, IMem > a_inhom, Kokkos::View< double *, IMem > rhs_scale, const OV &ibm, int numActive, typename OV::value_type u_bc_val, Kokkos::View< const double *, IMem > u_bc=Kokkos::View< const double *, IMem >())
 

Detailed Description

flow — portable (Kokkos) Robust-Scaled cut-cell IBM primitives + per-cut-cell overlay build.

Kokkos port of cut_cell_ibm.cuh (the boundary-distance polynomials) and ibm_fill_entry from mac_ibm.cuh (the per-cut-cell stencil-modification factors K/M/X/Nbc/R + D_rescale). Faithful copy of the Dirichlet/Neumann, point-value(SCHEME 0)/cell-average(1), and sandwiched (double-sided) cases. Output factors are written into Kokkos Views (SoA, [list_idx*6+k]); the build kernel fills one entry per cut cell. KOKKOS_INLINE_FUNCTION so the math is shared with the host reference.

QUALITY_PLAN G.6 (precision as a typed policy): the closure polynomials and the overlay are templated on Real (the operator storage type, IbmSolver::mreal = MReal). The default build instantiates every one of these at Real = float, so the generated code – same operations, same integer-exact literals – is BIT-IDENTICAL to the pre-G.6 hardcoded-float version; a -DPECLET_FLOW_OPERATOR_DOUBLE build instantiates the SAME templates at Real = double, so the overlay build no longer narrows the SDF/theta samples (and every K/M/X/Nbc/R/D_rescale factor derived from them) to float before storing them.

Definition in file cut_cell_ibm.hpp.