diff options
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolver.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolver.H | 56 |
1 files changed, 49 insertions, 7 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.H b/Source/FieldSolver/SpectralSolver/SpectralSolver.H index 0953996fa..47ad47150 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.H +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.H @@ -86,13 +86,55 @@ class SpectralSolver const bool divb_cleaning); /** - * \brief Transform the component `i_comp` of MultiFab `mf` - * to spectral space, and store the corresponding result internally - * (in the spectral field specified by `field_index`) */ - void ForwardTransform( const int lev, + * \brief Transform the component i_comp of the MultiFab mf to Fourier space, + * and store the result internally (in the spectral field specified by field_index) + * + * \param[in] lev mesh refinement level + * \param[in] mf MultiFab that is transformed to Fourier space (component i_comp) + * \param[in] field_index index of the spectral field that stores the FFT result + * \param[in] i_comp component of the MultiFab mf that is transformed to Fourier space + * \param[in] stag index type that needs to be used to perform the FFT operation + */ + void ForwardTransform (const int lev, + const amrex::MultiFab& mf, + const int field_index, + const int i_comp, + const amrex::IntVect& stag); + + /** + * \brief Overload of ForwardTransform used if stag is not passed + */ + AMREX_FORCE_INLINE + void ForwardTransform (const int lev, const amrex::MultiFab& mf, const int field_index, - const int i_comp=0 ); + const int i_comp) + { + ForwardTransform(lev, mf, field_index, i_comp, mf.ixType().toIntVect()); + } + + /** + * \brief Overload of ForwardTransform used if i_comp is not passed + */ + AMREX_FORCE_INLINE + void ForwardTransform (const int lev, + const amrex::MultiFab& mf, + const int field_index, + const amrex::IntVect& stag) + { + ForwardTransform(lev, mf, field_index, 0, stag); + } + + /** + * Overload of ForwardTransform used if both i_comp and stag are not passed + */ + AMREX_FORCE_INLINE + void ForwardTransform (const int lev, + const amrex::MultiFab& mf, + const int field_index) + { + ForwardTransform(lev, mf, field_index, 0, mf.ixType().toIntVect()); + } /** * \brief Transform spectral field specified by `field_index` back to @@ -139,9 +181,9 @@ class SpectralSolver * \param[in,out] current Array of unique pointers to \c MultiFab storing * the three components of the current density */ - void VayDeposition (const int lev, std::array<std::unique_ptr<amrex::MultiFab>,3>& current) + void VayDeposition () { - algorithm->VayDeposition(lev, field_data, current); + algorithm->VayDeposition(field_data); } /** |