AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
Loading...
Searching...
No Matches
hydro_plic_normals_K.H
Go to the documentation of this file.
1/**
2 * \file hydro_plic_normals_K.H
3 *
4 * Interface normals of the PLIC reconstruction, and the plane fit that takes one of them as a
5 * template parameter. The comment above the schemes below says how to add one.
6 *
7 * The Mixed Youngs-Centered normal is that of Aulisa et al. (JCP 225, 2007). Derived from
8 * Kynema-SGF (formerly AMR-Wind), src/equation_systems/vof, BSD 3-Clause License, Copyright (c)
9 * 2020, Alliance for Energy Innovation and Regents of the University of California.
10 *
11 * \addtogroup PLIC
12 * @{
13 */
14
15#ifndef HYDRO_PLIC_NORMALS_K_H
16#define HYDRO_PLIC_NORMALS_K_H
17
18#include <hydro_plic_K.H>
19
20#include <AMReX.H>
21
22#include <exception>
23#include <string>
24#include <utility>
25
26namespace PLIC {
27
28// Half-length of the height-function columns (7 cells)
29static constexpr int hf_half = 3;
30// A height column ends in cells within this of 0 or 1
31#ifdef AMREX_USE_FLOAT
32static constexpr amrex::Real hf_pure_tol = 1.0e-3_rt;
33#else
34static constexpr amrex::Real hf_pure_tol = 1.0e-6_rt;
35#endif
36
37#if AMREX_SPACEDIM == 3
38/**
39 * \brief Youngs' finite-difference normal on the 27-point stencil, scaled
40 * by -32 (i.e. m = -32 grad F).
41 */
43youngs_normal(const int i,
44 const int j,
45 const int k,
47 amrex::Real& mx,
48 amrex::Real& my,
49 amrex::Real& mz) {
50 amrex::Real mm1 = F(i - 1, j - 1, k - 1) + F(i - 1, j - 1, k + 1) + F(i - 1, j + 1, k - 1) +
51 F(i - 1, j + 1, k + 1) +
52 2.0_rt * (F(i - 1, j - 1, k) + F(i - 1, j + 1, k) + F(i - 1, j, k - 1) +
53 F(i - 1, j, k + 1)) +
54 4.0_rt * F(i - 1, j, k);
55 amrex::Real mm2 = F(i + 1, j - 1, k - 1) + F(i + 1, j - 1, k + 1) + F(i + 1, j + 1, k - 1) +
56 F(i + 1, j + 1, k + 1) +
57 2.0_rt * (F(i + 1, j - 1, k) + F(i + 1, j + 1, k) + F(i + 1, j, k - 1) +
58 F(i + 1, j, k + 1)) +
59 4.0_rt * F(i + 1, j, k);
60 mx = mm1 - mm2;
61
62 mm1 = F(i - 1, j - 1, k - 1) + F(i - 1, j - 1, k + 1) + F(i + 1, j - 1, k - 1) +
63 F(i + 1, j - 1, k + 1) +
64 2.0_rt *
65 (F(i - 1, j - 1, k) + F(i + 1, j - 1, k) + F(i, j - 1, k - 1) + F(i, j - 1, k + 1)) +
66 4.0_rt * F(i, j - 1, k);
67 mm2 = F(i - 1, j + 1, k - 1) + F(i - 1, j + 1, k + 1) + F(i + 1, j + 1, k - 1) +
68 F(i + 1, j + 1, k + 1) +
69 2.0_rt *
70 (F(i - 1, j + 1, k) + F(i + 1, j + 1, k) + F(i, j + 1, k - 1) + F(i, j + 1, k + 1)) +
71 4.0_rt * F(i, j + 1, k);
72 my = mm1 - mm2;
73
74 mm1 = F(i - 1, j - 1, k - 1) + F(i - 1, j + 1, k - 1) + F(i + 1, j - 1, k - 1) +
75 F(i + 1, j + 1, k - 1) +
76 2.0_rt *
77 (F(i - 1, j, k - 1) + F(i + 1, j, k - 1) + F(i, j - 1, k - 1) + F(i, j + 1, k - 1)) +
78 4.0_rt * F(i, j, k - 1);
79 mm2 = F(i - 1, j - 1, k + 1) + F(i - 1, j + 1, k + 1) + F(i + 1, j - 1, k + 1) +
80 F(i + 1, j + 1, k + 1) +
81 2.0_rt *
82 (F(i - 1, j, k + 1) + F(i + 1, j, k + 1) + F(i, j - 1, k + 1) + F(i, j + 1, k + 1)) +
83 4.0_rt * F(i, j, k + 1);
84 mz = mm1 - mm2;
85}
86
87/**
88 * \brief Mixed Youngs-Centered normal (3D). Returns an L1-normalized
89 * normal pointing out of the liquid.
90 */
92 const int j,
93 const int k,
95 amrex::Real& mx,
96 amrex::Real& my,
97 amrex::Real& mz) {
98 // m[c][d]: candidate c (0-2 centered height-function schemes along x, y,
99 // z, 3 Youngs), component d
100 amrex::Real m[4][3];
101
102 // Centered scheme with x as the height direction:
103 // sgn(mx) X = my Y + mz Z + alpha
104 amrex::Real m1 = F(i - 1, j, k - 1) + F(i - 1, j, k + 1) + F(i - 1, j - 1, k) +
105 F(i - 1, j + 1, k) + F(i - 1, j, k);
106 amrex::Real m2 = F(i + 1, j, k - 1) + F(i + 1, j, k + 1) + F(i + 1, j - 1, k) +
107 F(i + 1, j + 1, k) + F(i + 1, j, k);
108 m[0][0] = (m1 > m2) ? 1.0_rt : -1.0_rt;
109 m1 = F(i - 1, j - 1, k) + F(i + 1, j - 1, k) + F(i, j - 1, k);
110 m2 = F(i - 1, j + 1, k) + F(i + 1, j + 1, k) + F(i, j + 1, k);
111 m[0][1] = 0.5_rt * (m1 - m2);
112 m1 = F(i - 1, j, k - 1) + F(i + 1, j, k - 1) + F(i, j, k - 1);
113 m2 = F(i - 1, j, k + 1) + F(i + 1, j, k + 1) + F(i, j, k + 1);
114 m[0][2] = 0.5_rt * (m1 - m2);
115
116 // y as the height direction
117 m1 = F(i - 1, j - 1, k) + F(i - 1, j + 1, k) + F(i - 1, j, k);
118 m2 = F(i + 1, j - 1, k) + F(i + 1, j + 1, k) + F(i + 1, j, k);
119 m[1][0] = 0.5_rt * (m1 - m2);
120 m1 = F(i, j - 1, k - 1) + F(i, j - 1, k + 1) + F(i + 1, j - 1, k) + F(i - 1, j - 1, k) +
121 F(i, j - 1, k);
122 m2 = F(i, j + 1, k - 1) + F(i, j + 1, k + 1) + F(i + 1, j + 1, k) + F(i - 1, j + 1, k) +
123 F(i, j + 1, k);
124 m[1][1] = (m1 > m2) ? 1.0_rt : -1.0_rt;
125 m1 = F(i, j - 1, k - 1) + F(i, j, k - 1) + F(i, j + 1, k - 1);
126 m2 = F(i, j - 1, k + 1) + F(i, j, k + 1) + F(i, j + 1, k + 1);
127 m[1][2] = 0.5_rt * (m1 - m2);
128
129 // z as the height direction
130 m1 = F(i - 1, j, k - 1) + F(i - 1, j, k + 1) + F(i - 1, j, k);
131 m2 = F(i + 1, j, k - 1) + F(i + 1, j, k + 1) + F(i + 1, j, k);
132 m[2][0] = 0.5_rt * (m1 - m2);
133 m1 = F(i, j - 1, k - 1) + F(i, j - 1, k + 1) + F(i, j - 1, k);
134 m2 = F(i, j + 1, k - 1) + F(i, j + 1, k + 1) + F(i, j + 1, k);
135 m[2][1] = 0.5_rt * (m1 - m2);
136 m1 = F(i - 1, j, k - 1) + F(i + 1, j, k - 1) + F(i, j - 1, k - 1) + F(i, j + 1, k - 1) +
137 F(i, j, k - 1);
138 m2 = F(i - 1, j, k + 1) + F(i + 1, j, k + 1) + F(i, j - 1, k + 1) + F(i, j + 1, k + 1) +
139 F(i, j, k + 1);
140 m[2][2] = (m1 > m2) ? 1.0_rt : -1.0_rt;
141
142 // L1-normalize the centered candidates and keep the one whose height
143 // direction dominates
144 for (int c = 0; c < 3; ++c) {
145 const amrex::Real t = std::abs(m[c][0]) + std::abs(m[c][1]) + std::abs(m[c][2]);
146 for (int d = 0; d < 3; ++d) {
147 m[c][d] /= t;
148 }
149 }
150 int cn = 0;
151 amrex::Real t0 = std::abs(m[0][0]);
152 if (std::abs(m[1][1]) > t0) {
153 t0 = std::abs(m[1][1]);
154 cn = 1;
155 }
156 if (std::abs(m[2][2]) > t0) {
157 cn = 2;
158 }
159
160 // Youngs candidate
161 constexpr amrex::Real tiny = std::numeric_limits<amrex::Real>::epsilon();
162 youngs_normal(i, j, k, F, m[3][0], m[3][1], m[3][2]);
163 amrex::Real t = std::abs(m[3][0]) + std::abs(m[3][1]) + std::abs(m[3][2]) + tiny;
164 for (int d = 0; d < 3; ++d) {
165 m[3][d] /= t;
166 }
167
168 // Youngs wins when its largest component is smaller than the centered
169 // scheme's height component (interface not aligned with a grid plane)
170 t = amrex::max(std::abs(m[3][0]), std::abs(m[3][1]), std::abs(m[3][2]));
171 if (std::abs(m[cn][cn]) > t && t > 0.0_rt) {
172 cn = 3;
173 }
174
175 mx = m[cn][0];
176 my = m[cn][1];
177 mz = m[cn][2];
178}
179#else
180/**
181 * \brief Youngs' finite-difference normal on the 9-point stencil, scaled
182 * by -8 (i.e. m = -8 grad F).
183 */
185youngs_normal(const int i,
186 const int j,
187 const int k,
189 amrex::Real& mx,
190 amrex::Real& my,
191 amrex::Real& mz) {
192 mx = (F(i - 1, j - 1, k) + 2.0_rt * F(i - 1, j, k) + F(i - 1, j + 1, k)) -
193 (F(i + 1, j - 1, k) + 2.0_rt * F(i + 1, j, k) + F(i + 1, j + 1, k));
194 my = (F(i - 1, j - 1, k) + 2.0_rt * F(i, j - 1, k) + F(i + 1, j - 1, k)) -
195 (F(i - 1, j + 1, k) + 2.0_rt * F(i, j + 1, k) + F(i + 1, j + 1, k));
196 mz = 0.0_rt;
197}
198
199/**
200 * \brief Mixed Youngs-Centered normal (2D). Returns an L1-normalized
201 * normal pointing out of the liquid.
202 */
204 const int j,
205 const int k,
207 amrex::Real& mx,
208 amrex::Real& my,
209 amrex::Real& mz) {
210 // m[c][d]: candidate c (0-1 centered height-function schemes along x, y,
211 // 2 Youngs), component d
212 amrex::Real m[3][2];
213
214 // Column / row sums
215 const amrex::Real cL = F(i - 1, j - 1, k) + F(i - 1, j, k) + F(i - 1, j + 1, k);
216 const amrex::Real cR = F(i + 1, j - 1, k) + F(i + 1, j, k) + F(i + 1, j + 1, k);
217 const amrex::Real rB = F(i - 1, j - 1, k) + F(i, j - 1, k) + F(i + 1, j - 1, k);
218 const amrex::Real rT = F(i - 1, j + 1, k) + F(i, j + 1, k) + F(i + 1, j + 1, k);
219
220 // x as the height direction: sgn(mx) X = my Y + alpha
221 m[0][0] = (cL > cR) ? 1.0_rt : -1.0_rt;
222 m[0][1] = 0.5_rt * (rB - rT);
223 // y as the height direction: sgn(my) Y = mx X + alpha
224 m[1][0] = 0.5_rt * (cL - cR);
225 m[1][1] = (rB > rT) ? 1.0_rt : -1.0_rt;
226
227 for (int c = 0; c < 2; ++c) {
228 const amrex::Real t = std::abs(m[c][0]) + std::abs(m[c][1]);
229 m[c][0] /= t;
230 m[c][1] /= t;
231 }
232 int cn = (std::abs(m[1][1]) > std::abs(m[0][0])) ? 1 : 0;
233
234 constexpr amrex::Real tiny = std::numeric_limits<amrex::Real>::epsilon();
235 amrex::Real mzy = 0.0_rt;
236 youngs_normal(i, j, k, F, m[2][0], m[2][1], mzy);
237 amrex::Real t = std::abs(m[2][0]) + std::abs(m[2][1]) + tiny;
238 m[2][0] /= t;
239 m[2][1] /= t;
240
241 t = amrex::max(std::abs(m[2][0]), std::abs(m[2][1]));
242 if (std::abs(m[cn][cn]) > t && t > 0.0_rt) {
243 cn = 2;
244 }
245
246 mx = m[cn][0];
247 my = m[cn][1];
248 mz = 0.0_rt;
249}
250#endif
251
252/**
253 * \brief Height-function normal with height direction d: the liquid heights
254 * of the 7-cell columns through (i,j,k) and its neighbors in the
255 * tangential directions, differenced centrally. Exact for a planar
256 * interface whose slope relative to d is at most 1, which holds for
257 * the dominant normal direction. Returns false (m untouched) unless
258 * each column, the center one included, crosses the interface once:
259 * from pure liquid to pure gas in the orientation of the center
260 * column, with F monotone in between. A thin gas gap with a liquid
261 * sliver inside a column is not a height, and the caller falls back to
262 * another normal.
263 */
265height_normal(const int i,
266 const int j,
267 const int k,
268 const int d,
270 amrex::Real m[3]) {
272 const amrex::IntVect iv(AMREX_D_DECL(i, j, k));
274 // +1 for liquid on the low side
275 const amrex::Real sigma = (F(iv - hf_half * ed) > F(iv + hf_half * ed)) ? 1.0_rt : -1.0_rt;
276 // False unless F is monotone along the column, from pure liquid to pure gas
277 const auto column = [&](const amrex::IntVect& c, amrex::Real& H) {
278 const auto liquid = [&](const int s) {
279 const amrex::Real f = F(c + s * ed);
280 return (sigma > 0.0_rt) ? f : 1.0_rt - f;
281 };
282 if (liquid(-hf_half) < 1.0_rt - hf_pure_tol || liquid(hf_half) > hf_pure_tol) {
283 return false;
284 }
285 H = 0.0_rt;
286 amrex::Real prev = 1.0_rt;
287 for (int s = -hf_half; s <= hf_half; ++s) {
288 const amrex::Real l = liquid(s);
289 if (l > prev + hf_pure_tol) {
290 return false;
291 }
292 prev = l;
293 H += F(c + s * ed);
294 }
295 return true;
296 };
297 amrex::Real Hc = 0.0_rt;
298 if (!column(iv, Hc)) {
299 return false;
300 }
301 amrex::Real mt[3] = {0.0_rt, 0.0_rt, 0.0_rt};
302 for (int t = 0; t < AMREX_SPACEDIM; ++t) {
303 if (t == d) {
304 continue;
305 }
307 amrex::Real Hm = 0.0_rt;
308 amrex::Real Hp = 0.0_rt;
309 if (!column(iv - et, Hm) || !column(iv + et, Hp)) {
310 return false;
311 }
312 // m = grad(x_d - h) (sigma = 1) or grad(h - x_d): m_t = (H- - H+) / 2
313 mt[t] = 0.5_rt * (Hm - Hp);
314 }
315 mt[d] = sigma;
316 for (int a = 0; a < 3; ++a) {
317 m[a] = mt[a];
318 }
319 return true;
320}
321
322//-----------------------------------------------------------------------------
323// Normal schemes.
324//
325// To add one, write a struct like these and give it a name in dispatch_normal below. Nothing else
326// in the PLIC directory depends on which scheme is in use. A scheme has
327//
328// static constexpr int stencil;
329// The largest distance, in cells along any direction, from (i,j,k) that normal() reads. It
330// sets the ghost cells needed in F (PLIC::nGrowF).
331//
332// static void normal(i, j, k, F, mx, my, mz);
333// The normal in cell (i,j,k), pointing out of the liquid, in unit-cube cell coordinates, at any
334// scale. It is called in mixed cells only. A null normal is replaced by an arbitrary one.
335//-----------------------------------------------------------------------------
336
337/** \brief Youngs' finite-difference normal. */
338struct Youngs {
339 static constexpr int stencil = 1;
340
342 normal(const int i,
343 const int j,
344 const int k,
346 amrex::Real& mx,
347 amrex::Real& my,
348 amrex::Real& mz) noexcept {
349 youngs_normal(i, j, k, F, mx, my, mz);
350 }
351};
352
353/** \brief Mixed Youngs-Centered normal (Aulisa et al., JCP 225, 2007). */
355 static constexpr int stencil = 1;
356
358 normal(const int i,
359 const int j,
360 const int k,
362 amrex::Real& mx,
363 amrex::Real& my,
364 amrex::Real& mz) noexcept {
365 myc_normal(i, j, k, F, mx, my, mz);
366 }
367};
368
369/**
370 * \brief The height-function normal along the dominant direction of the Mixed Youngs-Centered
371 * normal, or the latter where the heights are not defined (thin or strongly curved
372 * structures). Exact for a planar interface wherever the heights are defined.
373 */
375 static constexpr int stencil = hf_half;
376
378 normal(const int i,
379 const int j,
380 const int k,
382 amrex::Real& mx,
383 amrex::Real& my,
384 amrex::Real& mz) noexcept {
385 myc_normal(i, j, k, F, mx, my, mz);
386 const amrex::Real am[3] = {std::abs(mx), std::abs(my), std::abs(mz)};
387 int d = (am[1] > am[0]) ? 1 : 0;
388 if (AMREX_SPACEDIM == 3 && am[2] > am[d]) {
389 d = 2;
390 }
391 amrex::Real mh[3];
392 if (height_normal(i, j, k, d, F, mh)) {
393 mx = mh[0];
394 my = mh[1];
395 mz = mh[2];
396 }
397 }
398};
399
400/**
401 * \brief Reconstruct the PLIC plane m.x = alpha in cell (i,j,k), in unit-cube cell coordinates with
402 * sum|m| = 1. Reads up to Normal::stencil cells away. Only meaningful in mixed cells
403 * (is_mixed).
404 *
405 * \tparam Normal the normal scheme
406 */
407template <typename Normal>
409 const int j,
410 const int k,
412 amrex::Real& mx,
413 amrex::Real& my,
414 amrex::Real& mz,
415 amrex::Real& alpha) {
416 Normal::normal(i, j, k, F, mx, my, mz);
417
418 // An isolated blob can produce a null normal: pick an arbitrary one
419 amrex::Real norm = std::abs(mx) + std::abs(my) + std::abs(mz);
420 if (norm <= std::numeric_limits<amrex::Real>::epsilon()) {
421 mx = 1.0_rt;
422 my = 0.0_rt;
423 mz = 0.0_rt;
424 norm = 1.0_rt;
425 }
426 mx /= norm;
427 my /= norm;
428 mz /= norm;
429
430 alpha = volume_intercept(std::abs(mx), std::abs(my), std::abs(mz), F(i, j, k));
431
432 // Back from the reflected (all positive) frame to the cell frame
433 alpha += amrex::min(0.0_rt, mx) + amrex::min(0.0_rt, my) + amrex::min(0.0_rt, mz);
434}
435
436[[noreturn]] inline void unknown_reconstruction(std::string const& reconstruction) {
437 amrex::Abort("Unknown reconstruction: " + reconstruction +
438 " (expected youngs, myc or myc_height)");
439 std::terminate();
440}
441
442/**
443 * \brief Call fn with the normal scheme of a reconstruction name, as fn(Normal{}), and return what it
444 * returns. The one place that names the schemes; it aborts on an unknown name. Each path
445 * calls fn once, so it is forwarded there.
446 */
447template <typename Fn>
448decltype(auto) dispatch_normal(std::string const& reconstruction, Fn&& fn) {
449 if (reconstruction == "youngs") {
450 return std::forward<Fn>(fn)(Youngs{});
451 }
452 if (reconstruction == "myc") {
453 return std::forward<Fn>(fn)(MixedYoungsCentered{});
454 }
455 if (reconstruction != "myc_height") {
456 unknown_reconstruction(reconstruction);
457 }
458 return std::forward<Fn>(fn)(HeightFunctionMYC{});
459}
460
461} // namespace PLIC
462
463#endif
464/** @}*/
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
#define AMREX_D_DECL(a, b, c)
__host__ static __device__ constexpr IntVectND< dim > TheDimensionVector(int d) noexcept
amrex_real Real
ArrayND< T, 4, true > Array4
__host__ __device__ constexpr const T & min(const T &a, const T &b) noexcept
__host__ __device__ constexpr const T & max(const T &a, const T &b) noexcept
Definition hydro_plic.cpp:9
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void myc_normal(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz)
Mixed Youngs-Centered normal (2D). Returns an L1-normalized normal pointing out of the liquid.
Definition hydro_plic_normals_K.H:203
void unknown_reconstruction(std::string const &reconstruction)
Definition hydro_plic_normals_K.H:436
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void fit_plane(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz, amrex::Real &alpha)
Reconstruct the PLIC plane m.x = alpha in cell (i,j,k), in unit-cube cell coordinates with sum|m| = 1...
Definition hydro_plic_normals_K.H:408
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void youngs_normal(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz)
Youngs' finite-difference normal on the 9-point stencil, scaled by -8 (i.e. m = -8 grad F).
Definition hydro_plic_normals_K.H:185
decltype(auto) dispatch_normal(std::string const &reconstruction, Fn &&fn)
Call fn with the normal scheme of a reconstruction name, as fn(Normal{}), and return what it returns....
Definition hydro_plic_normals_K.H:448
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool height_normal(const int i, const int j, const int k, const int d, amrex::Array4< amrex::Real const > const &F, amrex::Real m[3])
Height-function normal with height direction d: the liquid heights of the 7-cell columns through (i,...
Definition hydro_plic_normals_K.H:265
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real volume_intercept(const amrex::Real b1, const amrex::Real b2, const amrex::Real b3, const amrex::Real volF)
Analytic plane constant alpha such that the region m1*x1 + m2*x2 + m3*x3 <= alpha of the unit cube ha...
Definition hydro_plic_K.H:84
static constexpr int hf_half
Definition hydro_plic_normals_K.H:29
static constexpr amrex::Real hf_pure_tol
Definition hydro_plic_normals_K.H:34
__host__ __device__ void ignore_unused(const Ts &...)
IntVectND< 3 > IntVect
void Abort(const std::string &msg)
The height-function normal along the dominant direction of the Mixed Youngs-Centered normal,...
Definition hydro_plic_normals_K.H:374
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void normal(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
Definition hydro_plic_normals_K.H:378
static constexpr int stencil
Definition hydro_plic_normals_K.H:375
Mixed Youngs-Centered normal (Aulisa et al., JCP 225, 2007).
Definition hydro_plic_normals_K.H:354
static constexpr int stencil
Definition hydro_plic_normals_K.H:355
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void normal(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
Definition hydro_plic_normals_K.H:358
Youngs' finite-difference normal.
Definition hydro_plic_normals_K.H:338
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void normal(const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &F, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
Definition hydro_plic_normals_K.H:342
static constexpr int stencil
Definition hydro_plic_normals_K.H:339