aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralHankelTransform
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2020-09-23 10:26:50 -0700
committerGravatar GitHub <noreply@github.com> 2020-09-23 10:26:50 -0700
commit38437f42bd4e7fa097fbd006c35b7fca5941614b (patch)
tree6a96c9191bbfc916bde67af8bfbe86000ab84a6c /Source/FieldSolver/SpectralSolver/SpectralHankelTransform
parentc0fbe73a93950f9bb61dbde2c6f997268ea457ca (diff)
downloadWarpX-38437f42bd4e7fa097fbd006c35b7fca5941614b.tar.gz
WarpX-38437f42bd4e7fa097fbd006c35b7fca5941614b.tar.zst
WarpX-38437f42bd4e7fa097fbd006c35b7fca5941614b.zip
Implemented fft_periodic_single_box for RZ spectral (#1301)
* Implemented fft_periodic_single_box for RZ spectral For RZ psatd, simplified copy for forward transform * Apply review's suggestions and clean up * Add few comments, fix warnings, apply style conventions Co-authored-by: Dave Grote <dpgrote@lbl.gov> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralHankelTransform')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.H44
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.cpp6
2 files changed, 22 insertions, 28 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.H b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.H
index d82fb9b84..e24123f78 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.H
+++ b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.H
@@ -20,48 +20,45 @@
class SpectralHankelTransformer
{
-
public:
- SpectralHankelTransformer() {};
+ SpectralHankelTransformer () {};
- SpectralHankelTransformer(const int nr,
- const int n_rz_azimuthal_modes,
- const amrex::Real rmax);
+ SpectralHankelTransformer (const int nr,
+ const int n_rz_azimuthal_modes,
+ const amrex::Real rmax);
void
- ExtractKrArray();
+ ExtractKrArray ();
// Returns an array that holds the kr for all of the modes
- HankelTransform::RealVector const & getKrArray() const {return m_kr;}
+ HankelTransform::RealVector const & getKrArray () const {return m_kr;}
// Converts a scalar field from the physical to the spectral space
void
- PhysicalToSpectral_Scalar(amrex::Box const & box,
- amrex::FArrayBox const & F_physical,
- amrex::FArrayBox & G_spectral);
+ PhysicalToSpectral_Scalar (amrex::FArrayBox const & F_physical,
+ amrex::FArrayBox & G_spectral);
// Converts a vector field from the physical to the spectral space
void
- PhysicalToSpectral_Vector(amrex::Box const & box,
- amrex::FArrayBox & F_r_physical,
- amrex::FArrayBox & F_t_physical,
- amrex::FArrayBox & G_p_spectral,
- amrex::FArrayBox & G_m_spectral);
+ PhysicalToSpectral_Vector (amrex::Box const & box,
+ amrex::FArrayBox & F_r_physical,
+ amrex::FArrayBox & F_t_physical,
+ amrex::FArrayBox & G_p_spectral,
+ amrex::FArrayBox & G_m_spectral);
// Converts a scalar field from the spectral to the physical space
void
- SpectralToPhysical_Scalar(amrex::Box const & box,
- amrex::FArrayBox const & G_spectral,
- amrex::FArrayBox & F_physical);
+ SpectralToPhysical_Scalar (amrex::FArrayBox const & G_spectral,
+ amrex::FArrayBox & F_physical);
// Converts a vector field from the spectral to the physical space
void
- SpectralToPhysical_Vector(amrex::Box const & box,
- amrex::FArrayBox const & G_p_spectral,
- amrex::FArrayBox const & G_m_spectral,
- amrex::FArrayBox & F_r_physical,
- amrex::FArrayBox & F_t_physical);
+ SpectralToPhysical_Vector (amrex::Box const & box,
+ amrex::FArrayBox const & G_p_spectral,
+ amrex::FArrayBox const & G_m_spectral,
+ amrex::FArrayBox & F_r_physical,
+ amrex::FArrayBox & F_t_physical);
private:
@@ -72,7 +69,6 @@ class SpectralHankelTransformer
amrex::Vector< std::unique_ptr<HankelTransform> > dht0;
amrex::Vector< std::unique_ptr<HankelTransform> > dhtm;
amrex::Vector< std::unique_ptr<HankelTransform> > dhtp;
-
};
#endif
diff --git a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.cpp b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.cpp
index 518eea03e..7886bd549 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/SpectralHankelTransformer.cpp
@@ -54,8 +54,7 @@ SpectralHankelTransformer::ExtractKrArray ()
/* \brief Converts a scalar field from the physical to the spectral space for all modes */
void
-SpectralHankelTransformer::PhysicalToSpectral_Scalar (amrex::Box const & box,
- amrex::FArrayBox const & F_physical,
+SpectralHankelTransformer::PhysicalToSpectral_Scalar (amrex::FArrayBox const & F_physical,
amrex::FArrayBox & G_spectral)
{
// The Hankel transform is purely real, so the real and imaginary parts of
@@ -127,8 +126,7 @@ SpectralHankelTransformer::PhysicalToSpectral_Vector (amrex::Box const & box,
/* \brief Converts a scalar field from the spectral to the physical space for all modes */
void
-SpectralHankelTransformer::SpectralToPhysical_Scalar (amrex::Box const & box,
- amrex::FArrayBox const & G_spectral,
+SpectralHankelTransformer::SpectralToPhysical_Scalar (amrex::FArrayBox const & G_spectral,
amrex::FArrayBox & F_physical)
{
// The Hankel inverse transform is purely real, so the real and imaginary parts of