diff options
author | 2021-03-29 14:41:35 -0700 | |
---|---|---|
committer | 2021-03-29 14:41:35 -0700 | |
commit | bb7429d1d6088a2875d2020c1b9a79e66282c296 (patch) | |
tree | 367c26cae811e4c90e51be19df00122e0e03dca9 /Source/Initialization/WarpXInitData.cpp | |
parent | 26cd8897ef8be2e554254aaa2e30e5c3380bf916 (diff) | |
download | WarpX-bb7429d1d6088a2875d2020c1b9a79e66282c296.tar.gz WarpX-bb7429d1d6088a2875d2020c1b9a79e66282c296.tar.zst WarpX-bb7429d1d6088a2875d2020c1b9a79e66282c296.zip |
Add option for finite-order centering of currents (nodal to staggered) (#1763)
* Start adding centering of current
* Implement arbitrary order centering and split inputs
* No need to define a brand new interpolation function
* Update input file of hybrid CI tests
* Clean up
* Clean up more
* Fix bug and clean up
* Use current centering in two existing CI tests
* Update documentation
* Move Calls To UpdateCurrentNodalToStag Into SyncCurrent
* Add Doxygen For New Function UpdateCurrentNodalToStag
* Add Doxygen For New Functions Used For Stencil Coefficients
* Finite-Order Centering of Currents Not Implemented With MR
Diffstat (limited to 'Source/Initialization/WarpXInitData.cpp')
-rw-r--r-- | Source/Initialization/WarpXInitData.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp index 1852d871f..f07995c84 100644 --- a/Source/Initialization/WarpXInitData.cpp +++ b/Source/Initialization/WarpXInitData.cpp @@ -316,6 +316,11 @@ WarpX::InitLevelData (int lev, Real /*time*/) } } + if (WarpX::do_current_centering) + { + current_fp_nodal[lev][i]->setVal(0.0); + } + if (B_ext_grid_s == "constant" || B_ext_grid_s == "default") { Bfield_fp[lev][i]->setVal(B_external_grid[i]); if (fft_do_time_averaging) { |