aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.H
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-08-26 11:08:54 -0700
committerGravatar GitHub <noreply@github.com> 2019-08-26 11:08:54 -0700
commit3d44362029fb39476f9542a10af9e0fc5eb1ef9b (patch)
treeaba3f6f4718bac605a257285403fabfecaa6296b /Source/Particles/WarpXParticleContainer.H
parent84a9c25163825d4fba4bf52fe0e05c54705f1901 (diff)
parent49dc1a600e30443c6d946689bfa80d3cd1091b1f (diff)
downloadWarpX-3d44362029fb39476f9542a10af9e0fc5eb1ef9b.tar.gz
WarpX-3d44362029fb39476f9542a10af9e0fc5eb1ef9b.tar.zst
WarpX-3d44362029fb39476f9542a10af9e0fc5eb1ef9b.zip
Merge pull request #287 from ECP-WarpX/boosted_frame_no_runtime
Remove runtime parameters from the lab frame diagnostics
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.H')
-rw-r--r--Source/Particles/WarpXParticleContainer.H18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H
index c252eee6b..c4bb5e410 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 = {
@@ -323,7 +332,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.
@@ -333,7 +345,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;