|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| ParmParse | pp ("prob") |
| pp | query ("A_0", A_0) |
| pp | query ("B_0", B_0) |
| pp | query ("rad_0", rad_0) |
| pp | query ("rho_0", rho_0) |
| pp | query ("xc_frac", xc_frac) |
| pp | query ("yc_frac", yc_frac) |
| pp | query ("zc_frac", zc_frac) |
| pp | query ("prob_type", prob_type) |
| pp | query ("xradius", xradius) |
| pp | query ("zradius", zradius) |
| AMREX_ALWAYS_ASSERT (sc.terrain_type==TerrainType::EB) | |
| ParallelFor (bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *prob_hi=geomdata.ProbHi();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+myhalf) *dx[0];const Real y=prob_lo[1]+(j+myhalf) *dx[1];const Real z=prob_lo[2]+(k+myhalf) *dx[2];const Real xc=xc_frac *(prob_lo[0]+prob_hi[0]);const Real yc=yc_frac *(prob_lo[1]+prob_hi[1]);const Real zc=zc_frac *(prob_lo[2]+prob_hi[2]);const Real r0=rad_0 *(prob_hi[0] - prob_lo[0]);const Real r3d=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc)+(z-zc) *(z-zc));const Real r2d_xz=std::sqrt((x-xc) *(x-xc)+(z-zc) *(z-zc));const Real r2d_xz_nd=std::sqrt((x-xc) *(x-xc)/xradius/xradius+(z-zc) *(z-zc)/zradius/zradius);if(prob_type==10) { state_pert(i, j, k, RhoScalar_comp)=A_0 *exp(-amrex::Real(0.1) *r2d_xz *r2d_xz)+B_0 *sin(x);} else if(prob_type==11) { if(r2d_xz_nd< one) { state_pert(i, j, k, RhoScalar_comp)=myhalf *A_0 *(one+std::cos(PI *r2d_xz_nd));} } else { if(r3d< r0) { state_pert(i, j, k, RhoScalar_comp)=A_0;} } state_pert(i, j, k, RhoScalar_comp) *=rho_0;}) | |
Variables | |
| Real | A_0 = one |
| Real | B_0 = zero |
| Real | rad_0 = zero |
| Real | rho_0 = one |
| Real | xc_frac = myhalf |
| Real | yc_frac = myhalf |
| Real | zc_frac = myhalf |
| int | prob_type = -1 |
| Real | xradius = amrex::Real(10.0) |
| Real | zradius = amrex::Real(10.0) |
| AMREX_ALWAYS_ASSERT | ( | sc. | terrain_type = =TerrainType::EB | ) |
| ParallelFor | ( | bx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *prob_hi=geomdata.ProbHi();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+myhalf) *dx[0];const Real y=prob_lo[1]+(j+myhalf) *dx[1];const Real z=prob_lo[2]+(k+myhalf) *dx[2];const Real xc=xc_frac *(prob_lo[0]+prob_hi[0]);const Real yc=yc_frac *(prob_lo[1]+prob_hi[1]);const Real zc=zc_frac *(prob_lo[2]+prob_hi[2]);const Real r0=rad_0 *(prob_hi[0] - prob_lo[0]);const Real r3d=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc)+(z-zc) *(z-zc));const Real r2d_xz=std::sqrt((x-xc) *(x-xc)+(z-zc) *(z-zc));const Real r2d_xz_nd=std::sqrt((x-xc) *(x-xc)/xradius/xradius+(z-zc) *(z-zc)/zradius/zradius);if(prob_type==10) { state_pert(i, j, k, RhoScalar_comp)=A_0 *exp(-amrex::Real(0.1) *r2d_xz *r2d_xz)+B_0 *sin(x);} else if(prob_type==11) { if(r2d_xz_nd< one) { state_pert(i, j, k, RhoScalar_comp)=myhalf *A_0 *(one+std::cos(PI *r2d_xz_nd));} } else { if(r3d< r0) { state_pert(i, j, k, RhoScalar_comp)=A_0;} } state_pert(i, j, k, RhoScalar_comp) *=rho_0;} | |||
| ) |

| ParmParse pp | ( | "prob" | ) |
Referenced by ParallelFor().
Referenced by ParallelFor().
| int prob_type = -1 |
Referenced by ParallelFor().
Referenced by ParallelFor().
Referenced by ParallelFor().
Referenced by ParallelFor().
| Real xradius = amrex::Real(10.0) |
Referenced by ParallelFor().
Referenced by ParallelFor().
Referenced by ParallelFor().
| Real zradius = amrex::Real(10.0) |
Referenced by ParallelFor().