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 #include <AMReX_REAL.H>
12 #include <AMReX_GpuContainers.H>
13 
14 #ifdef AMREX_USE_GPU
15 # include <blas.hh>
16 #endif
17 
18 #include <memory>
19 
20 /* \brief This defines the class that performs the Hankel transform.
21  * Original authors: Remi Lehe, Manuel Kirchen
22  *
23  *
24  * Definition of the Hankel forward and backward transform of order p:
25  * g(kr) = \int_0^\infty f(r) J_p(kr r) r dr
26  * f(r ) = \int_0^\infty g(kr) J_p(kr r) kr dkr
27 */
29 {
30  public:
31 
33 
34  // Constructor
35  HankelTransform(int hankel_order,
36  int azimuthal_mode,
37  int nr,
38  amrex::Real rmax);
39 
41 
42  void HankelForwardTransform(amrex::FArrayBox const& F, int F_icomp,
43  amrex::FArrayBox & G, int G_icomp);
44 
45  void HankelInverseTransform(amrex::FArrayBox const& G, int G_icomp,
46  amrex::FArrayBox & F, int F_icomp);
47 
48  private:
49  // Even though nk == nr always, use a separate variable for clarity.
50  int m_nr, m_nk;
51 
53 
56 
57 #ifdef AMREX_USE_GPU
58  std::unique_ptr<blas::Queue> m_queue;
59 #endif
60 };
61 
62 #endif
Definition: HankelTransform.H:29
const RealVector & getSpectralWavenumbers()
Definition: HankelTransform.H:40
int m_nr
Definition: HankelTransform.H:50
RealVector m_kr
Definition: HankelTransform.H:52
void HankelInverseTransform(amrex::FArrayBox const &G, int G_icomp, amrex::FArrayBox &F, int F_icomp)
Definition: HankelTransform.cpp:233
RealVector m_M
Definition: HankelTransform.H:55
RealVector m_invM
Definition: HankelTransform.H:54
HankelTransform(int hankel_order, int azimuthal_mode, int nr, amrex::Real rmax)
Definition: HankelTransform.cpp:21
void HankelForwardTransform(amrex::FArrayBox const &F, int F_icomp, amrex::FArrayBox &G, int G_icomp)
Definition: HankelTransform.cpp:194
int m_nk
Definition: HankelTransform.H:50