From 6bca0956123895d7641bf710d69aff04419470af Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Wed, 8 May 2019 17:28:47 -0700 Subject: further cleaning and fix bug when using MR --- Source/Particles/MultiParticleContainer.H | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'Source/Particles/MultiParticleContainer.H') diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H index 0c5e49c04..cc9dc1f59 100644 --- a/Source/Particles/MultiParticleContainer.H +++ b/Source/Particles/MultiParticleContainer.H @@ -178,17 +178,6 @@ public: void UpdateContinuousInjectionPosition(amrex::Real dt) const; int doContinuousInjection() const; - // - // Parameters for the Cherenkov corrector in the FDTD solver. - // Both stencils are calculated ar runtime. - // - // Number of coefficients for the stencil of the NCI corrector. - // The stencil is applied in the z direction only. - static constexpr int nstencilz_fdtd_nci_corr=5; - - amrex::Vector > fdtd_nci_stencilz_ex; - amrex::Vector > fdtd_nci_stencilz_by; - std::vector GetSpeciesNames() const { return species_names; } PhysicalParticleContainer& GetPCtmp () { return *pc_tmp; } -- cgit v1.2.3 From 914373c1f395d4944aea95d520d9f3701614cd32 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Tue, 4 Jun 2019 14:26:58 -0700 Subject: set the component names on a species-by-species basis, since they will differ based on whether boosted frame diags are requested or not --- Source/Diagnostics/ParticleIO.cpp | 38 +++++++++++++++++++++++++++---- Source/Diagnostics/WarpXIO.cpp | 2 +- Source/Particles/MultiParticleContainer.H | 3 +-- 3 files changed, 36 insertions(+), 7 deletions(-) (limited to 'Source/Particles/MultiParticleContainer.H') diff --git a/Source/Diagnostics/ParticleIO.cpp b/Source/Diagnostics/ParticleIO.cpp index 0f6246715..f2a543ed5 100644 --- a/Source/Diagnostics/ParticleIO.cpp +++ b/Source/Diagnostics/ParticleIO.cpp @@ -74,15 +74,45 @@ MultiParticleContainer::Checkpoint (const std::string& dir) const } void -MultiParticleContainer::WritePlotFile (const std::string& dir, - const Vector& real_names) const +MultiParticleContainer::WritePlotFile (const std::string& dir) const { Vector int_names; Vector int_flags; - + for (unsigned i = 0, n = species_names.size(); i < n; ++i) { - auto& pc = allcontainers[i]; + auto& pc = allcontainers[i]; if (pc->plot_species) { + + Vector real_names; + real_names.push_back("weight"); + + real_names.push_back("momentum_x"); + real_names.push_back("momentum_y"); + real_names.push_back("momentum_z"); + + real_names.push_back("Ex"); + real_names.push_back("Ey"); + real_names.push_back("Ez"); + + real_names.push_back("Bx"); + real_names.push_back("By"); + real_names.push_back("Bz"); + +#ifdef WARPX_RZ + real_names.push_back("theta"); +#endif + + if (WarpX::do_boosted_frame_diagnostic && pc->DoBoostedFrameDiags()) + { + real_names.push_back("xold"); + real_names.push_back("yold"); + real_names.push_back("zold"); + + real_names.push_back("uxold"); + real_names.push_back("uyold"); + real_names.push_back("uzold"); + } + // Convert momentum to SI pc->ConvertUnits(ConvertDirection::WarpX_to_SI); // real_names contains a list of all particle attributes. diff --git a/Source/Diagnostics/WarpXIO.cpp b/Source/Diagnostics/WarpXIO.cpp index 7e7ed278d..dedd11f4a 100644 --- a/Source/Diagnostics/WarpXIO.cpp +++ b/Source/Diagnostics/WarpXIO.cpp @@ -644,7 +644,7 @@ WarpX::WritePlotFile () const particle_varnames.push_back("uzold"); } - mypc->WritePlotFile(plotfilename, particle_varnames); + mypc->WritePlotFile(plotfilename); WriteJobInfo(plotfilename); diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H index aaf7ead0e..869126fef 100644 --- a/Source/Particles/MultiParticleContainer.H +++ b/Source/Particles/MultiParticleContainer.H @@ -129,8 +129,7 @@ public: void Checkpoint (const std::string& dir) const; - void WritePlotFile( const std::string& dir, - const amrex::Vector& real_names) const; + void WritePlotFile (const std::string& dir) const; void Restart (const std::string& dir); -- cgit v1.2.3