diff options
author | 2020-04-02 08:31:21 -0700 | |
---|---|---|
committer | 2020-04-02 08:31:21 -0700 | |
commit | fe49cdca472be586d50c4cfde38f4b5065f8fdb5 (patch) | |
tree | 12f6bb713dbee7b832e720b25b3f7ca49043d038 /Source/FieldSolver/SpectralSolver/SpectralSolver.cpp | |
parent | 4301ed0c506badb7fa2fc9f75ea461350913ace2 (diff) | |
download | WarpX-fe49cdca472be586d50c4cfde38f4b5065f8fdb5.tar.gz WarpX-fe49cdca472be586d50c4cfde38f4b5065f8fdb5.tar.zst WarpX-fe49cdca472be586d50c4cfde38f4b5065f8fdb5.zip |
Periodic, single-box FFT (#881)
* Implement periodic-single box option for spectral
* Fix out-of-bound in the periodic, single-box case
* Add documentation for periodic_single_box_fft
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolver.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp index 9b79bc525..7b6ab83e8 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp @@ -28,6 +28,7 @@ * \param dx Cell size along each dimension * \param dt Time step * \param pml Whether the boxes in which the solver is applied are PML boxes + * \param periodic_single_box Whether the full simulation domain consists of a single periodic box (i.e. the global domain is not MPI parallelized) */ SpectralSolver::SpectralSolver( const amrex::BoxArray& realspace_ba, @@ -36,7 +37,7 @@ SpectralSolver::SpectralSolver( const int norder_z, const bool nodal, const amrex::Array<amrex::Real,3>& v_galilean, const amrex::RealVect dx, const amrex::Real dt, - const bool pml ) { + const bool pml, const bool periodic_single_box ) { // Initialize all structures using the same distribution mapping dm @@ -64,7 +65,7 @@ SpectralSolver::SpectralSolver( // - Initialize arrays for fields in spectral space + FFT plans field_data = SpectralFieldData( realspace_ba, k_space, dm, - algorithm->getRequiredNumberOfFields() ); + algorithm->getRequiredNumberOfFields(), periodic_single_box ); } |