diff options
author | 2021-10-21 10:01:39 -0700 | |
---|---|---|
committer | 2021-10-21 10:01:39 -0700 | |
commit | 7d011e8f733c9bcb1de8d44c27bf912655d36068 (patch) | |
tree | ac70d3e05ef087f36c3fd56918bd182cd14c6295 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | |
parent | 5500567e17314557c44c84bf38b135aeb75d9a99 (diff) | |
download | WarpX-7d011e8f733c9bcb1de8d44c27bf912655d36068.tar.gz WarpX-7d011e8f733c9bcb1de8d44c27bf912655d36068.tar.zst WarpX-7d011e8f733c9bcb1de8d44c27bf912655d36068.zip |
Div(B) Cleaning: Change Normalization of G (#2429)
* PSATD with div(B) Cleaning: Change Normalization of G
* Use New Normalization also in RZ
* Use New Normalization also in FDTD
* Reset Benchmark of Test divb_cleaning_3d
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp index b3a4ec885..4fc2910db 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp @@ -324,11 +324,11 @@ PsatdAlgorithm::pushSpectralFields (SpectralFieldData& f) const { const Complex k_dot_B = kx * Bx_old + ky * By_old + kz * Bz_old; - fields(i,j,k,Idx.Bx) += I * c2 * S_ck * G_old * kx; - fields(i,j,k,Idx.By) += I * c2 * S_ck * G_old * ky; - fields(i,j,k,Idx.Bz) += I * c2 * S_ck * G_old * kz; + fields(i,j,k,Idx.Bx) += I * S_ck * G_old * kx; + fields(i,j,k,Idx.By) += I * S_ck * G_old * ky; + fields(i,j,k,Idx.Bz) += I * S_ck * G_old * kz; - fields(i,j,k,Idx.G) = C * G_old + I * S_ck * k_dot_B; + fields(i,j,k,Idx.G) = C * G_old + I * c2 * S_ck * k_dot_B; } if (time_averaging) @@ -373,9 +373,9 @@ PsatdAlgorithm::pushSpectralFields (SpectralFieldData& f) const if (divb_cleaning) { - fields(i,j,k,Idx.Bx_avg) += I * c2 * ep0 * X1 * G_old * kx; - fields(i,j,k,Idx.By_avg) += I * c2 * ep0 * X1 * G_old * ky; - fields(i,j,k,Idx.Bz_avg) += I * c2 * ep0 * X1 * G_old * kz; + fields(i,j,k,Idx.Bx_avg) += I * ep0 * X1 * G_old * kx; + fields(i,j,k,Idx.By_avg) += I * ep0 * X1 * G_old * ky; + fields(i,j,k,Idx.Bz_avg) += I * ep0 * X1 * G_old * kz; } } } |