aboutsummaryrefslogtreecommitdiff
path: root/Source/Initialization/WarpXInitData.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-17 16:00:19 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-17 16:00:19 -0700
commitdd12994479146ecc1dc8722b0b25e42ada0dde3e (patch)
treeac98cdc1f4485d15b0e5e86977af93193df00839 /Source/Initialization/WarpXInitData.cpp
parent10e34f54fd6ae1ad058d7c54681de088ed98044a (diff)
downloadWarpX-dd12994479146ecc1dc8722b0b25e42ada0dde3e.tar.gz
WarpX-dd12994479146ecc1dc8722b0b25e42ada0dde3e.tar.zst
WarpX-dd12994479146ecc1dc8722b0b25e42ada0dde3e.zip
add external field on grid at initialization
Diffstat (limited to 'Source/Initialization/WarpXInitData.cpp')
-rw-r--r--Source/Initialization/WarpXInitData.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp
index 385993f78..e890435f5 100644
--- a/Source/Initialization/WarpXInitData.cpp
+++ b/Source/Initialization/WarpXInitData.cpp
@@ -303,18 +303,18 @@ WarpX::InitLevelData (int lev, Real time)
{
for (int i = 0; i < 3; ++i) {
current_fp[lev][i]->setVal(0.0);
- Efield_fp[lev][i]->setVal(0.0);
- Bfield_fp[lev][i]->setVal(0.0);
+ Efield_fp[lev][i]->setVal(E_external_grid[i]);
+ Bfield_fp[lev][i]->setVal(B_external_grid[i]);
}
if (lev > 0) {
for (int i = 0; i < 3; ++i) {
- Efield_aux[lev][i]->setVal(0.0);
- Bfield_aux[lev][i]->setVal(0.0);
+ Efield_aux[lev][i]->setVal(E_external_grid[i]);
+ Bfield_aux[lev][i]->setVal(B_external_grid[i]);
current_cp[lev][i]->setVal(0.0);
- Efield_cp[lev][i]->setVal(0.0);
- Bfield_cp[lev][i]->setVal(0.0);
+ Efield_cp[lev][i]->setVal(E_external_grid[i]);
+ Bfield_cp[lev][i]->setVal(B_external_grid[i]);
}
}