Skip to content

Commit

Permalink
Fix Instability in PML with PSATD (ECP-WarpX#2558)
Browse files Browse the repository at this point in the history
* Fix Instability in PML with PSATD

Damping in PML should be applied before the communications between the regular grids and PML, and between PML grids take place, otherwise the ghost cells are filled with lagged information, which results in an instability. Closes ECP-WarpX#2525.

* Update checksum of the pml_psatd_dive_divb_cleaning test
  • Loading branch information
WeiqunZhang authored Nov 15, 2021
1 parent 5e1b4f4 commit 60c9ae5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"lev=0": {
"Bx": 1.3582454274967736e-08,
"By": 1.3585628519855815e-08,
"Bz": 1.3594037646470728e-08,
"Ex": 18.75779441734614,
"Ey": 18.75937784792576,
"Ez": 18.753302211359724,
"Bx": 1.357999256781357e-08,
"By": 1.358274729423031e-08,
"Bz": 1.358525756954841e-08,
"Ex": 1.874000101543667e+01,
"Ey": 1.873784914641192e+01,
"Ez": 1.873787090565788e+01,
"rho": 0.00017408482555034496
}
}
}
5 changes: 4 additions & 1 deletion Source/Evolve/WarpXEvolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ WarpX::OneStep_nosub (Real cur_time)
}
PushPSATD();

if (do_pml) {
DampPML();
}

if (use_hybrid_QED) {
FillBoundaryE(guard_cells.ng_alloc_EB);
FillBoundaryB(guard_cells.ng_alloc_EB);
Expand All @@ -428,7 +432,6 @@ WarpX::OneStep_nosub (Real cur_time)
NodalSync(Bfield_fp, Bfield_cp);

if (do_pml) {
DampPML();
NodalSyncPML();
}
} else {
Expand Down

0 comments on commit 60c9ae5

Please sign in to comment.