66template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value,
int> foo = 0>
109template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value,
int> foo = 0>
154template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value,
int> foo = 0>
157 int lev_min,
int lev_max, F&& f)
161 for (
int lev = lev_min; lev <= lev_max; ++lev)
163 const auto plo = pc.Geom(lev).ProbLoArray();
164 const auto dxi = pc.Geom(lev).InvCellSizeArray();
166#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
171 auto& tile = pti.GetParticleTile();
172 auto ptd = tile.getParticleTileData();
173 const auto np = tile.numParticles();
174 auto phi = (*distance_to_eb[lev])[pti].array();
181 amrex::ParticleReal xp, yp, zp;
182 getPosition(ip, xp, yp, zp);
185 amrex::Real W[AMREX_SPACEDIM][2];
187 xp, yp, zp, plo, dxi, i, j, k, W);
193 amrex::Real Wc[AMREX_SPACEDIM][2];
195 xp, yp, zp, plo, dxi, ic, jc, kc, Wc);
199#if (defined WARPX_DIM_3D)
203#elif (defined WARPX_DIM_XZ)
206#elif (defined WARPX_DIM_RZ)
207 pos[0] = std::sqrt(xp*xp + yp*yp);
209#elif (defined WARPX_DIM_1D_Z)
212 f(ptd, ip, pos, normal, engine);
void scrapeParticlesAtEB(PC &pc, ablastr::fields::MultiLevelScalarField const &distance_to_eb, int lev, F &&f)
Interact particles with the embedded boundary walls.
Definition ParticleScraper.H:68
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::RealVect interp_normal(int i, int j, int k, const amrex::Real W[3][2], int ic, int jc, int kc, const amrex::Real Wc[3][2], amrex::Array4< const amrex::Real > const &phi, amrex::GpuArray< amrex::Real, 3 > const &dxi) noexcept
Definition DistanceToEB.H:43
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::Real interp_field_nodal(int i, int j, int k, const amrex::Real W[3][2], amrex::Array4< const amrex::Real > const &scalar_field) noexcept
Interpolate nodal field value based on surrounding indices and weights.
Definition NodalFieldGather.H:139
AMREX_GPU_HOST_DEVICE AMREX_INLINE void compute_weights(const amrex::ParticleReal xp, const amrex::ParticleReal yp, const amrex::ParticleReal zp, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, int &i, int &j, int &k, amrex::Real W[3][2]) noexcept
Compute weight of each surrounding node (or cell-centered nodes) in interpolating a nodal ((or a cell...
Definition NodalFieldGather.H:37
Functor that can be used to extract the positions of the macroparticles inside a ParallelFor kernel.
Definition GetAndSetPosition.H:75
__host__ __device__ bool is_valid() const noexcept