From aa1f6f2d9408d702cbb35b95ff4a46b7adfe0c12 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Wed, 22 Nov 2023 12:38:26 -0800 Subject: [PATCH] fix particle output (#1315) --- Source/IO/Plotfile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/IO/Plotfile.cpp b/Source/IO/Plotfile.cpp index a6b221333..95a75e179 100644 --- a/Source/IO/Plotfile.cpp +++ b/Source/IO/Plotfile.cpp @@ -59,7 +59,13 @@ ERF::setPlotVariables (const std::string& pp_plot_var_names, Vector } for (int i = 0; i < derived_names.size(); ++i) { if ( containerHasElement(plot_var_names, derived_names[i]) ) { +#ifdef ERF_USE_PARTICLES + if ( (solverChoice.use_terrain || (derived_names[i] != "z_phys" && derived_names[i] != "detJ") ) && + (particleData.use_tracer_particles || (derived_names[i] != "tracer_particle_count") ) && + (particleData.use_hydro_particles || (derived_names[i] != "hydro_particle_count") ) ) { +#else if (solverChoice.use_terrain || (derived_names[i] != "z_phys" && derived_names[i] != "detJ") ) { +#endif tmp_plot_names.push_back(derived_names[i]); } }