aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-05-06 10:37:55 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-06 10:37:55 -0700
commita1f55e18011d06e975a5bd68ea84badbdfd485cc (patch)
tree442172d2e42a8d448d8d8dbd7450a05aab1b5716 /Source
parente50f166a7e1cf517fe9383db6c59dbcae0fcea89 (diff)
downloadWarpX-a1f55e18011d06e975a5bd68ea84badbdfd485cc.tar.gz
WarpX-a1f55e18011d06e975a5bd68ea84badbdfd485cc.tar.zst
WarpX-a1f55e18011d06e975a5bd68ea84badbdfd485cc.zip
Option whether to dump rz modes (#986)
* add option to write (or not) all modes when running RZ * do not dump rz modes in Langmuir_multi_rz
Diffstat (limited to 'Source')
-rw-r--r--Source/Diagnostics/Diagnostics.H2
-rw-r--r--Source/Diagnostics/Diagnostics.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/Source/Diagnostics/Diagnostics.H b/Source/Diagnostics/Diagnostics.H
index 01ae6cca3..3ea4d2218 100644
--- a/Source/Diagnostics/Diagnostics.H
+++ b/Source/Diagnostics/Diagnostics.H
@@ -84,6 +84,8 @@ private:
bool m_plot_raw_rho = false;
/** Whether to plot F (charge conservation error) in raw fields */
bool m_plot_raw_F = false;
+ /** Whether to dump the RZ modes */
+ bool m_dump_rz_modes = false;
/** Whether this iteration has already been dumped, to avoid writing data twice */
int m_already_done = false;
/** Name of species to write to file */
diff --git a/Source/Diagnostics/Diagnostics.cpp b/Source/Diagnostics/Diagnostics.cpp
index ba5ba950b..8ad4d4153 100644
--- a/Source/Diagnostics/Diagnostics.cpp
+++ b/Source/Diagnostics/Diagnostics.cpp
@@ -61,6 +61,9 @@ Diagnostics::ReadParameters ()
std::remove(m_varnames.begin(), m_varnames.end(), "proc_number"),
m_varnames.end());
}
+#ifdef WARPX_DIM_RZ
+ pp.query("dump_rz_modes", m_dump_rz_modes);
+#endif
// Read user-defined physical extents for the output and store in m_lo and m_hi.
m_lo.resize(AMREX_SPACEDIM);
@@ -211,6 +214,9 @@ void
Diagnostics::AddRZModesToDiags (int lev)
{
#ifdef WARPX_DIM_RZ
+
+ if (!m_dump_rz_modes) return;
+
auto & warpx = WarpX::GetInstance();
int ncomp_multimodefab = warpx.get_pointer_Efield_aux(0, 0)->nComp();
// Make sure all multifabs have the same number of components