aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> 2022-10-24 18:01:36 +0200
committerGravatar GitHub <noreply@github.com> 2022-10-24 09:01:36 -0700
commitc27b85db2b606f4474e5b331e4f9aeebaaf2da30 (patch)
treea39679eef3b31ce418b6d246e28661b213878032 /Source
parent137ec92644fe88b589ef014e03a96b6366605dc9 (diff)
downloadWarpX-c27b85db2b606f4474e5b331e4f9aeebaaf2da30.tar.gz
WarpX-c27b85db2b606f4474e5b331e4f9aeebaaf2da30.tar.zst
WarpX-c27b85db2b606f4474e5b331e4f9aeebaaf2da30.zip
Do not query redundant `do_back_transformed_particles` (#3183)
* Do not query redundant do_back_transformed_particles * Only set m_do_back_transformed_particles to true if write_species is true
Diffstat (limited to 'Source')
-rw-r--r--Source/Diagnostics/BTDiagnostics.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Diagnostics/BTDiagnostics.cpp b/Source/Diagnostics/BTDiagnostics.cpp
index dd82bcf0e..c519cd248 100644
--- a/Source/Diagnostics/BTDiagnostics.cpp
+++ b/Source/Diagnostics/BTDiagnostics.cpp
@@ -106,7 +106,7 @@ void BTDiagnostics::DerivedInitData ()
if (m_output_species_names.size() == 0 and write_species == 1)
m_output_species_names = mpc.GetSpeciesNames();
- if (m_output_species_names.size() > 0) {
+ if (m_output_species_names.size() > 0 and write_species == 1) {
m_do_back_transformed_particles = true;
} else {
m_do_back_transformed_particles = false;
@@ -158,8 +158,6 @@ BTDiagnostics::ReadParameters ()
m_file_prefix = "diags/" + m_diag_name;
pp_diag_name.query("file_prefix", m_file_prefix);
pp_diag_name.query("do_back_transformed_fields", m_do_back_transformed_fields);
- pp_diag_name.query("do_back_transformed_particles", m_do_back_transformed_particles);
- AMREX_ALWAYS_ASSERT(m_do_back_transformed_fields or m_do_back_transformed_particles);
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(m_do_back_transformed_fields, " fields must be turned on for the new back-transformed diagnostics");
if (m_do_back_transformed_fields == false) m_varnames.clear();