aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldData.H
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2020-02-19 17:26:36 +0100
committerGravatar GitHub <noreply@github.com> 2020-02-19 08:26:36 -0800
commitd4289e99ba71827b508983dd94c971660c08aa8d (patch)
treec0e437487a7c8381154edb0954f3e9a406de6e9e /Source/FieldSolver/SpectralSolver/SpectralFieldData.H
parent050e12f5293d42aabd812ff314baa2199060cdc3 (diff)
downloadWarpX-d4289e99ba71827b508983dd94c971660c08aa8d.tar.gz
WarpX-d4289e99ba71827b508983dd94c971660c08aa8d.tar.zst
WarpX-d4289e99ba71827b508983dd94c971660c08aa8d.zip
[mini-PR] when a cufft error occurs, print a meaningful error message (#728)
* added method to translate cufft errors * fixed style * bug fixing
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralFieldData.H')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralFieldData.H12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H
index e66a9ce50..3088c9867 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H
+++ b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H
@@ -12,6 +12,8 @@
#include <SpectralKSpace.H>
#include <AMReX_MultiFab.H>
+#include <string>
+
// Declare type for spectral fields
using SpectralField = amrex::FabArray< amrex::BaseFab <Complex> >;
@@ -71,6 +73,16 @@ class SpectralFieldData
#if (AMREX_SPACEDIM==3)
SpectralShiftFactor yshift_FFTfromCell, yshift_FFTtoCell;
#endif
+
+#ifdef AMREX_USE_GPU
+ /** \brief This method converts a cufftResult
+ * into the corresponding string
+ *
+ * @param[in] err a cufftResult
+ * @return an std::string
+ */
+ std::string cufftErrorToString (const cufftResult& err);
+#endif
};
#endif // WARPX_SPECTRAL_FIELD_DATA_H_