ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
erf_detail_ShocImplicit Namespace Reference

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_zvir () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_u_ws_min () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_ksrf_min () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_ustar_min () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_min_tke () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_max_tke () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_min_qw () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real weighted_linear_interp (Real x0, Real x1, Real y0, Real y1, Real x)
 
void interpolate_cc_to_iface (const ShocColumnData &col, const FArrayBox &cc_in, FArrayBox &iface_out)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real interface_spacing (const Array4< const Real > &zt, const Array4< const Real > &zi, const ShocColumnLayout &layout, int ic, int k)
 

Function Documentation

◆ interface_spacing()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::interface_spacing ( const Array4< const Real > &  zt,
const Array4< const Real > &  zi,
const ShocColumnLayout &  layout,
int  ic,
int  k 
)
71  {
72  if (k <= 0) {
73  return amrex::max(zt(ic,0,0) - zi(ic,0,0), 1.0e-12_rt);
74  }
75  if (k >= layout.nlev) {
76  return amrex::max(zi(ic,layout.nlev,0) - zt(ic,layout.nlev-1,0), 1.0e-12_rt);
77  }
78  return amrex::max(zt(ic,k,0) - zt(ic,k-1,0), 1.0e-12_rt);
79  }
@ zi
Definition: ERF_AdvanceWDM6.cpp:277
int nlev
Definition: ERF_ShocTypes.H:62

Referenced by ShocImplicit::advance_implicit_state(), and ShocImplicit::compute_tmpi().

Here is the caller graph for this function:

◆ interpolate_cc_to_iface()

void erf_detail_ShocImplicit::interpolate_cc_to_iface ( const ShocColumnData &  col,
const FArrayBox &  cc_in,
FArrayBox &  iface_out 
)
36  {
37  const auto zt = col.zt.const_array();
38  const auto zi = col.zi.const_array();
39  const auto in = cc_in.const_array();
40  auto out = iface_out.array();
41  const auto layout = col.layout;
42  const Box col_box(IntVect(0,0,0), IntVect(layout.ncell - 1, 0, 0));
43  ParallelFor(col_box, [=] AMREX_GPU_DEVICE (int ic, int, int) noexcept
44  {
45  if (layout.nlev == 1) {
46  out(ic,0,0) = in(ic,0,0);
47  out(ic,1,0) = in(ic,0,0);
48  return;
49  }
50 
51  out(ic,0,0) = weighted_linear_interp(zt(ic,0,0), zt(ic,1,0),
52  in(ic,0,0), in(ic,1,0),
53  zi(ic,0,0));
54  for (int k = 1; k < layout.nlev; ++k) {
55  out(ic,k,0) = weighted_linear_interp(zt(ic,k-1,0), zt(ic,k,0),
56  in(ic,k-1,0), in(ic,k,0),
57  zi(ic,k,0));
58  }
59  out(ic,layout.nlev,0) =
60  weighted_linear_interp(zt(ic,layout.nlev-2,0), zt(ic,layout.nlev-1,0),
61  in(ic,layout.nlev-2,0), in(ic,layout.nlev-1,0),
62  zi(ic,layout.nlev,0));
63  });
64  }
ParallelFor(fab_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real weighted_linear_interp(Real x0, Real x1, Real y0, Real y1, Real x)
Definition: ERF_ShocImplicit.cpp:24
ShocColumnLayout layout
Definition: ERF_ShocTypes.H:71
amrex::FArrayBox zi
Definition: ERF_ShocTypes.H:75
amrex::FArrayBox zt
Definition: ERF_ShocTypes.H:74

Referenced by ShocImplicit::advance_implicit_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shoc_ksrf_min()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_ksrf_min ( )
noexcept
18 { return 1.0e-4_rt; }

Referenced by ShocImplicit::advance_implicit_state().

Here is the caller graph for this function:

◆ shoc_max_tke()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_max_tke ( )
noexcept
21 { return 50.0_rt; }

Referenced by ShocImplicit::advance_implicit_state().

Here is the caller graph for this function:

◆ shoc_min_qw()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_min_qw ( )
noexcept
22 { return 0.0_rt; }

Referenced by ShocImplicit::advance_implicit_state(), and ShocImplicit::finalize_from_pdf().

Here is the caller graph for this function:

◆ shoc_min_tke()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_min_tke ( )
noexcept
20 { return 4.0e-4_rt; }

Referenced by ShocImplicit::advance_implicit_state(), and ShocStructure::diagnose_length_and_brunt().

Here is the caller graph for this function:

◆ shoc_u_ws_min()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_u_ws_min ( )
noexcept
17 { return 1.0_rt; }

Referenced by ShocImplicit::advance_implicit_state().

Here is the caller graph for this function:

◆ shoc_ustar_min()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_ustar_min ( )
noexcept
19 { return 0.01_rt; }

Referenced by ShocImplicit::advance_implicit_state().

Here is the caller graph for this function:

◆ shoc_zvir()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::shoc_zvir ( )
noexcept
16 { return 0.61_rt; }

Referenced by ShocStructure::diagnose_surface_layer(), and ShocImplicit::finalize_from_pdf().

Here is the caller graph for this function:

◆ weighted_linear_interp()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real erf_detail_ShocImplicit::weighted_linear_interp ( Real  x0,
Real  x1,
Real  y0,
Real  y1,
Real  x 
)
25  {
26  const Real denom = x1 - x0;
27  if (amrex::Math::abs(denom) <= 1.0e-12_rt) {
28  return 0.5_rt * (y0 + y1);
29  }
30  return y0 + (y1 - y0) * (x - x0) / denom;
31  }

Referenced by interpolate_cc_to_iface().

Here is the caller graph for this function: