72 int nlev = vars_new.size();
77 for (
int iline(0); iline<nline; ++iline) {
78 int dir =
m_dir[iline];
80 amrex::IntVect cell = bnd_bx.smallEnd();
83 for (
int ilev(nlev-1); ilev>=0; --ilev) {
86 amrex::MultiFab mf_cc_vel;
87 auto ba = vars_new[ilev][
Vars::cons].boxArray();
88 auto dm = vars_new[ilev][
Vars::cons].DistributionMap();
89 mf_cc_vel.define(ba, dm, AMREX_SPACEDIM, amrex::IntVect(1,1,1));
90 average_face_to_cellcenter(mf_cc_vel,0,
91 amrex::Array<const amrex::MultiFab*,3>{&vars_new[ilev][
Vars::xvel],
96 amrex::MultiFab mf_cc_data;
97 mf_cc_data.define(ba, dm, ncomp, 1);
99 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
101 for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
102 const amrex::Box& tbx = mfi.tilebox();
103 auto const& dfab = mf_cc_data.array(mfi);
104 auto const& tfab = vars_new[ilev][
Vars::cons].array(mfi);
105 auto const& wfab = mf_cc_vel.array(mfi);
106 amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
108 dfab(i,j,k,0) = tfab(i,j,k,1)/tfab(i,j,k,0);
109 dfab(i,j,k,1) = std::sqrt(wfab(i,j,k,0)*wfab(i,j,k,0)
110 + wfab(i,j,k,1)*wfab(i,j,k,1)
111 + wfab(i,j,k,2)*wfab(i,j,k,2)) ;
117 m_ls_mf[iline] = get_line_data(mf_cc_data, dir, cell, bnd_bx);
120 auto min_bnd_bx =
m_ls_mf[iline].boxArray().minimalBox();
121 if (bnd_bx == min_bnd_bx) {
continue; }
@ xvel
Definition: ERF_IndexDefines.H:130
@ cons
Definition: ERF_IndexDefines.H:129
@ zvel
Definition: ERF_IndexDefines.H:132
@ yvel
Definition: ERF_IndexDefines.H:131