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

Go to the source code of this file.

Functions

void erf_init_dens_hse (amrex::MultiFab &rho_hse, std::unique_ptr< amrex::MultiFab > &, std::unique_ptr< amrex::MultiFab > &, amrex::Geometry const &) override
 

Function Documentation

◆ erf_init_dens_hse()

void erf_init_dens_hse ( amrex::MultiFab &  rho_hse,
std::unique_ptr< amrex::MultiFab > &  ,
std::unique_ptr< amrex::MultiFab > &  ,
amrex::Geometry const &   
)
override
6 {
7  amrex::Real rho_0 = parms.rho_0;
8  for ( amrex::MFIter mfi(rho_hse, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi )
9  {
10  amrex::Array4<amrex::Real> rho_arr = rho_hse.array(mfi);
11  const amrex::Box& gbx = mfi.growntilebox(1);
12  ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
13  {
14  rho_arr(i,j,k) = rho_0;
15  });
16  }
17 }