4#ifdef REMORA_USE_PARTICLES
8#include <AMReX_Particles.H>
51 const std::string
tracers =
"tracer_particles";
52 const std::string
hydro =
"hydro_particles";
59 amrex::IntVect operator() (
P const&
p,
60 amrex::GpuArray<amrex::Real,AMREX_SPACEDIM>
const&
plo,
61 amrex::GpuArray<amrex::Real,AMREX_SPACEDIM>
const&
dxi,
62 const amrex::Box& domain )
const noexcept
66 int(amrex::Math::floor((
p.pos(1)-
plo[1])*
dxi[1])),
67 p.idata(REMORAParticlesIntIdxAoS::k) ) );
68 iv[0] += domain.smallEnd()[0];
69 iv[1] += domain.smallEnd()[1];
77 amrex::GpuArray<amrex::Real,AMREX_SPACEDIM>
const&
a_plo,
78 amrex::GpuArray<amrex::Real,AMREX_SPACEDIM>
const&
a_dxi,
81 amrex::IntVect
iv(
int(amrex::Math::floor((
a_p.pos(0)-
a_plo[0])*
a_dxi[0])),
83 a_p.idata(REMORAParticlesIntIdxAoS::k) );
86 amrex::Real
lx = (
a_p.pos(0)-
a_plo[0])*
a_dxi[0] -
static_cast<amrex::Real
>(
iv[0]);
87 amrex::Real
ly = (
a_p.pos(1)-
a_plo[1])*
a_dxi[1] -
static_cast<amrex::Real
>(
iv[1]);
98 a_p.idata(REMORAParticlesIntIdxAoS::k) += 1;
99 }
else if (
a_p.pos(2) <=
zlo) {
100 a_p.idata(REMORAParticlesIntIdxAoS::k) -= 1;
105class REMORAPC :
public amrex::ParticleContainer< REMORAParticlesRealIdxAoS::ncomps,
106 REMORAParticlesIntIdxAoS::ncomps,
107 REMORAParticlesRealIdxSoA::ncomps,
108 REMORAParticlesIntIdxSoA::ncomps,
109 amrex::DefaultAllocator,
110 REMORAParticlesAssignor >
116 const std::string&
a_name =
"particles" )
131 const amrex::DistributionMapping&
a_dmap,
132 const amrex::BoxArray&
a_ba,
133 const std::string&
a_name =
"particles" )
152 amrex::Vector<amrex::MultiFab const*>&
a_flow_vel,
153 const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& );
156 virtual amrex::Vector<std::string>
varNames ()
const
166 return {
"mass_density"};
172 amrex::Vector<amrex::MultiFab const*>&,
173 const std::unique_ptr<amrex::MultiFab>& );
176 virtual void massDensity ( amrex::MultiFab&,
const int&,
const int&
a_comp = 0)
const;
180 amrex::MultiFab&
a_mf,
181 const int a_lev)
const
193 BL_PROFILE(
"REMORAPCPC::setAdvectWithFlow()");
constexpr amrex::Real one
constexpr amrex::Real zero
mf_h setVal(geomdata.ProbHi(2))