aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-07-19 10:11:04 -0700
committerGravatar GitHub <noreply@github.com> 2021-07-19 10:11:04 -0700
commit8a9f56b4bf5236d854c481db41bbcb857da00887 (patch)
tree3ca080943084f0b1af74de2d6f5c792c01efde7e /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
parent5e8efa77463148d1414c109cb3db5571c5b8c307 (diff)
downloadWarpX-8a9f56b4bf5236d854c481db41bbcb857da00887.tar.gz
WarpX-8a9f56b4bf5236d854c481db41bbcb857da00887.tar.zst
WarpX-8a9f56b4bf5236d854c481db41bbcb857da00887.zip
Fix Bug in Multi-J PSATD Equations (#2106)
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
index 36e113555..276ea0a71 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
@@ -279,13 +279,13 @@ PsatdAlgorithm::pushSpectralFields (SpectralFieldData& f) const
fields(i,j,k,Idx.Ez) += -X1 * (Jz_new - Jz) / dt + I * c2 * S_ck * F_old * kz;
- fields(i,j,k,Idx.Bx) += I * X2/c2 * (ky * (Jz_new - Jz) - kz * (Jy_new - Jy));
+ fields(i,j,k,Idx.Bx) += I * X2/c2 * (ky * (Jz_new - Jz) - kz * (Jy_new - Jy))
+ I * c2 * S_ck * G_old * kx;
- fields(i,j,k,Idx.By) += I * X2/c2 * (kz * (Jx_new - Jx) - kx * (Jz_new - Jz));
+ fields(i,j,k,Idx.By) += I * X2/c2 * (kz * (Jx_new - Jx) - kx * (Jz_new - Jz))
+ I * c2 * S_ck * G_old * ky;
- fields(i,j,k,Idx.Bz) += I * X2/c2 * (kx * (Jy_new - Jy) - ky * (Jx_new - Jx));
+ fields(i,j,k,Idx.Bz) += I * X2/c2 * (kx * (Jy_new - Jy) - ky * (Jx_new - Jx))
+ I * c2 * S_ck * G_old * kz;
const Complex k_dot_J = kx * Jx + ky * Jy + kz * Jz;