ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_MakeFastCoeffs.cpp File Reference
#include <AMReX.H>
#include "ERF_Constants.H"
#include <ERF_TI_fast_headers.H>
#include <ERF_TerrainMetrics.H>
Include dependency graph for ERF_MakeFastCoeffs.cpp:

Functions

void make_fast_coeffs (int, MultiFab &fast_coeffs, Vector< MultiFab > &S_stage_data, const MultiFab &S_stage_prim, const MultiFab &pi_stage, const amrex::Geometry geom, bool l_use_moisture, MeshType mesh_type, Real gravity, Real c_p, std::unique_ptr< MultiFab > &detJ_cc, const double dtau, Real beta_s, const MultiFab *z_phys_cc, const MultiFab *z_phys_nd, bool use_zcc_kface_metric, bool use_variable_beta_s, amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
 

Function Documentation

◆ make_fast_coeffs()

void make_fast_coeffs ( int  ,
MultiFab &  fast_coeffs,
Vector< MultiFab > &  S_stage_data,
const MultiFab &  S_stage_prim,
const MultiFab &  pi_stage,
const amrex::Geometry  geom,
bool  l_use_moisture,
MeshType  mesh_type,
Real  gravity,
Real  c_p,
std::unique_ptr< MultiFab > &  detJ_cc,
const double  dtau,
Real  beta_s,
const MultiFab *  z_phys_cc,
const MultiFab *  z_phys_nd,
bool  use_zcc_kface_metric,
bool  use_variable_beta_s,
amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &  phys_bc_type 
)

Function for computing the coefficients for the tridiagonal solver used in the fast integrator (the acoustic substepping).

Parameters
[in]levellevel of refinement
[out]fast_coeffsthe coefficients for the tridiagonal solver computed here, and beta_s on the w-faces (component 5)
[in]S_stage_datasolution at the last stage
[in]S_stage_primprimitive variables (i.e. conserved variables divided by density) at the last stage
[in]pi_stageExner function at the last stage
[in]geomContainer for geometric information
[in]l_use_moistureAre we evolving moisture?
[in]mesh_typeDo we have constant dz?
[in]gravityMagnitude of gravity
[in]c_pCoefficient at constant pressure
[in]detJ_ccJacobian of the metric transformation at cell centers: the face metric of the vertical pressure gradient and the cell volume dividing the vertical flux divergence. On a moving mesh this is the volume at the end of the sub-step
[in]dtauFast time step
[in]beta_sCoefficient which determines how implicit vs explicit the solve is
[in]z_phys_ccHeight coordinate at cell centers (null without terrain)
[in]z_phys_ndHeight coordinate at nodes (null without terrain)
[in]use_zcc_kface_metricIf true (and z_phys_cc is given), the face metric of the vertical pressure gradient is the distance between the cell centers, as in the slow vertical pressure gradient and the hydrostatic base state. Otherwise (the moving mesh, whose z_phys_cc is not that of the end of the sub-step) it is the average of detJ_cc on the two sides of the face, or dz on a ConstantDz mesh (SolverChoice::zcc_vertical_metric)
[in]use_variable_beta_sIf true, beta_s on each w-face is set from the terrain slope and the vertical acoustic Courant number there in place of beta_s
[in]phys_bc_typePhysical boundary condition types
59 {
60  BL_PROFILE_VAR("make_fast_coeffs()",make_fast_coeffs);
61 
62  Real c_v = c_p - R_d;
63 
64  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
65  Real dzi = dxInv[2];
66 
67  const Box &domain = geom.Domain();
68 
69  MultiFab coeff_A_mf(fast_coeffs, amrex::make_alias, 0, 1);
70  MultiFab coeff_B_mf(fast_coeffs, amrex::make_alias, 1, 1);
71  MultiFab coeff_C_mf(fast_coeffs, amrex::make_alias, 2, 1);
72  MultiFab coeff_P_mf(fast_coeffs, amrex::make_alias, 3, 1);
73  MultiFab coeff_Q_mf(fast_coeffs, amrex::make_alias, 4, 1);
74  MultiFab beta_s_mf(fast_coeffs, amrex::make_alias, 5, 1);
75 
76  const bool has_z_nd = (z_phys_nd != nullptr);
77  const bool l_zcc_kface = use_zcc_kface_metric && (z_phys_cc != nullptr);
78 
79 
80  // *************************************************************************
81  // Set gravity as a vector
82  const Array<Real,AMREX_SPACEDIM> grav{zero, zero, -gravity};
83  const GpuArray<Real,AMREX_SPACEDIM> grav_gpu{grav[0], grav[1], grav[2]};
84 
85  // *************************************************************************
86  // Define updates in the current RK stage
87  // *************************************************************************
88 #ifdef _OPENMP
89 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
90 #endif
91  {
92 
93  for ( MFIter mfi(S_stage_data[IntVars::cons],TileNoZ()); mfi.isValid(); ++mfi)
94  {
95  Box bx = mfi.tilebox();
96  Box tbz = surroundingNodes(bx,2);
97 
98  const Array4<const Real> & stage_cons = S_stage_data[IntVars::cons].const_array(mfi);
99  const Array4<const Real> & prim = S_stage_prim.const_array(mfi);
100 
101  const Array4<const Real>& detJ = (mesh_type != MeshType::ConstantDz) ?
102  detJ_cc->const_array(mfi) : Array4<const Real>{};
103  const Array4<const Real>& pi_stage_ca = pi_stage.const_array(mfi);
104 
105  FArrayBox gam_fab; gam_fab.resize(surroundingNodes(bx,2),1,The_Async_Arena());
106 
107  auto const& coeffA_a = coeff_A_mf.array(mfi);
108  auto const& coeffB_a = coeff_B_mf.array(mfi);
109  auto const& coeffC_a = coeff_C_mf.array(mfi);
110  auto const& coeffP_a = coeff_P_mf.array(mfi);
111  auto const& coeffQ_a = coeff_Q_mf.array(mfi);
112  auto const& gam_a = gam_fab.array();
113  auto const& beta_s_a = beta_s_mf.array(mfi);
114 
115  const Array4<const Real>& z_nd = (has_z_nd) ? z_phys_nd->const_array(mfi)
116  : Array4<const Real>{};
117  const Array4<const Real>& z_cc = (has_z_nd) ? z_phys_cc->const_array(mfi)
118  : Array4<const Real>{};
119 
120  // *********************************************************************
121  // beta_s on the w-faces, which erf_substep_* uses for the time-weighting of the
122  // vertical fluxes and of the vertical momentum equation
123  // *********************************************************************
124  ParallelFor(tbz, [=] AMREX_GPU_DEVICE (int i, int j, int k)
125  {
126  if (use_variable_beta_s) {
127  // Terrain slopes
128  const Real h_xi = (has_z_nd) ? Compute_h_xi_AtKface (i, j, k, dxInv, z_nd) : zero;
129  const Real h_eta = (has_z_nd) ? Compute_h_eta_AtKface(i, j, k, dxInv, z_nd) : zero;
130 
131  // Limit the terrain slope so that the eigenvalue for
132  // the flat-terrain (sigma2 = 0) is \lambda ~= 0.99.
133  // Since the applification factor is applied each
134  // substep, the damping is \propto \lambda^{n_sub}.
135  const Real sigma2 = amrex::max(h_xi*h_xi + h_eta*h_eta, Real(0.021));
136 
137  // Small Z scaling regime
138  // NOTE: The stability limit for beta, in the small Z regime, is utilized
139  // to compute beta_2 when evaluating z_crit
140  const Real b_tmp = sigma2 / (two + sigma2);
141  const Real zcrit = two * std::sqrt(one + sigma2)
142  / (sigma2 * myhalf * (one + b_tmp));
143 
144  // Compute actual Z value
145  const Real r_kf = myhalf * ( stage_cons(i, j, k , Rho_comp )
146  + stage_cons(i, j, k-1, Rho_comp ) );
147  const Real rth_kf = myhalf * ( stage_cons(i, j, k , RhoTheta_comp)
148  + stage_cons(i, j, k-1, RhoTheta_comp) );
149  const Real qv_kf = (l_use_moisture) ? myhalf * ( stage_cons(i, j, k , RhoQ1_comp)
150  + stage_cons(i, j, k-1, RhoQ1_comp) ) / r_kf
151  : zero;
152  const Real p = getPgivenRTh(rth_kf, qv_kf);
153  const Real cs = std::sqrt(Gamma * p / r_kf); // Approximate with dry Gamma
154  const Real dz_kf = z_cc(i,j,k) - z_cc(i,j,k-1);
155  const Real zval = two * cs * static_cast<Real>(dtau) / dz_kf;
156 
157  // Blend the two regimes
158  const Real beta_lo = b_tmp;
159  const Real beta_hi = amrex::min(sigma2, Real(1.0));
160  const Real alpha = myhalf; // start of ramp as a fraction of zcrit
161  const Real s = amrex::Clamp((zval - alpha*zcrit) / ((one - alpha)*zcrit), Real(0.0), Real(1.0));
162  const Real w = s*s*(three - two*s);
163  beta_s_a(i,j,k) = beta_lo + w*(beta_hi - beta_lo);
164  } else {
165  beta_s_a(i,j,k) = beta_s;
166  }
167  });
168 
169  // *********************************************************************
170  // *********************************************************************
171  // *********************************************************************
172 
173  Box bx_shrunk_in_k = bx;
174  int klo = tbz.smallEnd(2);
175  int khi = tbz.bigEnd(2);
176  bx_shrunk_in_k.setSmall(2,klo+1);
177  bx_shrunk_in_k.setBig(2,khi-1);
178 
179  // Note that the notes use "g" to mean the magnitude of gravity, so it is positive
180  // We set grav_gpu[2] to be the vector component which is negative
181  // We define halfg to match the notes (which is why we take the absolute value)
182  Real halfg = std::abs(myhalf * grav_gpu[2]);
183 
184  //Note we don't act on the bottom or top boundaries of the domain
185  if (mesh_type != MeshType::ConstantDz)
186  {
187  ParallelFor(bx_shrunk_in_k, [=] AMREX_GPU_DEVICE (int i, int j, int k)
188  {
189  Real pi_c = myhalf * (pi_stage_ca(i,j,k-1) + pi_stage_ca(i,j,k));
190 
191  // The face metric of the vertical pressure gradient: the distance between the cell
192  // centers (in units of dz), which is what the slow vertical pressure gradient and the
193  // hydrostatic base state use. On a single level this is the average of detJ on the
194  // two sides of the face, but not on a coarse level over terrain, whose detJ is
195  // averaged from the finest mesh
196  Real detJ_on_kface = (l_zcc_kface) ? (z_cc(i,j,k) - z_cc(i,j,k-1)) * dzi
197  : myhalf * (detJ(i,j,k) + detJ(i,j,k-1));
198  Real inv_detJ_on_kface = one / detJ_on_kface;
199 
200  Real qv_p = (l_use_moisture) ? prim(i,j,k ,PrimQ1_comp) : zero;
201  Real qv_q = (l_use_moisture) ? prim(i,j,k-1,PrimQ1_comp) : zero;
202 
203  Real Thm_hi = stage_cons(i,j,k ,RhoTheta_comp) * (one + RvoRd*qv_p);
204  Real Thm_lo = stage_cons(i,j,k-1,RhoTheta_comp) * (one + RvoRd*qv_q);
205  Real Thm_grad = dzi * inv_detJ_on_kface * ( Thm_hi - Thm_lo );
206 
207  Real coeff_P = -Gamma * R_d * dzi * inv_detJ_on_kface * pi_c * (one + RvoRd*qv_p)
208  - Gamma * R_d * R_d * Thm_grad * myhalf * pi_stage_ca(i,j,k ) /
209  ( c_v * stage_cons(i,j,k ,RhoTheta_comp) );
210 
211  Real coeff_Q = Gamma * R_d * dzi * inv_detJ_on_kface * pi_c * (one + RvoRd*qv_q)
212  - Gamma * R_d * R_d * Thm_grad * myhalf * pi_stage_ca(i,j,k-1) /
213  ( c_v * stage_cons(i,j,k-1,RhoTheta_comp) );
214 
215  if (l_use_moisture) {
216  Real q = myhalf * ( prim(i,j,k,PrimQ1_comp) + prim(i,j,k-1,PrimQ1_comp)
217  + prim(i,j,k,PrimQ2_comp) + prim(i,j,k-1,PrimQ2_comp) );
218  coeff_P /= (one + q);
219  coeff_Q /= (one + q);
220  }
221 
222  // NOTE: we store the moisture-normalized coefficients so that the explicit
223  // RHS assembled in erf_substep_* uses exactly the same vertical fast
224  // pressure gradient as the implicit tridiagonal system built below
225  coeffP_a(i,j,k) = coeff_P;
226  coeffQ_a(i,j,k) = coeff_Q;
227 
228  Real theta_t_lo = myhalf * ( prim(i,j,k-2,PrimTheta_comp) + prim(i,j,k-1,PrimTheta_comp) );
229  Real theta_t_mid = myhalf * ( prim(i,j,k-1,PrimTheta_comp) + prim(i,j,k ,PrimTheta_comp) );
230  Real theta_t_hi = myhalf * ( prim(i,j,k ,PrimTheta_comp) + prim(i,j,k+1,PrimTheta_comp) );
231 
232  // LHS for tri-diagonal system
233  // NOTE: the w-equation at face k is weighted by beta_2(k), and the vertical
234  // flux at face k' by beta_2(k'), so each entry carries both
235  // (multiplied first, so a uniform beta_s rounds as beta_2 * beta_2 did)
236  Real beta_2_km1 = myhalf * (one + beta_s_a(i,j,k-1));
237  Real beta_2_k = myhalf * (one + beta_s_a(i,j,k ));
238  Real beta_2_kp1 = myhalf * (one + beta_s_a(i,j,k+1));
239  Real D_A = beta_2_km1 * beta_2_k * dzi * static_cast<Real>(dtau * dtau);
240  Real D_B = beta_2_k * beta_2_k * dzi * static_cast<Real>(dtau * dtau);
241  Real D_C = beta_2_k * beta_2_kp1 * dzi * static_cast<Real>(dtau * dtau);
242  coeffA_a(i,j,k) = D_A * (one/detJ(i,j,k-1)) * ( halfg - coeff_Q * theta_t_lo );
243  coeffC_a(i,j,k) = D_C * (one/detJ(i,j,k )) * (-halfg + coeff_P * theta_t_hi );
244 
245  // On a moving mesh the w equation, conservative in the face volume, is divided by the
246  // face volume at the end of the sub-step, so the diagonal is one there as well
247  coeffB_a(i,j,k) = one + D_B * ( (coeff_Q/detJ(i,j,k-1) - coeff_P/detJ(i,j,k)) * theta_t_mid
248  + halfg * (one/detJ(i,j,k) - one/detJ(i,j,k-1)) );
249  });
250 
251  } else {
252 
253  ParallelFor(bx_shrunk_in_k, [=] AMREX_GPU_DEVICE (int i, int j, int k)
254  {
255  Real pi_c = myhalf * (pi_stage_ca(i,j,k-1) + pi_stage_ca(i,j,k));
256 
257  // The face metric of the vertical pressure gradient: dz, or where the base state
258  // is nested the distance between the cell centers (in units of dz), as the slow
259  // vertical pressure gradient uses
260  Real inv_h_kface = (l_zcc_kface) ? one / ((z_cc(i,j,k) - z_cc(i,j,k-1)) * dzi) : one;
261 
262  Real qv_p = (l_use_moisture) ? prim(i,j,k ,PrimQ1_comp) : zero;
263  Real qv_q = (l_use_moisture) ? prim(i,j,k-1,PrimQ1_comp) : zero;
264 
265  Real Thm_hi = stage_cons(i,j,k ,RhoTheta_comp) * (one + RvoRd*qv_p);
266  Real Thm_lo = stage_cons(i,j,k-1,RhoTheta_comp) * (one + RvoRd*qv_q);
267  Real Thm_grad = dzi * inv_h_kface * ( Thm_hi - Thm_lo );
268 
269  Real coeff_P = -Gamma * R_d * dzi * inv_h_kface * pi_c * (one + RvoRd*qv_p)
270  - Gamma * R_d * R_d * Thm_grad * myhalf * pi_stage_ca(i,j,k ) /
271  ( c_v * stage_cons(i,j,k ,RhoTheta_comp) );
272 
273  Real coeff_Q = Gamma * R_d * dzi * inv_h_kface * pi_c * (one + RvoRd*qv_q)
274  - Gamma * R_d * R_d * Thm_grad * myhalf * pi_stage_ca(i,j,k-1) /
275  ( c_v * stage_cons(i,j,k-1,RhoTheta_comp) );
276 
277  if (l_use_moisture) {
278  Real q = myhalf * ( prim(i,j,k,PrimQ1_comp) + prim(i,j,k-1,PrimQ1_comp)
279  + prim(i,j,k,PrimQ2_comp) + prim(i,j,k-1,PrimQ2_comp) );
280  coeff_P /= (one + q);
281  coeff_Q /= (one + q);
282  }
283 
284  // NOTE: we store the moisture-normalized coefficients so that the explicit
285  // RHS assembled in erf_substep_* uses exactly the same vertical fast
286  // pressure gradient as the implicit tridiagonal system built below
287  coeffP_a(i,j,k) = coeff_P;
288  coeffQ_a(i,j,k) = coeff_Q;
289 
290  Real theta_t_lo = myhalf * ( prim(i,j,k-2,PrimTheta_comp) + prim(i,j,k-1,PrimTheta_comp) );
291  Real theta_t_mid = myhalf * ( prim(i,j,k-1,PrimTheta_comp) + prim(i,j,k ,PrimTheta_comp) );
292  Real theta_t_hi = myhalf * ( prim(i,j,k ,PrimTheta_comp) + prim(i,j,k+1,PrimTheta_comp) );
293 
294  // LHS for tri-diagonal system
295  // NOTE: the w-equation at face k is weighted by beta_2(k), and the vertical
296  // flux at face k' by beta_2(k'), so each entry carries both
297  // (multiplied first, so a uniform beta_s rounds as beta_2 * beta_2 did)
298  Real beta_2_km1 = myhalf * (one + beta_s_a(i,j,k-1));
299  Real beta_2_k = myhalf * (one + beta_s_a(i,j,k ));
300  Real beta_2_kp1 = myhalf * (one + beta_s_a(i,j,k+1));
301  Real D_A = beta_2_km1 * beta_2_k * dzi * static_cast<Real>(dtau * dtau);
302  Real D_B = beta_2_k * beta_2_k * dzi * static_cast<Real>(dtau * dtau);
303  Real D_C = beta_2_k * beta_2_kp1 * dzi * static_cast<Real>(dtau * dtau);
304  coeffA_a(i,j,k) = D_A * ( halfg - coeff_Q * theta_t_lo );
305  coeffC_a(i,j,k) = D_C * (-halfg + coeff_P * theta_t_hi );
306 
307  coeffB_a(i,j,k) = one + D_B * (coeff_Q - coeff_P) * theta_t_mid;
308  });
309  }
310 
311  amrex::Box b2d = tbz; // Copy constructor
312  b2d.setRange(2,0);
313 
314  auto const lo = amrex::lbound(bx);
315  auto const hi = amrex::ubound(bx);
316 
317  auto const domhi = amrex::ubound(domain);
318 
319  {
320  BL_PROFILE("make_coeffs_b2d_loop");
321 #ifdef AMREX_USE_GPU
322  ParallelFor(b2d, [=] AMREX_GPU_DEVICE (int i, int j, int) {
323 
324  // If at the bottom of the grid, we will set w to a specified Dirichlet value
325  coeffA_a(i,j,lo.z) = zero;
326  coeffB_a(i,j,lo.z) = one;
327  coeffC_a(i,j,lo.z) = zero;
328 
329  // If at the top of the grid, we will set w to a specified Dirichlet value
330  coeffA_a(i,j,hi.z+1) = zero;
331  coeffB_a(i,j,hi.z+1) = one;
332  coeffC_a(i,j,hi.z+1) = zero;
333 
334  // UNLESS if at the top of the domain and the boundary is outflow,
335  // we will use a homogeneous Neumann condition
336  if ( (hi.z == domhi.z) &&
337  (phys_bc_type[5] == ERF_BC::outflow or phys_bc_type[5] == ERF_BC::ho_outflow) )
338  {
339  coeffA_a(i,j,hi.z+1) = -one;
340  }
341 
342  // w = specified Dirichlet value at k = lo.z
343  gam_a(i,j,lo.z) = coeffC_a(i,j,lo.z) / coeffB_a(i,j,lo.z);
344  for (int k = lo.z+1; k <= hi.z+1; k++) {
345  coeffB_a(i,j,k) = one / ( coeffB_a(i,j,k) - coeffA_a(i,j,k)*gam_a(i,j,k-1) );
346  gam_a(i,j,k) = coeffC_a(i,j,k) * coeffB_a(i,j,k);
347  }
348  });
349 #else
350  // If at the bottom of the grid, we will set w to a specified Dirichlet value
351  for (int j = lo.y; j <= hi.y; ++j) {
352  AMREX_PRAGMA_SIMD
353  for (int i = lo.x; i <= hi.x; ++i) {
354  coeffA_a(i,j,lo.z) = zero;
355  coeffB_a(i,j,lo.z) = one;
356  coeffC_a(i,j,lo.z) = zero;
357  gam_a(i,j,lo.z) = coeffC_a(i,j,lo.z) / coeffB_a(i,j,lo.z);
358  }
359  }
360  for (int j = lo.y; j <= hi.y; ++j) {
361  AMREX_PRAGMA_SIMD
362  for (int i = lo.x; i <= hi.x; ++i) {
363 
364  // If at the top of the grid, we will set w to a specified Dirichlet value
365  coeffA_a(i,j,hi.z+1) = zero;
366  coeffB_a(i,j,hi.z+1) = one;
367  coeffC_a(i,j,hi.z+1) = zero;
368 
369  // UNLESS if at the top of the domain and the boundary is outflow,
370  // we will use a homogeneous Neumann condition
371  if ( (hi.z == domhi.z) &&
372  (phys_bc_type[5] == ERF_BC::outflow or phys_bc_type[5] == ERF_BC::ho_outflow) )
373  {
374  coeffA_a(i,j,hi.z+1) = -one;
375  }
376  }
377  }
378  for (int k = lo.z+1; k <= hi.z+1; ++k) {
379  for (int j = lo.y; j <= hi.y; ++j) {
380  AMREX_PRAGMA_SIMD
381  for (int i = lo.x; i <= hi.x; ++i) {
382  coeffB_a(i,j,k) = one / ( coeffB_a(i,j,k) - coeffA_a(i,j,k)*gam_a(i,j,k-1) );
383  gam_a(i,j,k) = coeffC_a(i,j,k) * coeffB_a(i,j,k);
384  }
385  }
386  }
387 #endif
388  } // end profile
389  } // mfi
390  } // omp
391 }
constexpr amrex::Real RvoRd
Definition: ERF_Constants.H:59
constexpr amrex::Real R_d
Definition: ERF_Constants.H:49
constexpr amrex::Real Gamma
Definition: ERF_Constants.H:70
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:81
#define PrimQ1_comp
Definition: ERF_IndexDefines.H:94
#define PrimQ2_comp
Definition: ERF_IndexDefines.H:95
#define Rho_comp
Definition: ERF_IndexDefines.H:61
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:62
#define PrimTheta_comp
Definition: ERF_IndexDefines.H:91
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:78
@ ho_outflow
amrex::GpuArray< Real, AMREX_SPACEDIM > dxInv
Definition: ERF_InitCustomPertVels_ParticleTests.H:16
const int khi
Definition: ERF_InitCustomPert_Bubble.H:25
const int klo
Definition: ERF_InitCustomPert_KE.H:9
void make_fast_coeffs(int, MultiFab &fast_coeffs, Vector< MultiFab > &S_stage_data, const MultiFab &S_stage_prim, const MultiFab &pi_stage, const amrex::Geometry geom, bool l_use_moisture, MeshType mesh_type, Real gravity, Real c_p, std::unique_ptr< MultiFab > &detJ_cc, const double dtau, Real beta_s, const MultiFab *z_phys_cc, const MultiFab *z_phys_nd, bool use_zcc_kface_metric, bool use_variable_beta_s, amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
Definition: ERF_MakeFastCoeffs.cpp:42
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);})
constexpr amrex::Real three
Definition: ERF_NumericalConstants.H:39
constexpr amrex::Real two
Definition: ERF_NumericalConstants.H:38
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtKface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:445
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtKface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:468
AMREX_FORCE_INLINE amrex::IntVect TileNoZ()
Definition: ERF_TileNoZ.H:11
@ cons
Definition: ERF_IndexDefines.H:249
@ alpha
Definition: ERF_SLM.H:153
@ q
Definition: ERF_WSM6.H:296
@ p
Definition: ERF_WSM6.H:303
real(c_double), private cs
Definition: ERF_module_mp_morr_two_moment.F90:203
Here is the call graph for this function: