diff options
author | 2019-08-27 13:50:26 -0700 | |
---|---|---|
committer | 2019-08-27 13:50:26 -0700 | |
commit | 0a5ae49781b43864d60fe8f6e91f6c1831930708 (patch) | |
tree | e81b21329d095d99e4016b0685eac91092a79ee1 /Source/Particles/WarpXParticleContainer.H | |
parent | 7a5d2666a6a266f94e4acaa5710ffb0e453d6600 (diff) | |
parent | 17eefa31d683117b365c7c272f2e3631c64c71a3 (diff) | |
download | WarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.tar.gz WarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.tar.zst WarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.zip |
Merge branch 'dev' into RZgeometry
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.H')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.H | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H index 1f144f628..bc46a116b 100644 --- a/Source/Particles/WarpXParticleContainer.H +++ b/Source/Particles/WarpXParticleContainer.H @@ -29,6 +29,15 @@ struct DiagIdx }; }; +struct TmpIdx +{ + enum { + xold = 0, + yold, zold, uxold, uyold, uzold, + nattribs + }; +}; + namespace ParticleStringNames { const std::map<std::string, int> to_index = { @@ -326,7 +335,10 @@ protected: amrex::Vector<amrex::FArrayBox> local_jy; amrex::Vector<amrex::FArrayBox> local_jz; - amrex::Vector<amrex::Cuda::ManagedDeviceVector<amrex::Real> > m_xp, m_yp, m_zp, m_giv; + using DataContainer = amrex::Gpu::ManagedDeviceVector<amrex::Real>; + using PairIndex = std::pair<int, int>; + + amrex::Vector<DataContainer> m_xp, m_yp, m_zp, m_giv; // Whether to dump particle quantities. // If true, particle position is always dumped. @@ -336,7 +348,9 @@ protected: amrex::Vector<int> plot_flags; // list of names of attributes to dump. amrex::Vector<std::string> plot_vars; - + + amrex::Vector<std::map<PairIndex, std::array<DataContainer, TmpIdx::nattribs> > > tmp_particle_data; + private: virtual void particlePostLocate(ParticleType& p, const amrex::ParticleLocData& pld, const int lev) override; |