|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| ParmParse | pp_prob ("prob") |
| pp_prob | query ("U_0", U_0) |
| pp_prob | query ("V_0", V_0) |
| pp_prob | query ("W_0", W_0) |
| pp_prob | query ("U_0_Pert_Mag", U_0_Pert_Mag) |
| pp_prob | query ("V_0_Pert_Mag", V_0_Pert_Mag) |
| pp_prob | query ("W_0_Pert_Mag", W_0_Pert_Mag) |
| pp_prob | query ("pert_deltaU", pert_deltaU) |
| pp_prob | query ("pert_deltaV", pert_deltaV) |
| pp_prob | query ("pert_periods_U", pert_periods_U) |
| pp_prob | query ("pert_periods_V", pert_periods_V) |
| pp_prob | query ("pert_ref_height", pert_ref_height) |
| ParallelForRNG (xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=prob_lo[2]+(k+0.5) *dx[2];x_vel_pert(i, j, k)=U_0;if((z<=pert_ref_height) &&(U_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);Real x_vel_prime=(rand_double *2.0 - 1.0) *U_0_Pert_Mag;x_vel_pert(i, j, k)+=x_vel_prime;} if(pert_deltaU !=0.0) { const amrex::Real yl=y - prob_lo[1];const amrex::Real zl=z/pert_ref_height;const amrex::Real damp=std::exp(-0.5 *zl *zl);x_vel_pert(i, j, k)+=ufac *damp *z *std::cos(aval *yl);} }) | |
| ParallelForRNG (ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+0.5) *dx[0];const Real z=prob_lo[2]+(k+0.5) *dx[2];y_vel_pert(i, j, k)=V_0;if((z<=pert_ref_height) &&(V_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);Real y_vel_prime=(rand_double *2.0 - 1.0) *V_0_Pert_Mag;y_vel_pert(i, j, k)+=y_vel_prime;} if(pert_deltaV !=0.0) { const amrex::Real xl=x - prob_lo[0];const amrex::Real zl=z/pert_ref_height;const amrex::Real damp=std::exp(-0.5 *zl *zl);y_vel_pert(i, j, k)+=vfac *damp *z *std::cos(bval *xl);} }) | |
| ParallelForRNG (zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const int dom_lo_z=geomdata.Domain().smallEnd()[2];const int dom_hi_z=geomdata.Domain().bigEnd()[2];if(k==dom_lo_z||k==dom_hi_z+1) { z_vel_pert(i, j, k)=0.0;} else if(W_0_Pert_Mag !=0.0) { Real rand_double=amrex::Random(engine);Real z_vel_prime=(rand_double *2.0 - 1.0) *W_0_Pert_Mag;z_vel_pert(i, j, k)=W_0+z_vel_prime;} }) | |
Variables | |
| Real | U_0 = 0.0 |
| Real | V_0 = 0.0 |
| Real | W_0 = 0.0 |
| Real | U_0_Pert_Mag = 0.0 |
| Real | V_0_Pert_Mag = 0.0 |
| Real | W_0_Pert_Mag = 0.0 |
| Real | pert_deltaU = 0.0 |
| Real | pert_deltaV = 0.0 |
| Real | pert_periods_U = 5.0 |
| Real | pert_periods_V = 5.0 |
| Real | pert_ref_height = 100.0 |
| Real | prob_lo_x = geomdata.ProbLo(0) |
| Real | prob_lo_y = geomdata.ProbLo(1) |
| Real | prob_hi_x = geomdata.ProbHi(0) |
| Real | prob_hi_y = geomdata.ProbHi(1) |
| Real | aval = pert_periods_U * 2.0 * PI / (prob_hi_y - prob_lo_y) |
| Real | bval = pert_periods_V * 2.0 * PI / (prob_hi_x - prob_lo_x) |
| Real | ufac = pert_deltaU * std::exp(0.5) / pert_ref_height |
| Real | vfac = pert_deltaV * std::exp(0.5) / pert_ref_height |
| ParallelForRNG | ( | xbx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=prob_lo[2]+(k+0.5) *dx[2];x_vel_pert(i, j, k)=U_0;if((z<=pert_ref_height) &&(U_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);Real x_vel_prime=(rand_double *2.0 - 1.0) *U_0_Pert_Mag;x_vel_pert(i, j, k)+=x_vel_prime;} if(pert_deltaU !=0.0) { const amrex::Real yl=y - prob_lo[1];const amrex::Real zl=z/pert_ref_height;const amrex::Real damp=std::exp(-0.5 *zl *zl);x_vel_pert(i, j, k)+=ufac *damp *z *std::cos(aval *yl);} } | |||
| ) |
| ParallelForRNG | ( | ybx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+0.5) *dx[0];const Real z=prob_lo[2]+(k+0.5) *dx[2];y_vel_pert(i, j, k)=V_0;if((z<=pert_ref_height) &&(V_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);Real y_vel_prime=(rand_double *2.0 - 1.0) *V_0_Pert_Mag;y_vel_pert(i, j, k)+=y_vel_prime;} if(pert_deltaV !=0.0) { const amrex::Real xl=x - prob_lo[0];const amrex::Real zl=z/pert_ref_height;const amrex::Real damp=std::exp(-0.5 *zl *zl);y_vel_pert(i, j, k)+=vfac *damp *z *std::cos(bval *xl);} } | |||
| ) |
| ParallelForRNG | ( | zbx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const int dom_lo_z=geomdata.Domain().smallEnd()[2];const int dom_hi_z=geomdata.Domain().bigEnd()[2];if(k==dom_lo_z||k==dom_hi_z+1) { z_vel_pert(i, j, k)=0.0;} else if(W_0_Pert_Mag !=0.0) { Real rand_double=amrex::Random(engine);Real z_vel_prime=(rand_double *2.0 - 1.0) *W_0_Pert_Mag;z_vel_pert(i, j, k)=W_0+z_vel_prime;} } | |||
| ) |
| ParmParse pp_prob | ( | "prob" | ) |
| pp_prob query | ( | "pert_deltaU" | , |
| pert_deltaU | |||
| ) |
| pp_prob query | ( | "pert_deltaV" | , |
| pert_deltaV | |||
| ) |
| pp_prob query | ( | "pert_periods_U" | , |
| pert_periods_U | |||
| ) |
| pp_prob query | ( | "pert_periods_V" | , |
| pert_periods_V | |||
| ) |
| pp_prob query | ( | "pert_ref_height" | , |
| pert_ref_height | |||
| ) |
| pp_prob query | ( | "U_0_Pert_Mag" | , |
| U_0_Pert_Mag | |||
| ) |
| pp_prob query | ( | "V_0_Pert_Mag" | , |
| V_0_Pert_Mag | |||
| ) |
| pp_prob query | ( | "W_0_Pert_Mag" | , |
| W_0_Pert_Mag | |||
| ) |
| Real aval = pert_periods_U * 2.0 * PI / (prob_hi_y - prob_lo_y) |
Referenced by ParallelForRNG().
| Real bval = pert_periods_V * 2.0 * PI / (prob_hi_x - prob_lo_x) |
Referenced by ParallelForRNG().
| Real pert_deltaU = 0.0 |
Referenced by ParallelForRNG().
| Real pert_deltaV = 0.0 |
Referenced by ParallelForRNG().
| Real pert_periods_U = 5.0 |
| Real pert_periods_V = 5.0 |
| Real pert_ref_height = 100.0 |
Referenced by ParallelForRNG().
| Real prob_hi_x = geomdata.ProbHi(0) |
| Real prob_hi_y = geomdata.ProbHi(1) |
| Real prob_lo_x = geomdata.ProbLo(0) |
| Real prob_lo_y = geomdata.ProbLo(1) |
| Real U_0 = 0.0 |
Referenced by ParallelForRNG().
| Real U_0_Pert_Mag = 0.0 |
Referenced by ParallelForRNG().
| Real ufac = pert_deltaU * std::exp(0.5) / pert_ref_height |
Referenced by ParallelForRNG().
| Real V_0 = 0.0 |
Referenced by ParallelForRNG().
| Real V_0_Pert_Mag = 0.0 |
Referenced by ParallelForRNG().
| Real vfac = pert_deltaV * std::exp(0.5) / pert_ref_height |
Referenced by ParallelForRNG().
| Real W_0 = 0.0 |
Referenced by ParallelForRNG().
| Real W_0_Pert_Mag = 0.0 |
Referenced by ParallelForRNG().