ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ShocImplicit Class Reference

#include <ERF_ShocImplicit.H>

Static Public Member Functions

static void cache_baseline_state (ShocColumnData &col)
 
static void compute_tmpi (const ShocColumnData &col, int ic, amrex::Real dt, const amrex::Vector< amrex::Real > &rho_zi, amrex::Vector< amrex::Real > &tmpi)
 
static void compute_dp_inverse (const ShocColumnData &col, int ic, amrex::Vector< amrex::Real > &rdp_zt)
 
static AMREX_GPU_HOST_DEVICE amrex::Real compute_temperature (amrex::Real thetal, amrex::Real ql, amrex::Real exner)
 
static AMREX_GPU_HOST_DEVICE amrex::Real compute_vapor (amrex::Real qw, amrex::Real ql)
 
static void advance_implicit_state (ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dt)
 
static void finalize_from_pdf (ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dt)
 
static void update_prognostics (ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dt)
 

Member Function Documentation

◆ advance_implicit_state()

void ShocImplicit::advance_implicit_state ( ShocColumnData col,
const ShocRuntimeOptions opts,
amrex::Real  dt 
)
static
169 {
170  AMREX_ALWAYS_ASSERT(dt > 0.0);
171  static_cast<void>(opts);
172 
173  const int nlev = col.layout.nlev;
174  if (nlev == 0) {
175  return;
176  }
177 
178  const Box iface_box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, nlev, 0));
179  const Box tri_box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, 0, nlev - 1));
180  FArrayBox rho_zi_fab(iface_box, 1, The_Async_Arena());
181  FArrayBox tk_zi_fab(iface_box, 1, The_Async_Arena());
182  FArrayBox tkh_zi_fab(iface_box, 1, The_Async_Arena());
183  FArrayBox tmpi_fab(iface_box, 1, The_Async_Arena());
184  FArrayBox rdp_zt_fab(Box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, nlev - 1, 0)), 1, The_Async_Arena());
185  FArrayBox rhs_fab(tri_box, 1, The_Async_Arena());
186  FArrayBox soln_fab(tri_box, 1, The_Async_Arena());
187  FArrayBox coeffA_fab(tri_box, 1, The_Async_Arena());
188  FArrayBox coeffB_fab(tri_box, 1, The_Async_Arena());
189  FArrayBox inv_coeffB_fab(tri_box, 1, The_Async_Arena());
190  FArrayBox coeffC_fab(tri_box, 1, The_Async_Arena());
191 
192  interpolate_cc_to_iface(col, col.rho, rho_zi_fab);
193  interpolate_cc_to_iface(col, col.tk, tk_zi_fab);
194  interpolate_cc_to_iface(col, col.tkh, tkh_zi_fab);
195 
196  auto thetal = col.thetal.array();
197  auto qw = col.qw.array();
198  auto tke = col.tke.array();
199  auto u = col.u.array();
200  auto v = col.v.array();
201 
202  const auto surf_tau_u = col.surf_tau_u.const_array();
203  const auto surf_tau_v = col.surf_tau_v.const_array();
204  const auto surf_sens_flux = col.surf_sens_flux.const_array();
205  const auto surf_lat_flux = col.surf_lat_flux.const_array();
206  const auto rho = col.rho.const_array();
207  const auto dz = col.dz.const_array();
208  const auto zt = col.zt.const_array();
209  const auto zi = col.zi.const_array();
210  const auto rho_zi = rho_zi_fab.const_array();
211  const auto tk_zi = tk_zi_fab.const_array();
212  const auto tkh_zi = tkh_zi_fab.const_array();
213  const auto layout = col.layout;
214  auto tmpi = tmpi_fab.array();
215  auto rdp_zt = rdp_zt_fab.array();
216  auto rhs = rhs_fab.array();
217  auto soln = soln_fab.array();
218  auto coeffA = coeffA_fab.array();
219  auto coeffB = coeffB_fab.array();
220  auto inv_coeffB = inv_coeffB_fab.array();
221  auto coeffC = coeffC_fab.array();
222 
223  const Box col_box(IntVect(0,0,0), IntVect(layout.ncell - 1, 0, 0));
224  ParallelFor(col_box, [=] AMREX_GPU_DEVICE (int ic, int, int) noexcept
225  {
226  for (int k = 0; k <= nlev; ++k) {
227  tmpi(ic,k,0) = dt * CONST_GRAV * amrex::max(rho_zi(ic,k,0), 1.0e-12_rt) /
228  interface_spacing(zt, zi, layout, ic, k);
229  if (k < nlev) {
230  rdp_zt(ic,k,0) = 1.0_rt / amrex::max(CONST_GRAV * rho(ic,k,0) * dz(ic,k,0), 1.0e-12_rt);
231  }
232  }
233 
234  // E3SM: cmnfac = dtime * g * rho_zi(nlevi-1) * rdp_zt(nlev-1)
235  // The tmpi array includes a 1/dz_zi interface-spacing factor that
236  // belongs only in the tridiagonal diffusion matrix, NOT in the
237  // explicit surface-flux injection.
238  const Real cmnfac = dt * CONST_GRAV * amrex::max(rho_zi(ic,0,0), 1.0e-12_rt) * rdp_zt(ic,0,0);
239 
240  const Real uw_sfc = surf_tau_u(ic,0,0);
241  const Real vw_sfc = surf_tau_v(ic,0,0);
242  const Real stress_mag = std::sqrt(uw_sfc * uw_sfc + vw_sfc * vw_sfc);
243  Real ksrf = 0.0_rt;
244  Real wtke_sfc = 0.0_rt;
245  if (stress_mag > 1.0e-12_rt) {
246  const Real ws = amrex::max(std::sqrt(u(ic,0,0) * u(ic,0,0) + v(ic,0,0) * v(ic,0,0)), shoc_u_ws_min());
247  const Real rho_zi_sfc = amrex::max(rho_zi(ic,0,0), 1.0e-12_rt);
248  const Real tau_u = rho_zi_sfc * uw_sfc;
249  const Real tau_v = rho_zi_sfc * vw_sfc;
250  const Real tau = std::sqrt(tau_u * tau_u + tau_v * tau_v);
251  ksrf = amrex::max(tau / ws, shoc_ksrf_min());
252  const Real ustar = amrex::max(std::sqrt(stress_mag), shoc_ustar_min());
253  wtke_sfc = ustar * ustar * ustar;
254  }
255 
256  for (int k = 0; k < nlev; ++k) {
257  rhs(ic,0,k) = u(ic,k,0);
258  coeffA(ic,0,k) = (k > 0) ? -tk_zi(ic,k,0) * tmpi(ic,k,0) * rdp_zt(ic,k,0) : 0.0_rt;
259  coeffC(ic,0,k) = (k < nlev - 1) ? -tk_zi(ic,k+1,0) * tmpi(ic,k+1,0) * rdp_zt(ic,k,0) : 0.0_rt;
260  coeffB(ic,0,k) = 1.0_rt - coeffA(ic,0,k) - coeffC(ic,0,k);
261  }
262  coeffB(ic,0,0) += ksrf * dt * CONST_GRAV * rdp_zt(ic,0,0);
263  SolveTridiag(ic, 0, 0, nlev - 1, soln, coeffA, coeffB, inv_coeffB, coeffC, rhs);
264  for (int k = 0; k < nlev; ++k) {
265  u(ic,k,0) = soln(ic,0,k);
266  }
267 
268  for (int k = 0; k < nlev; ++k) {
269  rhs(ic,0,k) = v(ic,k,0);
270  coeffA(ic,0,k) = (k > 0) ? -tk_zi(ic,k,0) * tmpi(ic,k,0) * rdp_zt(ic,k,0) : 0.0_rt;
271  coeffC(ic,0,k) = (k < nlev - 1) ? -tk_zi(ic,k+1,0) * tmpi(ic,k+1,0) * rdp_zt(ic,k,0) : 0.0_rt;
272  coeffB(ic,0,k) = 1.0_rt - coeffA(ic,0,k) - coeffC(ic,0,k);
273  }
274  coeffB(ic,0,0) += ksrf * dt * CONST_GRAV * rdp_zt(ic,0,0);
275  SolveTridiag(ic, 0, 0, nlev - 1, soln, coeffA, coeffB, inv_coeffB, coeffC, rhs);
276  for (int k = 0; k < nlev; ++k) {
277  v(ic,k,0) = soln(ic,0,k);
278  }
279 
280  for (int k = 0; k < nlev; ++k) {
281  rhs(ic,0,k) = thetal(ic,k,0);
282  coeffA(ic,0,k) = (k > 0) ? -tkh_zi(ic,k,0) * tmpi(ic,k,0) * rdp_zt(ic,k,0) : 0.0_rt;
283  coeffC(ic,0,k) = (k < nlev - 1) ? -tkh_zi(ic,k+1,0) * tmpi(ic,k+1,0) * rdp_zt(ic,k,0) : 0.0_rt;
284  coeffB(ic,0,k) = 1.0_rt - coeffA(ic,0,k) - coeffC(ic,0,k);
285  }
286  rhs(ic,0,0) += cmnfac * surf_sens_flux(ic,0,0);
287  SolveTridiag(ic, 0, 0, nlev - 1, soln, coeffA, coeffB, inv_coeffB, coeffC, rhs);
288  for (int k = 0; k < nlev; ++k) {
289  thetal(ic,k,0) = soln(ic,0,k);
290  }
291 
292  for (int k = 0; k < nlev; ++k) {
293  rhs(ic,0,k) = qw(ic,k,0);
294  coeffA(ic,0,k) = (k > 0) ? -tkh_zi(ic,k,0) * tmpi(ic,k,0) * rdp_zt(ic,k,0) : 0.0_rt;
295  coeffC(ic,0,k) = (k < nlev - 1) ? -tkh_zi(ic,k+1,0) * tmpi(ic,k+1,0) * rdp_zt(ic,k,0) : 0.0_rt;
296  coeffB(ic,0,k) = 1.0_rt - coeffA(ic,0,k) - coeffC(ic,0,k);
297  }
298  rhs(ic,0,0) += cmnfac * surf_lat_flux(ic,0,0);
299  SolveTridiag(ic, 0, 0, nlev - 1, soln, coeffA, coeffB, inv_coeffB, coeffC, rhs);
300  for (int k = 0; k < nlev; ++k) {
301  qw(ic,k,0) = amrex::max(soln(ic,0,k), shoc_min_qw());
302  }
303 
304  for (int k = 0; k < nlev; ++k) {
305  rhs(ic,0,k) = shoc_clamp(tke(ic,k,0), shoc_min_tke(), shoc_max_tke());
306  coeffA(ic,0,k) = (k > 0) ? -tkh_zi(ic,k,0) * tmpi(ic,k,0) * rdp_zt(ic,k,0) : 0.0_rt;
307  coeffC(ic,0,k) = (k < nlev - 1) ? -tkh_zi(ic,k+1,0) * tmpi(ic,k+1,0) * rdp_zt(ic,k,0) : 0.0_rt;
308  coeffB(ic,0,k) = 1.0_rt - coeffA(ic,0,k) - coeffC(ic,0,k);
309  }
310  rhs(ic,0,0) += cmnfac * wtke_sfc;
311  SolveTridiag(ic, 0, 0, nlev - 1, soln, coeffA, coeffB, inv_coeffB, coeffC, rhs);
312  for (int k = 0; k < nlev; ++k) {
313  tke(ic,k,0) = shoc_clamp(soln(ic,0,k), shoc_min_tke(), shoc_max_tke());
314  }
315  });
316 }
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:53
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
rho
Definition: ERF_InitCustomPert_Bubble.H:106
ParallelFor(grown_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::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T shoc_clamp(T value, T lo, T hi)
Definition: ERF_ShocTypes.H:382
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SolveTridiag(int i, int j, int klo, int khi, const amrex::Array4< amrex::Real > &soln_a, const amrex::Array4< const amrex::Real > &coeffA_a, const amrex::Array4< amrex::Real > &coeffB_a, const amrex::Array4< amrex::Real > &inv_coeffB_a, const amrex::Array4< const amrex::Real > &coeffC_a, const amrex::Array4< const amrex::Real > &RHS_a)
Definition: ERF_SolveTridiag.H:6
@ dz
Definition: ERF_AdvanceWSM6.cpp:104
@ zi
Definition: ERF_AdvanceWSM6.cpp:133
amrex::FArrayBox dz
Definition: ERF_ShocTypes.H:210
amrex::FArrayBox tk
Definition: ERF_ShocTypes.H:236
amrex::FArrayBox surf_lat_flux
Definition: ERF_ShocTypes.H:277
amrex::FArrayBox rho
Definition: ERF_ShocTypes.H:213
amrex::FArrayBox surf_tau_v
Definition: ERF_ShocTypes.H:279
amrex::FArrayBox tke
Definition: ERF_ShocTypes.H:223
amrex::FArrayBox tkh
Definition: ERF_ShocTypes.H:237
ShocColumnLayout layout
Definition: ERF_ShocTypes.H:205
amrex::FArrayBox zi
Definition: ERF_ShocTypes.H:209
amrex::FArrayBox surf_sens_flux
Definition: ERF_ShocTypes.H:276
amrex::FArrayBox qw
Definition: ERF_ShocTypes.H:221
amrex::FArrayBox v
Definition: ERF_ShocTypes.H:225
amrex::FArrayBox zt
Definition: ERF_ShocTypes.H:208
amrex::FArrayBox u
Definition: ERF_ShocTypes.H:224
amrex::FArrayBox surf_tau_u
Definition: ERF_ShocTypes.H:278
amrex::FArrayBox thetal
Definition: ERF_ShocTypes.H:217
int nlev
Definition: ERF_ShocTypes.H:196
int ncell
Definition: ERF_ShocTypes.H:195

Referenced by ShocDriver::advance().

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

◆ cache_baseline_state()

void ShocImplicit::cache_baseline_state ( ShocColumnData col)
static
85 {
86  auto thetal = col.thetal.const_array();
87  auto theta = col.theta.const_array();
88  auto qv = col.qv.const_array();
89  auto qc = col.qc.const_array();
90  auto qi = col.qi.const_array();
91  auto u = col.u.const_array();
92  auto v = col.v.const_array();
93  auto tke = col.tke.const_array();
94 
95  auto thetal_base = col.thetal_base.array();
96  auto theta_base = col.theta_base.array();
97  auto qv_base = col.qv_base.array();
98  auto qc_base = col.qc_base.array();
99  auto qi_base = col.qi_base.array();
100  auto u_base = col.u_base.array();
101  auto v_base = col.v_base.array();
102  auto tke_base = col.tke_base_state.array();
103 
104  const Box cell_box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, col.layout.nlev - 1, 0));
105  ParallelFor(cell_box, [=] AMREX_GPU_DEVICE (int ic, int k, int) noexcept
106  {
107  thetal_base(ic,k,0) = thetal(ic,k,0);
108  theta_base(ic,k,0) = theta(ic,k,0);
109  qv_base(ic,k,0) = qv(ic,k,0);
110  qc_base(ic,k,0) = qc(ic,k,0);
111  qi_base(ic,k,0) = qi(ic,k,0);
112  u_base(ic,k,0) = u(ic,k,0);
113  v_base(ic,k,0) = v(ic,k,0);
114  tke_base(ic,k,0) = tke(ic,k,0);
115  });
116 }
@ theta
Definition: ERF_MM5.H:20
@ qv
Definition: ERF_Kessler.H:29
@ qc
Definition: ERF_SatAdj.H:40
@ qi
Definition: ERF_WSM6.H:26
amrex::FArrayBox theta
Definition: ERF_ShocTypes.H:214
amrex::FArrayBox theta_base
Definition: ERF_ShocTypes.H:261
amrex::FArrayBox qi
Definition: ERF_ShocTypes.H:220
amrex::FArrayBox v_base
Definition: ERF_ShocTypes.H:266
amrex::FArrayBox tke_base_state
Definition: ERF_ShocTypes.H:267
amrex::FArrayBox qv_base
Definition: ERF_ShocTypes.H:262
amrex::FArrayBox qc
Definition: ERF_ShocTypes.H:219
amrex::FArrayBox qi_base
Definition: ERF_ShocTypes.H:264
amrex::FArrayBox u_base
Definition: ERF_ShocTypes.H:265
amrex::FArrayBox qc_base
Definition: ERF_ShocTypes.H:263
amrex::FArrayBox qv
Definition: ERF_ShocTypes.H:218
amrex::FArrayBox thetal_base
Definition: ERF_ShocTypes.H:260

Referenced by ShocDriver::advance().

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

◆ compute_dp_inverse()

void ShocImplicit::compute_dp_inverse ( const ShocColumnData col,
int  ic,
amrex::Vector< amrex::Real > &  rdp_zt 
)
static
139 {
140  rdp_zt.assign(col.layout.nlev, 0.0);
141  const auto rho = col.rho.const_array();
142  const auto dz = col.dz.const_array();
143  for (int k = 0; k < col.layout.nlev; ++k) {
144  rdp_zt[k] = 1.0_rt / amrex::max(CONST_GRAV * rho(ic,k,0) * dz(ic,k,0), 1.0e-12_rt);
145  }
146 }

◆ compute_temperature()

AMREX_GPU_HOST_DEVICE Real ShocImplicit::compute_temperature ( amrex::Real  thetal,
amrex::Real  ql,
amrex::Real  exner 
)
static
153 {
154  return shoc::temperature_from_thetal(thetal, ql, 0.0_rt, exner);
155 }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real temperature_from_thetal(amrex::Real thetal, amrex::Real qc, amrex::Real qi, amrex::Real exner) noexcept
Definition: ERF_ShocThermoUtils.H:40
Here is the call graph for this function:

◆ compute_tmpi()

void ShocImplicit::compute_tmpi ( const ShocColumnData col,
int  ic,
amrex::Real  dt,
const amrex::Vector< amrex::Real > &  rho_zi,
amrex::Vector< amrex::Real > &  tmpi 
)
static
124 {
125  tmpi.assign(col.layout.nlev + 1, 0.0_rt);
126  const auto zt = col.zt.const_array();
127  const auto zi = col.zi.const_array();
128  const auto layout = col.layout;
129  for (int k = 0; k <= col.layout.nlev; ++k) {
130  tmpi[k] = dt * CONST_GRAV * amrex::max(rho_zi[k], 1.0e-12_rt) /
131  interface_spacing(zt, zi, layout, ic, k);
132  }
133 }

◆ compute_vapor()

AMREX_GPU_HOST_DEVICE Real ShocImplicit::compute_vapor ( amrex::Real  qw,
amrex::Real  ql 
)
static
161 {
162  return amrex::max(0.0_rt, qw - amrex::max(0.0_rt, ql));
163 }

◆ finalize_from_pdf()

void ShocImplicit::finalize_from_pdf ( ShocColumnData col,
const ShocRuntimeOptions opts,
amrex::Real  dt 
)
static
322 {
323  AMREX_ALWAYS_ASSERT(dt > 0.0);
324 
325  const int nlev = col.layout.nlev;
326  if (nlev == 0) {
327  return;
328  }
329 
330  auto thetal = col.thetal.array();
331  auto theta = col.theta.array();
332  auto theta_v = col.theta_v.array();
333  auto qv = col.qv.array();
334  auto qc = col.qc.array();
335  auto qi = col.qi.array();
336  auto qw = col.qw.array();
337  auto tabs = col.tabs.array();
338  auto host_dse = col.host_dse.array();
339  auto tke = col.tke.array();
340  auto u = col.u.array();
341  auto v = col.v.array();
342  auto shoc_ql = col.shoc_ql.array();
343  auto theta_tend = col.theta_tend.array();
344  auto qv_tend = col.qv_tend.array();
345  auto qc_tend = col.qc_tend.array();
346  auto qi_tend = col.qi_tend.array();
347  auto u_tend = col.u_tend.array();
348  auto v_tend = col.v_tend.array();
349  auto tke_tend = col.tke_tend.array();
350 
351  const auto zt = col.zt.const_array();
352  const auto exner = col.exner.const_array();
353  const auto shoc_ql_pdf = col.shoc_ql.const_array();
354  const auto theta_base = col.theta_base.const_array();
355  const auto qv_base = col.qv_base.const_array();
356  const auto qc_base = col.qc_base.const_array();
357  const auto qi_base = col.qi_base.const_array();
358  const auto u_base = col.u_base.const_array();
359  const auto v_base = col.v_base.const_array();
360  const auto tke_base = col.tke_base_state.const_array();
361  const auto energy_view = shoc::make_energy_fixer_view(col);
362  const Box col_box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, 0, 0));
363  const Box cell_box(IntVect(0,0,0), IntVect(col.layout.ncell - 1, nlev - 1, 0));
364 
365  {
366  BL_PROFILE("SHOC::advance::finalize::energy_fix");
367  ParallelFor(col_box, [=] AMREX_GPU_DEVICE (int ic, int, int) noexcept
368  {
369  shoc::apply_energy_fix_column(energy_view, ic, dt);
370  });
371  }
372 
373  {
374  BL_PROFILE("SHOC::advance::finalize::reconstruct");
375  ParallelFor(cell_box, [=] AMREX_GPU_DEVICE (int ic, int k, int) noexcept
376  {
377  const Real qw_new_loc = amrex::max(qw(ic,k,0), shoc_min_qw());
378  const Real ql_base = amrex::max(0.0_rt, qc_base(ic,k,0) + qi_base(ic,k,0));
379  const Real pdf_ql_raw = shoc_clamp(shoc_ql_pdf(ic,k,0), 0.0_rt, qw_new_loc);
380  const Real pdf_ql = opts.debug_disable_pdf_cloud_increment
381  ? shoc_clamp(ql_base, 0.0_rt, qw_new_loc)
382  : pdf_ql_raw;
383  Real tabs_new = 0.0_rt;
384  Real qv_new_loc = 0.0_rt;
385  Real qc_new_loc = 0.0_rt;
386  Real qi_new_loc = 0.0_rt;
387  shoc::reconstruct_pdf_state(thetal(ic,k,0), qw_new_loc,
388  exner(ic,k,0), qi_base(ic,k,0), pdf_ql,
389  tabs_new, qv_new_loc, qc_new_loc, qi_new_loc);
390 
391  const Real ql_total = qc_new_loc + qi_new_loc;
392  tabs(ic,k,0) = tabs_new;
393  theta(ic,k,0) = tabs_new / amrex::max(exner(ic,k,0), 1.0e-12_rt);
394  qw(ic,k,0) = qw_new_loc;
395  qv(ic,k,0) = qv_new_loc;
396  qc(ic,k,0) = qc_new_loc;
397  qi(ic,k,0) = qi_new_loc;
398  shoc_ql(ic,k,0) = ql_total;
399  theta_v(ic,k,0) = theta(ic,k,0) * (1.0_rt + shoc_zvir() * qv_new_loc - ql_total);
400  host_dse(ic,k,0) = Cp_d * tabs_new + CONST_GRAV * zt(ic,k,0);
401 
402  theta_tend(ic,k,0) = (theta(ic,k,0) - theta_base(ic,k,0)) / dt;
403  qv_tend(ic,k,0) = (qv_new_loc - qv_base(ic,k,0)) / dt;
404  qc_tend(ic,k,0) = (qc_new_loc - qc_base(ic,k,0)) / dt;
405  qi_tend(ic,k,0) = (qi_new_loc - qi_base(ic,k,0)) / dt;
406  u_tend(ic,k,0) = (u(ic,k,0) - u_base(ic,k,0)) / dt;
407  v_tend(ic,k,0) = (v(ic,k,0) - v_base(ic,k,0)) / dt;
408  tke_tend(ic,k,0) = (tke(ic,k,0) - tke_base(ic,k,0)) / dt;
409  });
410  }
411 }
constexpr amrex::Real Cp_d
Definition: ERF_Constants.H:44
@ tabs
Definition: ERF_Kessler.H:25
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void apply_energy_fix_column(const ShocEnergyFixerView &v, int ic, amrex::Real dt) noexcept
Definition: ERF_ShocEnergyFixer.H:84
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void reconstruct_pdf_state(amrex::Real thetal, amrex::Real qw, amrex::Real exner, amrex::Real qi_seed, amrex::Real pdf_ql, amrex::Real &tabs, amrex::Real &qv, amrex::Real &qc, amrex::Real &qi) noexcept
Definition: ERF_ShocThermoUtils.H:86
ShocEnergyFixerView make_energy_fixer_view(ShocColumnData &col)
Definition: ERF_ShocEnergyFixer.H:40
amrex::FArrayBox theta_v
Definition: ERF_ShocTypes.H:216
amrex::FArrayBox qc_tend
Definition: ERF_ShocTypes.H:271
amrex::FArrayBox v_tend
Definition: ERF_ShocTypes.H:274
amrex::FArrayBox shoc_ql
Definition: ERF_ShocTypes.H:243
amrex::FArrayBox host_dse
Definition: ERF_ShocTypes.H:227
amrex::FArrayBox exner
Definition: ERF_ShocTypes.H:215
amrex::FArrayBox tke_tend
Definition: ERF_ShocTypes.H:275
amrex::FArrayBox qi_tend
Definition: ERF_ShocTypes.H:272
amrex::FArrayBox u_tend
Definition: ERF_ShocTypes.H:273
amrex::FArrayBox tabs
Definition: ERF_ShocTypes.H:222
amrex::FArrayBox theta_tend
Definition: ERF_ShocTypes.H:269
amrex::FArrayBox qv_tend
Definition: ERF_ShocTypes.H:270
bool debug_disable_pdf_cloud_increment
Definition: ERF_ShocTypes.H:117

Referenced by ShocDriver::advance().

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

◆ update_prognostics()

void ShocImplicit::update_prognostics ( ShocColumnData col,
const ShocRuntimeOptions opts,
amrex::Real  dt 
)
static
417 {
419  advance_implicit_state(col, opts, dt);
420  finalize_from_pdf(col, opts, dt);
421 }
static void advance_implicit_state(ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dt)
Definition: ERF_ShocImplicit.cpp:166
static void cache_baseline_state(ShocColumnData &col)
Definition: ERF_ShocImplicit.cpp:84
static void finalize_from_pdf(ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dt)
Definition: ERF_ShocImplicit.cpp:319

The documentation for this class was generated from the following files: