diff options
author | 2018-10-04 17:18:55 -0700 | |
---|---|---|
committer | 2018-10-04 17:18:55 -0700 | |
commit | 129eb13c2798467ede32cce1ceb80330d8067b75 (patch) | |
tree | 3d35ac99c8681b03c4f078e8a82a6f2058340219 /Source/WarpX.cpp | |
parent | c669619caa759191a6a72e8425954e7b2616f48a (diff) | |
parent | f98df173fb6c97d6c1cd13e204ee37f478f6680a (diff) | |
download | WarpX-129eb13c2798467ede32cce1ceb80330d8067b75.tar.gz WarpX-129eb13c2798467ede32cce1ceb80330d8067b75.tar.zst WarpX-129eb13c2798467ede32cce1ceb80330d8067b75.zip |
Merge branch 'dev' into depositonmaingrid
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 0eab65582..3e1b225ac 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -161,6 +161,7 @@ WarpX::WarpX () current_buffer_masks.resize(nlevs_max); gather_buffer_masks.resize(nlevs_max); current_buf.resize(nlevs_max); + charge_buf.resize(nlevs_max); pml.resize(nlevs_max); @@ -332,6 +333,12 @@ 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 (plot_rho || plot_F){ + AMREX_ALWAYS_ASSERT_WITH_MESSAGE(do_dive_cleaning, + "plot_rho and plot_F only work if warpx.do_dive_cleaning = 1"); + } if (maxLevel() > 0) { pp.query("plot_finepatch", plot_finepatch); @@ -457,6 +464,8 @@ WarpX::ClearLevel (int lev) current_buf[lev][i].reset(); } + charge_buf[lev].reset(); + current_buffer_masks[lev].reset(); gather_buffer_masks[lev].reset(); @@ -642,6 +651,9 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d current_buf[lev][0].reset( new MultiFab(amrex::convert(cba,jx_nodal_flag),dm,1,ngJ)); current_buf[lev][1].reset( new MultiFab(amrex::convert(cba,jy_nodal_flag),dm,1,ngJ)); current_buf[lev][2].reset( new MultiFab(amrex::convert(cba,jz_nodal_flag),dm,1,ngJ)); + if (do_dive_cleaning) { + charge_buf[lev].reset( new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2,ngRho)); + } current_buffer_masks[lev].reset( new iMultiFab(ba, dm, 1, 0) ); } } |