aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-04-23 16:12:11 -0700
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-04-23 16:18:30 -0700
commit4a3265daf691f0a8fa7461322c7299016fd706bf (patch)
tree87960c3cf1af6f8ca94d734b8823aa44db8b18f5 /Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp
parent37b3ec0d00f08869f67cd5f0c43db6e379121553 (diff)
downloadWarpX-4a3265daf691f0a8fa7461322c7299016fd706bf.tar.gz
WarpX-4a3265daf691f0a8fa7461322c7299016fd706bf.tar.zst
WarpX-4a3265daf691f0a8fa7461322c7299016fd706bf.zip
Add comments ; copy only to valid box
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp
index 5ebb7144d..60e9d58c0 100644
--- a/Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp
+++ b/Source/FieldSolver/SpectralSolver/PsatdAlgorithm.cpp
@@ -4,6 +4,7 @@
using namespace amrex;
+/* \brief Initialize coefficients for the update equation */
PsatdAlgorithm::PsatdAlgorithm(const SpectralKSpace& spectral_kspace,
const DistributionMapping& dm,
const int norder_x, const int norder_y,
@@ -28,7 +29,8 @@ PsatdAlgorithm::PsatdAlgorithm(const SpectralKSpace& spectral_kspace,
X3_coef = SpectralCoefficients(ba, dm, 1, 0);
// Fill them with the right values:
- // Loop over boxes
+ // Loop over boxes and allocate the corresponding coefficients
+ // for each box owned by the local MPI proc
for (MFIter mfi(ba, dm); mfi.isValid(); ++mfi){
const Box& bx = ba[mfi];
@@ -78,6 +80,8 @@ PsatdAlgorithm::PsatdAlgorithm(const SpectralKSpace& spectral_kspace,
}
};
+/* Advance the E and B field in spectral space (stored in `f`)
+ * over one time step */
void
PsatdAlgorithm::pushSpectralFields(SpectralFieldData& f) const{