ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_UpdateRhoThetaSources_GATE.H File Reference

Go to the source code of this file.

Functions

 for (MFIter mfi(*src, TilingIfNotGPU());mfi.isValid();++mfi)
 

Variables

const Realprob_lo = geom.ProbLo()
 
const auto dx = geom.CellSize()
 
bool use_zlevels = (z_phys_cc != nullptr)
 

Function Documentation

◆ for()

for ( MFIter mfi(*,  TilingIfNotGPU)
6  {
7  const auto &box = mfi.tilebox();
8  const Array4<Real>& src_arr = src->array(mfi);
9  if (box.length(0) != 1)
10  {
11  src->setVal(0.0);
12  } else {
13  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) {
14  const Real z_cc = (use_zlevels) ? d_zlevels_arr[k] : prob_lo[2] + (k+0.5)*dx[2];
15  if ((z_cc < 15000) && (z_cc > 380)) {
16  Real f_a[6] = {-1.22998448e-24, 5.86487977e-20, -1.11949167e-15,
17  1.03417521e-11, -3.80858898e-08, -1.39371490e-05};
18  Real result = f_a[0];
19  for (int ind = 1; ind < 6; ++ind) {
20  result = result * z_cc + f_a[ind];
21  }
22  src_arr(i, j, k) = result;
23  } else if (z_cc <= 380) {
24  Real f_a[2] = {1.73461284e-08, -3.00569096e-05};
25  Real result = f_a[0];
26  for (int ind = 1; ind < 2; ++ind) {
27  result = result * z_cc + f_a[ind];
28  }
29  src_arr(i, j, k) = result;
30  } else {
31  src_arr(i, j, k) = 0.0;
32  }
33  });
34  }
35  }
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::Real Real
Definition: ERF_ShocInterface.H:19
bool use_zlevels
Definition: ERF_UpdateRhoThetaSources_GATE.H:3
const Real * prob_lo
Definition: ERF_UpdateRhoThetaSources_GATE.H:1
const auto dx
Definition: ERF_UpdateRhoThetaSources_GATE.H:2
Here is the call graph for this function:

Variable Documentation

◆ dx

const auto dx = geom.CellSize()

Referenced by for().

◆ prob_lo

const Real* prob_lo = geom.ProbLo()

Referenced by for().

◆ use_zlevels

bool use_zlevels = (z_phys_cc != nullptr)

Referenced by for().