aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralKSpace.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralKSpace.H')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpace.H30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.H b/Source/FieldSolver/SpectralSolver/SpectralKSpace.H
new file mode 100644
index 000000000..d1aea836e
--- /dev/null
+++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.H
@@ -0,0 +1,30 @@
+#ifndef WARPX_SPECTRAL_K_SPACE_H_
+#define WARPX_SPECTRAL_K_SPACE_H_
+
+#include <AMReX_BoxArray.H>
+#include <AMReX_LayoutData.H>
+
+using namespace amrex;
+using namespace Gpu;
+
+using SpectralKVector = LayoutData<ManagedVector<Real>>;
+
+/* TODO Documentation: class represent k space, and how it is distribution
+ * for local FFT on each MPI: k spaces are not connected.
+ */
+class SpectralKSpace
+{
+ public:
+ SpectralKSpace( const BoxArray& realspace_ba, const DistributionMapping& dm, const Real* dx );
+ SpectralKVector& getModifiedKVector( const int i_dim ) const;
+ BoxArray spectralspace_ba;
+
+ private:
+ SpectralKVector kx_vec, ky_vec, kz_vec;
+ const Real* dx;
+};
+
+void
+AllocateAndFillKvector( ManagedVector<Real>& k, const Box& bx, const Real* dx, const int i_dim );
+
+#endif