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

Go to the source code of this file.

Functions

Gpu::DeviceVector< Realrho_d (khi+1, 0.0)
 
 for (MFIter mfi(state, TilingIfNotGPU());mfi.isValid();++mfi)
 
Vector< Realrho_h (khi+1, 0.0)
 
Vector< Realrho_stag (khi+2, 0.0)
 
 for (int k=1;k<=khi;k++)
 

Variables

auto rho_arr = rho_d.data()
 
 rho_stag [0] = 1.5*rho_h[0] - 0.5*rho_h[1]
 

Function Documentation

◆ for() [1/2]

for ( int  k = 1; k <= khi; k++)
19  {
20  rho_stag[k] = 0.5*(rho_h[k-1]+rho_h[k]);
21  }
rho_stag[0]
Definition: ERF_UpdateWSubsidence_SineMassFlux.H:17
Vector< Real > rho_h(khi+1, 0.0)
Here is the call graph for this function:

◆ for() [2/2]

for ( MFIter mfi(state, TilingIfNotGPU());mfi.isValid();++  mfi)
4  {
5  const auto &box = mfi.tilebox();
6  auto state_arr = state.const_array(mfi);
7  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
8  rho_arr[k] = state_arr(i, j, k, Rho_comp);
9  });
10  }
#define Rho_comp
Definition: ERF_IndexDefines.H:36
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo=geomdata.ProbLo();const auto dx=geomdata.CellSize();const Real x=(prob_lo[0]+(i+0.5) *dx[0])/mf_m(i, j, 0);const Real z=z_cc(i, j, k);Real L=std::sqrt(std::pow((x - x_c)/x_r, 2)+std::pow((z - z_c)/z_r, 2));if(L<=1.0) { Real dT=T_pert *(std::cos(PI *L)+1.0)/2.0;Real Tbar_hse=p_hse(i, j, k)/(R_d *r_hse(i, j, k));Real theta_perturbed=(Tbar_hse+dT) *std::pow(p_0/p_hse(i, j, k), rdOcp);Real theta_0=(Tbar_hse) *std::pow(p_0/p_hse(i, j, k), rdOcp);if(const_rho) { state_pert(i, j, k, RhoTheta_comp)=r_hse(i, j, k) *(theta_perturbed - theta_0);} else { state_pert(i, j, k, Rho_comp)=getRhoThetagivenP(p_hse(i, j, k))/theta_perturbed - r_hse(i, j, k);} } })
auto rho_arr
Definition: ERF_UpdateWSubsidence_SineMassFlux.H:3
Here is the call graph for this function:

◆ rho_d()

Gpu::DeviceVector<Real> rho_d ( khi 1,
0.  0 
)

Referenced by Morrison::Compute_Coefficients(), SAM::Compute_Coefficients(), and ERF::FillForecastStateMultiFabs().

Here is the caller graph for this function:

◆ rho_h()

Vector<Real> rho_h ( khi 1,
0.  0 
)

◆ rho_stag()

Vector<Real> rho_stag ( khi 2,
0.  0 
)

Variable Documentation

◆ rho_arr

◆ rho_stag

rho_stag[khi+1] = 1.5*rho_h[0] - 0.5*rho_h[1]

Referenced by for().