aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2021-01-07 08:33:23 -0800
committerGravatar GitHub <noreply@github.com> 2021-01-07 08:33:23 -0800
commit091f7efd85e76b00510ea9dd909cbbebe47095e6 (patch)
treebeb2cde31c86ab26814032f66d3b506b5a27647b /Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp
parent6c8b1ef3bf49e2a5423f3f101c02bf51054656f0 (diff)
downloadWarpX-091f7efd85e76b00510ea9dd909cbbebe47095e6.tar.gz
WarpX-091f7efd85e76b00510ea9dd909cbbebe47095e6.tar.zst
WarpX-091f7efd85e76b00510ea9dd909cbbebe47095e6.zip
Implemented update without rho in RZ spectral solver (#1569)
* Implemented update without rho in RZ spectral solver * Updated documentation for update_with_rho for RZ * Tiny fix in GalileanPsatdAlgorithmRZ reordering declarations * In Langmuir_multi_rz_psatd, set update_with_rho = 1
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp
index 581538d6a..820db5a12 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp
@@ -31,7 +31,8 @@ SpectralSolverRZ::SpectralSolverRZ (amrex::BoxArray const & realspace_ba,
int const norder_z, bool const nodal,
const amrex::Array<amrex::Real,3>& v_galilean,
amrex::RealVect const dx, amrex::Real const dt,
- int const lev)
+ int const lev,
+ bool const update_with_rho)
: k_space(realspace_ba, dm, dx)
{
// Initialize all structures using the same distribution mapping dm
@@ -46,11 +47,11 @@ SpectralSolverRZ::SpectralSolverRZ (amrex::BoxArray const & realspace_ba,
if (v_galilean[2] == 0) {
// v_galilean is 0: use standard PSATD algorithm
algorithm = std::make_unique<PsatdAlgorithmRZ>(
- k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, dt);
+ k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, dt, update_with_rho);
} else {
// Otherwise: use the Galilean algorithm
algorithm = std::make_unique<GalileanPsatdAlgorithmRZ>(
- k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt);
+ k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt, update_with_rho);
}
// - Initialize arrays for fields in spectral space + FFT plans