AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
Loading...
Searching...
No Matches
hydro_plic_normals_K.H File Reference
#include <hydro_plic_K.H>
#include <AMReX.H>
#include <exception>
#include <string>
#include <utility>
Include dependency graph for hydro_plic_normals_K.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PLIC::Youngs
 Youngs' finite-difference normal. More...
struct  PLIC::MixedYoungsCentered
 Mixed Youngs-Centered normal (Aulisa et al., JCP 225, 2007). More...
struct  PLIC::HeightFunctionMYC
 The height-function normal along the dominant direction of the Mixed Youngs-Centered normal, or the latter where the heights are not defined (thin or strongly curved structures). Exact for a planar interface wherever the heights are defined. More...

Namespaces

namespace  PLIC

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PLIC::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).
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PLIC::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.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool PLIC::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,j,k) and its neighbors in the tangential directions, differenced centrally. Exact for a planar interface whose slope relative to d is at most 1, which holds for the dominant normal direction. Returns false (m untouched) unless each column, the center one included, crosses the interface once: from pure liquid to pure gas in the orientation of the center column, with F monotone in between. A thin gas gap with a liquid sliver inside a column is not a height, and the caller falls back to another normal.
template<typename Normal>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PLIC::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. Reads up to Normal::stencil cells away. Only meaningful in mixed cells (is_mixed).
void PLIC::unknown_reconstruction (std::string const &reconstruction)
template<typename Fn>
decltype(auto) PLIC::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. The one place that names the schemes; it aborts on an unknown name. Each path calls fn once, so it is forwarded there.

Variables

static constexpr int PLIC::hf_half = 3
static constexpr amrex::Real PLIC::hf_pure_tol = 1.0e-6_rt

Detailed Description

Interface normals of the PLIC reconstruction, and the plane fit that takes one of them as a template parameter. The comment above the schemes below says how to add one.

The Mixed Youngs-Centered normal is that of Aulisa et al. (JCP 225, 2007). Derived from Kynema-SGF (formerly AMR-Wind), src/equation_systems/vof, BSD 3-Clause License, Copyright (c) 2020, Alliance for Energy Innovation and Regents of the University of California.