WarpX
Source
FieldSolver
SpectralSolver
SpectralHankelTransform
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
*/
28
class
HankelTransform
29
{
30
public
:
31
32
using
RealVector
=
amrex::Gpu::DeviceVector<amrex::Real>
;
33
34
// Constructor
35
HankelTransform
(
int
hankel_order,
36
int
azimuthal_mode,
37
int
nr,
38
amrex::Real rmax);
39
40
const
RealVector
&
getSpectralWavenumbers
() {
return
m_kr
;}
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
52
RealVector
m_kr
;
53
54
RealVector
m_invM
;
55
RealVector
m_M
;
56
57
#ifdef AMREX_USE_GPU
58
std::unique_ptr<blas::Queue> m_queue;
59
#endif
60
};
61
62
#endif
AMReX_FArrayBox.H
AMReX_GpuContainers.H
AMReX_REAL.H
HankelTransform
Definition:
HankelTransform.H:29
HankelTransform::getSpectralWavenumbers
const RealVector & getSpectralWavenumbers()
Definition:
HankelTransform.H:40
HankelTransform::m_nr
int m_nr
Definition:
HankelTransform.H:50
HankelTransform::m_kr
RealVector m_kr
Definition:
HankelTransform.H:52
HankelTransform::HankelInverseTransform
void HankelInverseTransform(amrex::FArrayBox const &G, int G_icomp, amrex::FArrayBox &F, int F_icomp)
Definition:
HankelTransform.cpp:233
HankelTransform::m_M
RealVector m_M
Definition:
HankelTransform.H:55
HankelTransform::m_invM
RealVector m_invM
Definition:
HankelTransform.H:54
HankelTransform::HankelTransform
HankelTransform(int hankel_order, int azimuthal_mode, int nr, amrex::Real rmax)
Definition:
HankelTransform.cpp:21
HankelTransform::HankelForwardTransform
void HankelForwardTransform(amrex::FArrayBox const &F, int F_icomp, amrex::FArrayBox &G, int G_icomp)
Definition:
HankelTransform.cpp:194
HankelTransform::m_nk
int m_nk
Definition:
HankelTransform.H:50
amrex::FArrayBox
amrex::PODVector
Generated by
1.9.1