diff options
author | 2021-07-15 15:39:34 -0700 | |
---|---|---|
committer | 2021-07-15 15:39:34 -0700 | |
commit | 300c1659c4bcdae104f828c01de8873743f73d94 (patch) | |
tree | 5a220db0c8c74c8d5689955a0d095d6c1cd9d057 /Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | |
parent | 730e9f416363a6f31a19a06c8c0654aa79b928ce (diff) | |
download | WarpX-300c1659c4bcdae104f828c01de8873743f73d94.tar.gz WarpX-300c1659c4bcdae104f828c01de8873743f73d94.tar.zst WarpX-300c1659c4bcdae104f828c01de8873743f73d94.zip |
Spectral Index: Replace `struct`s of `enum` with Class (#2062)
* Add New Spectral Index Class
* Cleaning
* Use New Spectral Index Class in PML
* Cleaning
* Reuse Available Data for divE
* Allocate Rho Data Only when Necessary
* Cleaning
* Fix Bug in RZ Geometry
* Revert Commits for Allocation of Rho Data
* Cleaning
* Update Forward Declaration Header
* Do Not Include Unnecessary Header Files
* Doxygen
* Do Not Use Separate div() Cleaning Flags
* SpectralFieldIndex: Add Missing param to Doxygen
* Remove Unused getRequiredNumberOfFields
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp index ee4e5fd6d..8f46d21cd 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp @@ -41,22 +41,30 @@ 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); + // - Select the algorithm depending on the input parameters // Initialize the corresponding coefficients over k space // PML is not supported. if (v_galilean[2] == 0) { // v_galilean is 0: use standard PSATD algorithm algorithm = std::make_unique<PsatdAlgorithmRZ>( - k_space, dm, 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); } else { // Otherwise: use the Galilean algorithm algorithm = std::make_unique<GalileanPsatdAlgorithmRZ>( - k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt, update_with_rho); + k_space, dm, m_spectral_index, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt, update_with_rho); } // - Initialize arrays for fields in spectral space + FFT plans field_data = SpectralFieldDataRZ(lev, realspace_ba, k_space, dm, - algorithm->getRequiredNumberOfFields(), + m_spectral_index.n_fields, n_rz_azimuthal_modes); } |