diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WarpX.H | 2 | ||||
-rw-r--r-- | Source/WarpX.cpp | 2 | ||||
-rw-r--r-- | Source/WarpXIO.cpp | 22 |
3 files changed, 26 insertions, 0 deletions
diff --git a/Source/WarpX.H b/Source/WarpX.H index e3c7956b2..2fd758159 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -432,6 +432,8 @@ private: bool plot_proc_number = false; bool plot_dive = false; bool plot_divb = true; + bool plot_rho = false; + bool plot_F = false; bool plot_finepatch = false; bool plot_crsepatch = false; bool plot_raw_fields = false; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index b86de2b20..bf9dec33b 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -332,6 +332,8 @@ WarpX::ReadParameters () pp.query("plot_proc_number" , plot_proc_number); pp.query("plot_dive" , plot_dive); pp.query("plot_divb" , plot_divb); + pp.query("plot_rho" , plot_rho); + pp.query("plot_F" , plot_F); if (maxLevel() > 0) { pp.query("plot_finepatch", plot_finepatch); diff --git a/Source/WarpXIO.cpp b/Source/WarpXIO.cpp index cf4c2e01b..0102c3ccd 100644 --- a/Source/WarpXIO.cpp +++ b/Source/WarpXIO.cpp @@ -468,6 +468,8 @@ WarpX::WritePlotFile () const + static_cast<int>(plot_proc_number) + static_cast<int>(plot_divb) + static_cast<int>(plot_dive) + + static_cast<int>(plot_rho) + + static_cast<int>(plot_F) + static_cast<int>(plot_finepatch)*6 + static_cast<int>(plot_crsepatch)*6 + static_cast<int>(costs[0] != nullptr); @@ -618,6 +620,26 @@ WarpX::WritePlotFile () const dcomp += 1; } + if (plot_rho) + { + amrex::average_node_to_cellcenter(*mf[lev], dcomp, *rho_fp[lev], 0, 1); + if (lev == 0) + { + varnames.push_back("rho"); + } + dcomp += 1; + } + + if (plot_F) + { + amrex::average_node_to_cellcenter(*mf[lev], dcomp, *F_fp[lev], 0, 1); + if (lev == 0) + { + varnames.push_back("F"); + } + dcomp += 1; + } + if (plot_finepatch) { PackPlotDataPtrs(srcmf, Efield_fp[lev]); |