diff options
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | 14 | ||||
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp | 14 |
2 files changed, 14 insertions, 14 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; } } } diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp index c497ab618..60a30e6f6 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp @@ -268,11 +268,11 @@ PsatdAlgorithmRZ::pushSpectralFields(SpectralFieldDataRZ & f) { const Complex k_dot_B = -I * (kr * (Bp_old - Bm_old) + I * kz * Bz_old); - fields(i,j,k,Bp_m) += -c2 * kr * 0.5_rt * S_ck * G_old; - fields(i,j,k,Bm_m) += c2 * kr * 0.5_rt * S_ck * G_old; - fields(i,j,k,Bz_m) += I * c2 * kz * S_ck * G_old; + fields(i,j,k,Bp_m) += -kr * 0.5_rt * S_ck * G_old; + fields(i,j,k,Bm_m) += kr * 0.5_rt * S_ck * G_old; + fields(i,j,k,Bz_m) += I * kz * S_ck * G_old; - fields(i,j,k,G_m) = C * G_old + I * S_ck * k_dot_B; + fields(i,j,k,G_m) = C * G_old + I * c2 * S_ck * k_dot_B; } if (time_averaging) @@ -315,9 +315,9 @@ PsatdAlgorithmRZ::pushSpectralFields(SpectralFieldDataRZ & f) if (divb_cleaning) { - fields(i,j,k,Bp_avg_m) += -c2 * kr * 0.5_rt * ep0 * X1 * G_old; - fields(i,j,k,Bm_avg_m) += c2 * kr * 0.5_rt * ep0 * X1 * G_old; - fields(i,j,k,Bz_avg_m) += I * c2 * ep0 * X1 * G_old * kz; + fields(i,j,k,Bp_avg_m) += -kr * 0.5_rt * ep0 * X1 * G_old; + fields(i,j,k,Bm_avg_m) += kr * 0.5_rt * ep0 * X1 * G_old; + fields(i,j,k,Bz_avg_m) += I * ep0 * X1 * G_old * kz; } } } |