WarpX
Source
Utils
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 "
FieldSolver/SpectralSolver/AnyFFT.H
"
13
#endif
14
15
#include <AMReX_REAL.H>
16
#include <AMReX_Gpu.H>
17
#include <AMReX_GpuComplex.H>
18
19
#include <complex>
20
21
// Defines a complex type on GPU & CPU
22
using
Complex
= amrex::GpuComplex<amrex::Real>;
23
24
#ifdef WARPX_USE_PSATD
25
static_assert(
sizeof
(
Complex
) ==
sizeof
(
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_
Complex
amrex::GpuComplex< amrex::Real > Complex
Definition:
WarpX_Complex.H:22
AnyFFT.H
AnyFFT::Complex
fftw_complex Complex
Definition:
AnyFFT.H:40
Generated by
1.8.13