ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_MakeGradP.cpp File Reference
#include <AMReX_MultiFab.H>
#include <AMReX_ArrayLim.H>
#include <AMReX_EB_Slopes_K.H>
#include "AMReX_BCRec.H"
#include "ERF.H"
#include "ERF_SrcHeaders.H"
#include "ERF_DataStruct.H"
#include "ERF_Utils.H"
#include "ERF_EB.H"
Include dependency graph for ERF_MakeGradP.cpp:

Functions

void make_gradp_pert (int level, const SolverChoice &solverChoice, const Geometry &geom, Vector< MultiFab > &S_data, MultiFab &p0, MultiFab &z_phys_nd, MultiFab &z_phys_cc, BCRec const *d_bcrec_ptr, const eb_ &ebfact, Vector< MultiFab > &gradp)
 
void compute_gradp (const MultiFab &p, const Geometry &geom, MultiFab &z_phys_nd, MultiFab &z_phys_cc, BCRec const *d_bcrec_ptr, const eb_ &ebfact, Vector< MultiFab > &gradp, const SolverChoice &solverChoice)
 

Function Documentation

◆ compute_gradp()

void compute_gradp ( const MultiFab &  p,
const Geometry &  geom,
MultiFab &  z_phys_nd,
MultiFab &  z_phys_cc,
BCRec const *  d_bcrec_ptr,
const eb_ ebfact,
Vector< MultiFab > &  gradp,
const SolverChoice solverChoice 
)
79 {
80  const bool l_use_terrain_fitted_coords = (solverChoice.mesh_type != MeshType::ConstantDz);
81 
82  const Box domain = geom.Domain();
83  const int domain_klo = domain.smallEnd(2);
84  const int domain_khi = domain.bigEnd(2);
85 
86  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
87 
88  // *****************************************************************************
89  // Take gradient of relevant quantity (p0, pres, or pert_pres = pres - p0)
90  // *****************************************************************************
91  for ( MFIter mfi(p); mfi.isValid(); ++mfi)
92  {
93  Box tbx = mfi.nodaltilebox(0);
94  Box tby = mfi.nodaltilebox(1);
95  Box tbz = mfi.nodaltilebox(2);
96 
97  // We don't compute gpz on the bottom or top domain boundary
98  if (tbz.smallEnd(2) == domain_klo) {
99  tbz.growLo(2,-1);
100  }
101  if (tbz.bigEnd(2) == domain_khi+1) {
102  tbz.growHi(2,-1);
103  }
104 
105  // Terrain metrics
106  const Array4<const Real>& z_nd_arr = z_phys_nd.const_array(mfi);
107  const Array4<const Real>& z_cc_arr = z_phys_cc.const_array(mfi);
108 
109  const Array4<const Real>& p_arr = p.const_array(mfi);
110 
111  const Array4< Real>& gpx_arr = gradp[GpVars::gpx].array(mfi);
112  const Array4< Real>& gpy_arr = gradp[GpVars::gpy].array(mfi);
113  const Array4< Real>& gpz_arr = gradp[GpVars::gpz].array(mfi);
114 
115  if (solverChoice.terrain_type != TerrainType::EB) {
116 
117  ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
118  {
119  //Note : mx/my == 1, so no map factor needed here
120  Real gpx = dxInv[0] * (p_arr(i,j,k) - p_arr(i-1,j,k));
121 
122  if (l_use_terrain_fitted_coords) {
123  Real met_h_xi = (z_cc_arr(i,j,k) - z_cc_arr(i-1,j,k)) * dxInv[0];
124 
125  Real dz_phys_hi, dz_phys_lo;
126  Real gpz_lo, gpz_hi;
127  if (k==domain_klo) {
128  dz_phys_hi = z_cc_arr(i ,j,k+1) - z_cc_arr(i ,j,k );
129  dz_phys_lo = z_cc_arr(i-1,j,k+1) - z_cc_arr(i-1,j,k );
130  gpz_hi = (p_arr(i ,j,k+1) - p_arr(i ,j,k )) / dz_phys_hi;
131  gpz_lo = (p_arr(i-1,j,k+1) - p_arr(i-1,j,k )) / dz_phys_lo;
132  } else if (k==domain_khi) {
133  dz_phys_hi = z_cc_arr(i ,j,k ) - z_cc_arr(i ,j,k-1);
134  dz_phys_lo = z_cc_arr(i-1,j,k ) - z_cc_arr(i-1,j,k-1);
135  gpz_hi = (p_arr(i ,j,k ) - p_arr(i ,j,k-1)) / dz_phys_hi;
136  gpz_lo = (p_arr(i-1,j,k ) - p_arr(i-1,j,k-1)) / dz_phys_lo;
137  } else {
138  dz_phys_hi = z_cc_arr(i ,j,k+1) - z_cc_arr(i ,j,k-1);
139  dz_phys_lo = z_cc_arr(i-1,j,k+1) - z_cc_arr(i-1,j,k-1);
140  gpz_hi = (p_arr(i ,j,k+1) - p_arr(i ,j,k-1)) / dz_phys_hi;
141  gpz_lo = (p_arr(i-1,j,k+1) - p_arr(i-1,j,k-1)) / dz_phys_lo;
142  }
143  Real gpx_metric = met_h_xi * 0.5 * (gpz_hi + gpz_lo);
144  gpx -= gpx_metric;
145  }
146  gpx_arr(i,j,k) = gpx;
147  });
148 
149  ParallelFor(tby, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
150  {
151  //Note : mx/my == 1, so no map factor needed here
152  Real gpy = dxInv[1] * (p_arr(i,j,k) - p_arr(i,j-1,k));
153 
154  if (l_use_terrain_fitted_coords) {
155  Real met_h_eta = (z_cc_arr(i,j,k) - z_cc_arr(i,j-1,k)) * dxInv[1];
156 
157  Real dz_phys_hi, dz_phys_lo;
158  Real gpz_lo, gpz_hi;
159  if (k==domain_klo) {
160  dz_phys_hi = z_cc_arr(i,j ,k+1) - z_cc_arr(i,j ,k );
161  dz_phys_lo = z_cc_arr(i,j-1,k+1) - z_cc_arr(i,j-1,k );
162  gpz_hi = (p_arr(i,j ,k+1) - p_arr(i,j ,k )) / dz_phys_hi;
163  gpz_lo = (p_arr(i,j-1,k+1) - p_arr(i,j-1,k )) / dz_phys_lo;
164  } else if (k==domain_khi) {
165  dz_phys_hi = z_cc_arr(i,j ,k ) - z_cc_arr(i,j ,k-1);
166  dz_phys_lo = z_cc_arr(i,j-1,k ) - z_cc_arr(i,j-1,k-1);
167  gpz_hi = (p_arr(i,j ,k ) - p_arr(i,j ,k-1)) / dz_phys_hi;
168  gpz_lo = (p_arr(i,j-1,k ) - p_arr(i,j-1,k-1)) / dz_phys_lo;
169  } else {
170  dz_phys_hi = z_cc_arr(i,j ,k+1) - z_cc_arr(i,j ,k-1);
171  dz_phys_lo = z_cc_arr(i,j-1,k+1) - z_cc_arr(i,j-1,k-1);
172  gpz_hi = (p_arr(i,j ,k+1) - p_arr(i,j ,k-1)) / dz_phys_hi;
173  gpz_lo = (p_arr(i,j-1,k+1) - p_arr(i,j-1,k-1)) / dz_phys_lo;
174  }
175  Real gpy_metric = met_h_eta * 0.5 * (gpz_hi + gpz_lo);
176  gpy -= gpy_metric;
177  }
178  gpy_arr(i,j,k) = gpy;
179  });
180 
181  ParallelFor(tbz, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
182  {
183  Real met_h_zeta = (l_use_terrain_fitted_coords) ? Compute_h_zeta_AtKface(i, j, k, dxInv, z_nd_arr) : 1;
184  gpz_arr(i,j,k) = dxInv[2] * ( p_arr(i,j,k)-p_arr(i,j,k-1) ) / met_h_zeta;
185  });
186 
187  } else {
188 
189  // Pressure gradients are fitted at the centroids of cut cells, if EB and Compressible.
190  // Least-Squares Fitting: Compute slope using 3x3x3 stencil
191 
192  const bool l_fitting = false;
193 
194  const int domain_ilo = domain.smallEnd(0);
195  const int domain_ihi = domain.bigEnd(0);
196  const int domain_jlo = domain.smallEnd(1);
197  const int domain_jhi = domain.bigEnd(1);
198 
199  int n = 0;
200 
201  // Need to check d_bcrec_ptr[n]
202 
203  bool extdir_ilo = (d_bcrec_ptr[n].lo(0)==BCType::ext_dir || d_bcrec_ptr[n].lo(0)==BCType::hoextrap);
204  bool extdir_ihi = (d_bcrec_ptr[n].hi(0)==BCType::ext_dir || d_bcrec_ptr[n].hi(0)==BCType::hoextrap);
205  bool extdir_jlo = (d_bcrec_ptr[n].lo(1)==BCType::ext_dir || d_bcrec_ptr[n].lo(1)==BCType::hoextrap);
206  bool extdir_jhi = (d_bcrec_ptr[n].hi(1)==BCType::ext_dir || d_bcrec_ptr[n].hi(1)==BCType::hoextrap);
207  bool extdir_klo = (d_bcrec_ptr[n].lo(2)==BCType::ext_dir || d_bcrec_ptr[n].lo(2)==BCType::hoextrap);
208  bool extdir_khi = (d_bcrec_ptr[n].hi(2)==BCType::ext_dir || d_bcrec_ptr[n].hi(2)==BCType::hoextrap);
209 
210  // Pressure in staggered grids
211  MultiFab u_p((ebfact.get_u_const_factory())->getVolFrac().boxArray(), (ebfact.get_u_const_factory())->getVolFrac().DistributionMap(), 1, 1);
212  MultiFab v_p((ebfact.get_v_const_factory())->getVolFrac().boxArray(), (ebfact.get_v_const_factory())->getVolFrac().DistributionMap(), 1, 1);
213  MultiFab w_p((ebfact.get_w_const_factory())->getVolFrac().boxArray(), (ebfact.get_w_const_factory())->getVolFrac().DistributionMap(), 1, 1);
214 
215  const Array4<Real>& u_p_arr = u_p.array(mfi);
216  const Array4<Real>& v_p_arr = v_p.array(mfi);
217  const Array4<Real>& w_p_arr = w_p.array(mfi);
218 
219  // EB u-factory
220  Array4<const EBCellFlag> u_cflag = (ebfact.get_u_const_factory())->getMultiEBCellFlagFab()[mfi].const_array();
221  Array4<const Real > u_vfrac = (ebfact.get_u_const_factory())->getVolFrac().const_array(mfi);
222  Array4<const Real > u_vcent = (ebfact.get_u_const_factory())->getCentroid().const_array(mfi);
223  Array4<const Real > u_fcx = (ebfact.get_u_const_factory())->getFaceCent()[0]->const_array(mfi);
224  Array4<const Real > u_fcy = (ebfact.get_u_const_factory())->getFaceCent()[1]->const_array(mfi);
225  Array4<const Real > u_fcz = (ebfact.get_u_const_factory())->getFaceCent()[2]->const_array(mfi);
226 
227  // EB v-factory
228  Array4<const EBCellFlag> v_cflag = (ebfact.get_v_const_factory())->getMultiEBCellFlagFab()[mfi].const_array();
229  Array4<const Real > v_vfrac = (ebfact.get_v_const_factory())->getVolFrac().const_array(mfi);
230  Array4<const Real > v_vcent = (ebfact.get_v_const_factory())->getCentroid().const_array(mfi);
231  Array4<const Real > v_fcx = (ebfact.get_v_const_factory())->getFaceCent()[0]->const_array(mfi);
232  Array4<const Real > v_fcy = (ebfact.get_v_const_factory())->getFaceCent()[1]->const_array(mfi);
233  Array4<const Real > v_fcz = (ebfact.get_v_const_factory())->getFaceCent()[2]->const_array(mfi);
234 
235  // EB w-factory
236  Array4<const EBCellFlag> w_cflag = (ebfact.get_w_const_factory())->getMultiEBCellFlagFab()[mfi].const_array();
237  Array4<const Real > w_vfrac = (ebfact.get_w_const_factory())->getVolFrac().const_array(mfi);
238  Array4<const Real > w_vcent = (ebfact.get_w_const_factory())->getCentroid().const_array(mfi);
239  Array4<const Real > w_fcx = (ebfact.get_w_const_factory())->getFaceCent()[0]->const_array(mfi);
240  Array4<const Real > w_fcy = (ebfact.get_w_const_factory())->getFaceCent()[1]->const_array(mfi);
241  Array4<const Real > w_fcz = (ebfact.get_w_const_factory())->getFaceCent()[2]->const_array(mfi);
242 
243  if (l_fitting) {
244 
245  // STEP 1: Compute pressure in the staggered grids
246 
247  const Box tbx_g1 = amrex::grow(tbx,1);
248  const Box tby_g1 = amrex::grow(tby,1);
249  const Box tbz_g1 = amrex::grow(tbz,1);
250 
251  int tbx_g1_ilo = tbx_g1.smallEnd(0);
252  int tby_g1_jlo = tby_g1.smallEnd(1);
253  int tbz_g1_klo = tbz_g1.smallEnd(2);
254  int tbx_g1_ihi = tbx_g1.bigEnd(0);
255  int tby_g1_jhi = tby_g1.bigEnd(1);
256  int tbz_g1_khi = tbz_g1.bigEnd(2);
257 
258  // Print()<<"SK: tbx = "<<tbx <<", tby = "<<tby <<", tbz = "<<tbz<<std::endl;
259  // Print()<<"SK: tbx_g1 = "<<tbx_g1<<", tby_g1 = "<<tby_g1<<", tbz_g1 = "<<tbz_g1<<std::endl;
260 
261  ParallelFor(tbx_g1, tby_g1, tbz_g1,
262  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
263  {
264  if (u_vfrac(i,j,k) > 0.0) {
265  // Print()<<"SK: tbx_g1/ i,j,k = "<<i<<" "<<j<<" "<<k<<" "<<std::endl;
266  if (i == tbx_g1_ilo) {
267  u_p_arr(i,j,k) = p_arr(i,j,k);
268  } else if (i == tbx_g1_ihi) {
269  u_p_arr(i,j,k) = p_arr(i-1,j,k);
270  } else {
271  u_p_arr(i,j,k) = 0.5 * ( p_arr(i-1,j,k) + p_arr(i,j,k) );
272  }
273  } else {
274  u_p_arr(i,j,k) = 0.0;
275  }
276  },
277  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
278  {
279  if (u_vfrac(i,j,k) > 0.0) {
280  // Print()<<"SK: tby_g1/ i,j,k = "<<i<<" "<<j<<" "<<k<<" "<<std::endl;
281  if (j == tby_g1_jlo) {
282  v_p_arr(i,j,k) = p_arr(i,j,k);
283  } else if (j == tby_g1_jhi) {
284  v_p_arr(i,j,k) = p_arr(i,j-1,k);
285  } else {
286  v_p_arr(i,j,k) = 0.5 * ( p_arr(i,j-1,k) + p_arr(i,j,k) );
287  }
288 
289  } else {
290  v_p_arr(i,j,k) = 0.0;
291  }
292  },
293  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
294  {
295  if (w_vfrac(i,j,k) > 0.0) {
296  if (k == tbz_g1_klo) {
297  w_p_arr(i,j,k) = p_arr(i,j,k);
298  } else if (k == tbz_g1_khi) {
299  w_p_arr(i,j,k) = p_arr(i,j,k-1);
300  } else {
301  w_p_arr(i,j,k) = 0.5 * ( p_arr(i,j,k-1) + p_arr(i,j,k) );
302  }
303  } else {
304  w_p_arr(i,j,k) = 0.0;
305  }
306  });
307 
308  // STEP 2: Compute Least-Squares slopes
309 
310  ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
311  {
312  if (u_vfrac(i,j,k) > 0.0) {
313  GpuArray<Real,AMREX_SPACEDIM> slopes_eb;
314 
315  slopes_eb = amrex_calc_slopes_extdir_eb(
316  i, j, k, n, u_p_arr, u_vcent, u_vfrac,
317  AMREX_D_DECL(u_fcx,u_fcy,u_fcz),u_cflag,
318  AMREX_D_DECL(extdir_ilo, extdir_jlo, extdir_klo),
319  AMREX_D_DECL(extdir_ihi, extdir_jhi, extdir_khi),
320  AMREX_D_DECL(domain_ilo, domain_jlo, domain_klo),
321  AMREX_D_DECL(domain_ihi, domain_jhi, domain_khi),
322  2);
323 
324  gpx_arr(i,j,k) = slopes_eb[0];
325  } else {
326  gpx_arr(i,j,k) = 0.0;
327  }
328  });
329 
330  ParallelFor(tby, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
331  {
332  // Need to interpolate pressure from CC to FC grid here.
333 
334  if (v_vfrac(i,j,k) > 0.0) {
335  GpuArray<Real,AMREX_SPACEDIM> slopes_eb;
336 
337  slopes_eb = amrex_calc_slopes_extdir_eb(
338  i, j, k, n, v_p_arr, v_vcent, v_vfrac,
339  AMREX_D_DECL(v_fcx,v_fcy,v_fcz),v_cflag,
340  AMREX_D_DECL(extdir_ilo, extdir_jlo, extdir_klo),
341  AMREX_D_DECL(extdir_ihi, extdir_jhi, extdir_khi),
342  AMREX_D_DECL(domain_ilo, domain_jlo, domain_klo),
343  AMREX_D_DECL(domain_ihi, domain_jhi, domain_khi),
344  2);
345 
346  gpy_arr(i,j,k) = slopes_eb[1];
347  } else {
348  gpy_arr(i,j,k) = 0.0;
349  }
350  });
351 
352  ParallelFor(tbz, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
353  {
354  // Need to interpolate pressure from CC to FC grid here.
355 
356  if (w_vfrac(i,j,k) > 0.0) {
357  GpuArray<Real,AMREX_SPACEDIM> slopes_eb;
358 
359  slopes_eb = amrex_calc_slopes_extdir_eb(
360  i, j, k, n, w_p_arr, w_vcent, w_vfrac,
361  AMREX_D_DECL(w_fcx,w_fcy,w_fcz),w_cflag,
362  AMREX_D_DECL(extdir_ilo, extdir_jlo, extdir_klo),
363  AMREX_D_DECL(extdir_ihi, extdir_jhi, extdir_khi),
364  AMREX_D_DECL(domain_ilo, domain_jlo, domain_klo),
365  AMREX_D_DECL(domain_ihi, domain_jhi, domain_khi),
366  2);
367 
368  gpz_arr(i,j,k) = slopes_eb[2];
369  } else {
370  gpz_arr(i,j,k) = 0.0;
371  }
372  });
373 
374  } else {
375 
376  // Simple calculation: assuming pressures at cell centers
377 
378  ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
379  {
380  if (u_vfrac(i,j,k) > 0.0) {
381  gpx_arr(i,j,k) = dxInv[0] * (p_arr(i,j,k) - p_arr(i-1,j,k));
382  } else {
383  gpx_arr(i,j,k) = 0.0;
384  }
385  });
386 
387  ParallelFor(tby, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
388  {
389  if (v_vfrac(i,j,k) > 0.0) {
390  gpy_arr(i,j,k) = dxInv[1] * (p_arr(i,j,k) - p_arr(i,j-1,k));
391  } else {
392  gpy_arr(i,j,k) = 0.0;
393  }
394  });
395 
396  ParallelFor(tbz, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
397  {
398  if (w_vfrac(i,j,k) > 0.0) {
399  gpz_arr(i,j,k) = dxInv[2] * ( p_arr(i,j,k)-p_arr(i,j,k-1) ) ;
400  } else {
401  gpz_arr(i,j,k) = 0.0;
402  }
403  });
404 
405  } // l_fitting
406 
407  } // TerrainType::EB
408 
409  } // mfi
410 }
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_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:182
eb_aux_ const * get_w_const_factory() const noexcept
Definition: ERF_EB.H:56
eb_aux_ const * get_v_const_factory() const noexcept
Definition: ERF_EB.H:55
eb_aux_ const * get_u_const_factory() const noexcept
Definition: ERF_EB.H:54
@ hoextrap
Definition: ERF_IndexDefines.H:216
@ ext_dir
Definition: ERF_IndexDefines.H:209
@ gpz
Definition: ERF_IndexDefines.H:152
@ gpy
Definition: ERF_IndexDefines.H:151
@ gpx
Definition: ERF_IndexDefines.H:150
static MeshType mesh_type
Definition: ERF_DataStruct.H:708
static TerrainType terrain_type
Definition: ERF_DataStruct.H:702

Referenced by make_gradp_pert(), and ERF::WritePlotFile().

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

◆ make_gradp_pert()

void make_gradp_pert ( int  level,
const SolverChoice solverChoice,
const Geometry &  geom,
Vector< MultiFab > &  S_data,
MultiFab &  p0,
MultiFab &  z_phys_nd,
MultiFab &  z_phys_cc,
BCRec const *  d_bcrec_ptr,
const eb_ ebfact,
Vector< MultiFab > &  gradp 
)

Function for computing the pressure gradient

Parameters
[in]levellevel of resolution
[in]geomgeometry container at this level
[in]S_datacurrent solution
[in]p0base ststa pressure
[in]z_phys_ndz on nodes
[in]z_phys_ccz on cell centers
[in]d_bcrec_ptrBoundary Condition Record
[in]ebfactEB factory container at this level
[out]gradppressure gradient
38 {
39  const bool l_use_moisture = (solverChoice.moisture_type != MoistureType::None);
40  //
41  // Note that we only recompute gradp if compressible;
42  // if anelastic then we have computed gradp in the projection
43  // and we can reuse it, no need to recompute it
44  //
45  if (solverChoice.anelastic[level] == 0)
46  {
47  MultiFab p(S_data[Vars::cons].boxArray(), S_data[Vars::cons].DistributionMap(), 1, 1);
48 
49  // *****************************************************************************
50  // Compute pressure or perturbataional pressure
51  // *****************************************************************************
52  for ( MFIter mfi(S_data[Vars::cons]); mfi.isValid(); ++mfi)
53  {
54  Box gbx = mfi.tilebox(); gbx.grow(IntVect(1,1,1));
55  if (gbx.smallEnd(2) < 0) gbx.setSmall(2,0);
56  const Array4<const Real>& cell_data = S_data[Vars::cons].array(mfi);
57  const Array4<const Real>& p0_arr = p0.const_array(mfi);
58  const Array4< Real>& pptemp_arr = p.array(mfi);
59  ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
60  {
61  Real qv_for_p = (l_use_moisture) ? cell_data(i,j,k,RhoQ1_comp)/cell_data(i,j,k,Rho_comp) : 0.0;
62  pptemp_arr(i,j,k) = getPgivenRTh(cell_data(i,j,k,RhoTheta_comp),qv_for_p) - p0_arr(i,j,k);
63  });
64  }
65 
66  compute_gradp(p,geom,z_phys_nd,z_phys_cc,d_bcrec_ptr,ebfact,gradp,solverChoice);
67  }
68 }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=0.)
Definition: ERF_EOS.H:84
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:42
void compute_gradp(const MultiFab &p, const Geometry &geom, MultiFab &z_phys_nd, MultiFab &z_phys_cc, BCRec const *d_bcrec_ptr, const eb_ &ebfact, Vector< MultiFab > &gradp, const SolverChoice &solverChoice)
Definition: ERF_MakeGradP.cpp:71
@ cons
Definition: ERF_IndexDefines.H:140
real(c_double), parameter p0
Definition: ERF_module_model_constants.F90:40
amrex::Vector< int > anelastic
Definition: ERF_DataStruct.H:724
MoistureType moisture_type
Definition: ERF_DataStruct.H:804
Here is the call graph for this function: