ARTEMIS
ParticleBoundaryProcess.H
Go to the documentation of this file.
1 /* Copyright 2021 Andrew Myers
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 #ifndef PARTICLEBOUNDARYPROCESS_H_
8 #define PARTICLEBOUNDARYPROCESS_H_
9 
10 #include <AMReX_REAL.H>
11 #include <AMReX_RealVect.H>
12 #include <AMReX_Random.H>
13 
15 
16 struct NoOp {
17  template <typename PData>
19  void operator() (const PData& /*ptd*/, int /*i*/,
20  const amrex::RealVect& /*pos*/, const amrex::RealVect& /*normal*/,
21  amrex::RandomEngine const& /*engine*/) const noexcept
22  {}
23 };
24 
25 struct Absorb {
26  template <typename PData>
28  void operator() (const PData& ptd, int i,
29  const amrex::RealVect& /*pos*/, const amrex::RealVect& /*normal*/,
30  amrex::RandomEngine const& /*engine*/) const noexcept
31  {
32  auto& p = ptd.m_aos[i];
33  p.id() = -p.id();
34  }
35 };
36 }
37 
38 #endif
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
Definition: ParticleBoundaryProcess.H:14
i
Definition: check_interp_points_and_weights.py:174
Definition: ParticleBoundaryProcess.H:25
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(const PData &ptd, int i, const amrex::RealVect &, const amrex::RealVect &, amrex::RandomEngine const &) const noexcept
Definition: ParticleBoundaryProcess.H:28
Definition: ParticleBoundaryProcess.H:16
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(const PData &, int, const amrex::RealVect &, const amrex::RealVect &, amrex::RandomEngine const &) const noexcept
Definition: ParticleBoundaryProcess.H:19