aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/SpectralSolver')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralSolver.H18
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralSolver.cpp32
2 files changed, 33 insertions, 17 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.H b/Source/FieldSolver/SpectralSolver/SpectralSolver.H
index 65f975682..2f6428fc6 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralSolver.H
+++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.H
@@ -40,10 +40,7 @@ class SpectralSolver
* (in the spectral field specified by `field_index`) */
void ForwardTransform( const amrex::MultiFab& mf,
const int field_index,
- const int i_comp=0 ){
- BL_PROFILE("SpectralSolver::ForwardTransform");
- field_data.ForwardTransform( mf, field_index, i_comp );
- };
+ const int i_comp=0 );
/**
* \brief Transform spectral field specified by `field_index` back to
@@ -51,21 +48,12 @@ class SpectralSolver
*/
void BackwardTransform( amrex::MultiFab& mf,
const int field_index,
- const int i_comp=0 ){
- BL_PROFILE("SpectralSolver::BackwardTransform");
- field_data.BackwardTransform( mf, field_index, i_comp );
- };
+ const int i_comp=0 );
/**
* \brief Update the fields in spectral space, over one timestep
*/
- void pushSpectralFields(){
- BL_PROFILE("SpectralSolver::pushSpectralFields");
- // Virtual function: the actual function used here depends
- // on the sub-class of `SpectralBaseAlgorithm` that was
- // initialized in the constructor of `SpectralSolver`
- algorithm->pushSpectralFields( field_data );
- };
+ void pushSpectralFields();
private:
SpectralFieldData field_data; // Store field in spectral space
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp
index c24a7af69..9df981528 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp
@@ -9,7 +9,8 @@
#include <PsatdAlgorithm.H>
#include <GalileanAlgorithm.H>
#include <PMLPsatdAlgorithm.H>
-
+#include "WarpX.H"
+#include "WarpXProfilerWrapper.H"
/* \brief Initialize the spectral Maxwell solver
*
@@ -62,4 +63,31 @@ SpectralSolver::SpectralSolver(
field_data = SpectralFieldData( realspace_ba, k_space, dm,
algorithm->getRequiredNumberOfFields() );
-};
+}
+
+void
+SpectralSolver::ForwardTransform( const amrex::MultiFab& mf,
+ const int field_index,
+ const int i_comp )
+{
+ WARPX_PROFILE("SpectralSolver::ForwardTransform");
+ field_data.ForwardTransform( mf, field_index, i_comp );
+}
+
+void
+SpectralSolver::BackwardTransform( amrex::MultiFab& mf,
+ const int field_index,
+ const int i_comp )
+{
+ WARPX_PROFILE("SpectralSolver::BackwardTransform");
+ field_data.BackwardTransform( mf, field_index, i_comp );
+}
+
+void
+SpectralSolver::pushSpectralFields(){
+ WARPX_PROFILE("SpectralSolver::pushSpectralFields");
+ // Virtual function: the actual function used here depends
+ // on the sub-class of `SpectralBaseAlgorithm` that was
+ // initialized in the constructor of `SpectralSolver`
+ algorithm->pushSpectralFields( field_data );
+}