diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Diagnostics/FieldIO.cpp | 4 | ||||
-rw-r--r-- | Source/WarpX.H | 1 | ||||
-rw-r--r-- | Source/WarpX.cpp | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Source/Diagnostics/FieldIO.cpp b/Source/Diagnostics/FieldIO.cpp index d4d46f1bd..e1bb8cb54 100644 --- a/Source/Diagnostics/FieldIO.cpp +++ b/Source/Diagnostics/FieldIO.cpp @@ -399,7 +399,7 @@ WarpX::AverageAndPackFields ( Vector<std::string>& varnames, const int ncomp = fields_to_plot.size() + static_cast<int>(plot_finepatch)*6 + static_cast<int>(plot_crsepatch)*6 - + static_cast<int>(costs[0] != nullptr); + + static_cast<int>(costs[0] != nullptr and plot_costs); // Loop over levels of refinement for (int lev = 0; lev <= finest_level; ++lev) @@ -558,7 +558,7 @@ WarpX::AverageAndPackFields ( Vector<std::string>& varnames, dcomp += 3; } - if (costs[0] != nullptr) + if (costs[0] != nullptr and plot_costs) { AverageAndPackScalarField( mf_avg[lev], *costs[lev], dcomp, ngrow ); if(lev==0) varnames.push_back("costs"); diff --git a/Source/WarpX.H b/Source/WarpX.H index 02a366ace..79c6189a7 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -554,6 +554,7 @@ private: bool dump_openpmd = false; #endif bool plot_rho = false; + bool plot_costs = true; bool plot_finepatch = false; bool plot_crsepatch = false; bool plot_raw_fields = false; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 5ace10ef4..b8633ca2c 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -379,7 +379,7 @@ WarpX::ReadParameters () // Read filter and fill IntVect filter_npass_each_dir with // proper size for AMREX_SPACEDIM - pp.query("use_filter", use_filter); + pp.query("use_filter", use_filter); Vector<int> parse_filter_npass_each_dir(AMREX_SPACEDIM,1); pp.queryarr("filter_npass_each_dir", parse_filter_npass_each_dir); filter_npass_each_dir[0] = parse_filter_npass_each_dir[0]; @@ -434,6 +434,7 @@ WarpX::ReadParameters () pp.query("dump_openpmd", dump_openpmd); pp.query("openpmd_backend", openpmd_backend); pp.query("dump_plotfiles", dump_plotfiles); + pp.query("plot_costs", plot_costs); pp.query("plot_raw_fields", plot_raw_fields); pp.query("plot_raw_fields_guards", plot_raw_fields_guards); pp.query("plot_coarsening_ratio", plot_coarsening_ratio); |