WarpX
HankelTransform.H
Go to the documentation of this file.
1 /* Copyright 2019-2020 David Grote
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 #ifndef WARPX_HANKEL_TRANSFORM_H_
8 #define WARPX_HANKEL_TRANSFORM_H_
9 
10 #include <AMReX_FArrayBox.H>
11 
12 /* \brief This defines the class that performs the Hankel transform.
13  * Original authors: Remi Lehe, Manuel Kirchen
14  *
15  *
16  * Definition of the Hankel forward and backward transform of order p:
17  * g(kr) = \int_0^\infty f(r) J_p(kr r) r dr
18  * f(r ) = \int_0^\infty g(kr) J_p(kr r) kr dkr
19 */
21 {
22  public:
23 
24  using RealVector = amrex::Gpu::DeviceVector<amrex::Real>;
25 
26  // Constructor
27  HankelTransform(const int hankel_order,
28  const int azimuthal_mode,
29  const int nr,
30  const amrex::Real rmax);
31 
33 
34  void HankelForwardTransform(amrex::FArrayBox const& F, int const F_icomp,
35  amrex::FArrayBox & G, int const G_icomp);
36 
37  void HankelInverseTransform(amrex::FArrayBox const& G, int const G_icomp,
38  amrex::FArrayBox & F, int const F_icomp);
39 
40  private:
41  // Even though nk == nr always, use a seperate variable for clarity.
42  int m_nr, m_nk;
43 
45 
48 };
49 
50 #endif
Definition: HankelTransform.H:20
int m_nr
Definition: HankelTransform.H:42
HankelTransform(const int hankel_order, const int azimuthal_mode, const int nr, const amrex::Real rmax)
Definition: HankelTransform.cpp:17
RealVector m_kr
Definition: HankelTransform.H:44
amrex::Gpu::DeviceVector< amrex::Real > RealVector
Definition: HankelTransform.H:24
RealVector m_invM
Definition: HankelTransform.H:46
RealVector m_M
Definition: HankelTransform.H:47
void HankelInverseTransform(amrex::FArrayBox const &G, int const G_icomp, amrex::FArrayBox &F, int const F_icomp)
Definition: HankelTransform.cpp:234
void HankelForwardTransform(amrex::FArrayBox const &F, int const F_icomp, amrex::FArrayBox &G, int const G_icomp)
Definition: HankelTransform.cpp:184
int m_nk
Definition: HankelTransform.H:42
const RealVector & getSpectralWavenumbers()
Definition: HankelTransform.H:32