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.H | |
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.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolverRZ.H | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.H b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.H index 8e84f7c00..e08d5741c 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.H +++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.H @@ -34,7 +34,11 @@ class SpectralSolverRZ 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); /* \brief Transform the component `i_comp` of MultiFab `field_mf` * to spectral space, and store the corresponding result internally @@ -112,6 +116,40 @@ class SpectralSolverRZ */ void VayDeposition (const int lev, std::array<std::unique_ptr<amrex::MultiFab>,3>& current); + /** + * \brief Copy spectral data from component \c src_comp to component \c dest_comp + * of \c field_data.fields + * + * \param[in] src_comp component of the source FabArray from which the data are copied + * \param[in] dest_comp component of the destination FabArray where the data are copied + */ + void CopySpectralDataComp (const int src_comp, const int dest_comp) + { + field_data.CopySpectralDataComp(src_comp, dest_comp); + } + + /** + * \brief Set to zero the data on component \c icomp of \c field_data.fields + * + * \param[in] icomp component of the FabArray where the data are set to zero + */ + void ZeroOutDataComp (const int icomp) + { + field_data.ZeroOutDataComp(icomp); + } + + /** + * \brief Scale the data on component \c icomp of \c field_data.fields + * by a given scale factor + * + * \param[in] icomp component of the FabArray where the data are scaled + * \param[in] scale_factor scale factor to use for scaling + */ + void ScaleDataComp (const int icomp, const amrex::Real scale_factor) + { + field_data.ScaleDataComp(icomp, scale_factor); + } + SpectralFieldIndex m_spectral_index; private: |