From 091f7efd85e76b00510ea9dd909cbbebe47095e6 Mon Sep 17 00:00:00 2001 From: David Grote Date: Thu, 7 Jan 2021 08:33:23 -0800 Subject: 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 --- Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp') 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& 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( - 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( - 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 -- cgit v1.2.3