core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
cut_cell_closure.hpp
Go to the documentation of this file.
1
33#ifndef PECLET_CORE_SCHEME_CUT_CELL_CLOSURE_HPP
34#define PECLET_CORE_SCHEME_CUT_CELL_CLOSURE_HPP
35
36#ifdef KOKKOS_INLINE_FUNCTION
37#define PECLET_CORE_CC_HD KOKKOS_INLINE_FUNCTION
38#else
39#define PECLET_CORE_CC_HD inline
40#endif
41
43
44// ---- boundary-distance polynomials, SCHEME 0 (point-value) ----
45template <class Real>
47 return xi * (Real(1) + xi);
48}
49template <class Real>
51 return xi * (Real(1) - xi);
52}
53template <class Real>
55 return Real(2) * (xi * xi - Real(1));
56}
57template <class Real>
61
62// ---- SCHEME 1 (cell-average) siblings ----
63template <class Real>
65 return xi * (Real(1) + xi) - Real(1) / Real(12);
66}
67template <class Real>
69 return xi * (Real(1) - xi) + Real(1) / Real(12);
70}
71template <class Real>
73 return Real(2) * (xi * xi - Real(1)) - Real(1) / Real(6);
74}
75template <class Real>
79
80// ---- Navier-slip generalization of the SCHEME 0 polynomials (flow WO-V6b; amr does not use
81// these -- point-shell wall models are a flow/dem convention). See flow/src/cut_cell_ibm.hpp for
82// the derivation (P = theta + lam, Q = theta^2 + 2*lam*theta); lam = 0 reproduces poly_D /
83// poly_N_nb / poly_Nc identically.
84template <class Real>
86 return poly_D(xi) + lam * (Real(1) + Real(2) * xi);
87}
88template <class Real>
90 return poly_N_nb(xi) + lam * (Real(1) - Real(2) * xi);
91}
92template <class Real>
94 return poly_Nc(xi) + Real(4) * lam * xi;
95}
96
97// ---- sandwiched axis (both neighbours solid = a one-cell fluid gap), SCHEME 0 then SCHEME 1 ----
98template <class Real>
102template <class Real>
106template <class Real>
108 return (xi_m / (xi_m + xi_p)) * (Real(1) + xi_m);
109}
110template <class Real>
112 return (xi_p / (xi_m + xi_p)) * (Real(1) - xi_p);
113}
114template <class Real>
118template <class Real>
120 return (xi_m + Real(1)) * (xi_p - Real(1)) - Real(1) / Real(12);
121}
122template <class Real>
124 return (xi_m / (xi_m + xi_p)) * (Real(1) + xi_m) - Real(1) / Real(12);
125}
126template <class Real>
128 return (xi_p / (xi_m + xi_p)) * (Real(1) - xi_p) + Real(1) / Real(12);
129}
130
131} // namespace peclet::core::scheme
132
133#endif // PECLET_CORE_SCHEME_CUT_CELL_CLOSURE_HPP
#define PECLET_CORE_CC_HD
PECLET_CORE_CC_HD Real poly_D_sandwich_avg(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_D(Real xi)
PECLET_CORE_CC_HD Real poly_Nc_avg(Real xi)
PECLET_CORE_CC_HD Real poly_Nbc(Real)
PECLET_CORE_CC_HD Real poly_Nbc_pp_sw(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_N_c_sandwich_avg(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_N_c_sandwich(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_Nnb_avg(Real xi)
PECLET_CORE_CC_HD Real poly_D_sandwich(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_Nbc_mp_sw_avg(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_Nbc_avg(Real)
PECLET_CORE_CC_HD Real poly_D_slip(Real xi, Real lam)
PECLET_CORE_CC_HD Real poly_Nbc_pp_sw_avg(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_N_nb_slip(Real xi, Real lam)
PECLET_CORE_CC_HD Real poly_Nc(Real xi)
PECLET_CORE_CC_HD Real poly_D_avg(Real xi)
PECLET_CORE_CC_HD Real poly_Nbc_mp_sw(Real xi_m, Real xi_p)
PECLET_CORE_CC_HD Real poly_Nc_slip(Real xi, Real lam)
PECLET_CORE_CC_HD Real poly_N_nb(Real xi)
Kokkos::View< T *, MemSpace > View
1D device array.
Definition view.hpp:26
double Real
Default host floating type. Device kernels may use float; conversions happen at the boundary.
Definition types.hpp:18