Copies the contents of one boundary register to another in either x or y dimensions.
21 int ncomp = b1[ori].nComp();
22 if (ori.coordDir() < 2) {
24 #pragma omp parallel if (Gpu::notInLaunchRegion())
26 for (FabSetIter bfsi(b1[ori]); bfsi.isValid(); ++bfsi) {
27 int idx = bfsi.index();
28 const Box& bx1 = b1[ori].boxArray()[
idx];
29 const Box& bx2 = b2[ori].boxArray()[
idx];
32 Array4<Real> dest_arr = b2[ori][
idx].array();
33 Array4<Real const> src_arr = b1[ori][
idx].const_array();
34 int ioff = bx1.smallEnd(0) - bx2.smallEnd(0);
35 int joff = bx1.smallEnd(1) - bx2.smallEnd(1);
37 [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
int n) noexcept
39 dest_arr(i,j,k,n) = src_arr(i+ioff,j+joff,k,n);
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+0.5) *dx[0];const Real y=(j+0.5) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - 1.0)/(2.0 *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(1.0+deltaT, inv_gm1);const Real T=(1.0+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=0.25 *(1.0+std::cos(PI *std::min(r2d_xy, R)/R));})
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int idx(int i, int j, int k, int nx, int ny)
Definition: ERF_InitForEnsemble.cpp:287