diff options
author | 2021-07-26 18:32:45 -0700 | |
---|---|---|
committer | 2021-07-26 18:32:45 -0700 | |
commit | 2059fa7d75cd0557755b2797405e8864e897e07e (patch) | |
tree | 882186bd8806e3ce8ea80aa9eb85d7a9bea05ab3 /Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | |
parent | e86f39a07456e6a0d1a03c5a24116778b3cf0d19 (diff) | |
download | WarpX-2059fa7d75cd0557755b2797405e8864e897e07e.tar.gz WarpX-2059fa7d75cd0557755b2797405e8864e897e07e.tar.zst WarpX-2059fa7d75cd0557755b2797405e8864e897e07e.zip |
RZ PSATD: Multi-J Algorithm (#2111)
* RZ PSATD: Implement Multi-J Algorithm
* Implement J_linear_in_time Option
* Reduce Style Changes
* Move Copy/Zero/Scale Functions to SpectralFieldDataRZ
* Remove Unused Member m_n_rz_azimuthal_modes from SpectralSolverRZ
* Fix CI -Werror Warnings
* Implement Same Changes of #2116, Cleaning
* Fix Bug: Pass Correct dt to SpectralSolverRZ
* Add CI Test
* CI Test: Set random_theta = 0, Update Benchmark
* Remove random_theta from Inputs
* Update Benchmark of multi_J_rz_psatd
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp index 8f46d21cd..12c2dabf2 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp @@ -32,7 +32,11 @@ SpectralSolverRZ::SpectralSolverRZ (const int lev, int const norder_z, bool const nodal, const amrex::Array<amrex::Real,3>& v_galilean, amrex::RealVect const dx, amrex::Real const dt, - bool const update_with_rho) + bool const update_with_rho, + const bool fft_do_time_averaging, + const bool J_linear_in_time, + const bool dive_cleaning, + const bool divb_cleaning) : k_space(realspace_ba, dm, dx) { // Initialize all structures using the same distribution mapping dm @@ -41,13 +45,9 @@ SpectralSolverRZ::SpectralSolverRZ (const int lev, // the spectral space corresponding to each box in `realspace_ba`, // as well as the value of the corresponding k coordinates. - const bool time_averaging = false; - const bool J_linear_in_time = false; - const bool dive_cleaning = false; - const bool divb_cleaning = false; const bool pml = false; - m_spectral_index = SpectralFieldIndex(update_with_rho, time_averaging, J_linear_in_time, - dive_cleaning, divb_cleaning, pml); + m_spectral_index = SpectralFieldIndex(update_with_rho, fft_do_time_averaging, + J_linear_in_time, dive_cleaning, divb_cleaning, pml); // - Select the algorithm depending on the input parameters // Initialize the corresponding coefficients over k space @@ -55,7 +55,8 @@ SpectralSolverRZ::SpectralSolverRZ (const int lev, if (v_galilean[2] == 0) { // v_galilean is 0: use standard PSATD algorithm algorithm = std::make_unique<PsatdAlgorithmRZ>( - k_space, dm, m_spectral_index, n_rz_azimuthal_modes, norder_z, nodal, dt, update_with_rho); + k_space, dm, m_spectral_index, n_rz_azimuthal_modes, norder_z, nodal, dt, + update_with_rho, fft_do_time_averaging, J_linear_in_time, dive_cleaning, divb_cleaning); } else { // Otherwise: use the Galilean algorithm algorithm = std::make_unique<GalileanPsatdAlgorithmRZ>( |