WarpX
WarpX_Complex.H
Go to the documentation of this file.
1 /* Copyright 2019-2020 Andrew Myers, David Grote, Maxence Thevenet
2  * Remi Lehe
3  *
4  * This file is part of WarpX.
5  *
6  * License: BSD-3-Clause-LBNL
7  */
8 #ifndef WARPX_COMPLEX_H_
9 #define WARPX_COMPLEX_H_
10 
11 #ifdef WARPX_USE_PSATD
12 # include <ablastr/math/fft/AnyFFT.H>
13 #endif
14 
15 #include <AMReX_Gpu.H>
16 #include <AMReX_GpuComplex.H>
17 #include <AMReX_REAL.H>
18 
19 #include <complex>
20 
21 // Defines a complex type on GPU & CPU
23 
24 #ifdef WARPX_USE_PSATD
25 static_assert(sizeof(Complex) == sizeof(ablastr::math::anyfft::Complex),
26  "The complex type in WarpX and the FFT library do not match.");
27 #endif
28 
29 static_assert(sizeof(Complex) == sizeof(amrex::Real[2]),
30  "Unexpected complex type.");
31 
32 #endif //WARPX_COMPLEX_H_
amrex::GpuComplex< amrex::Real > Complex
Definition: WarpX_Complex.H:22