diff options
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index c6b5d367a..ea728366c 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -758,9 +758,6 @@ WarpX::ReadParameters () } } -# ifdef WARPX_DIM_RZ - update_with_rho = true; // Must be true for RZ PSATD -# else if (m_v_galilean[0] == 0. && m_v_galilean[1] == 0. && m_v_galilean[2] == 0. && m_v_comoving[0] == 0. && m_v_comoving[1] == 0. && m_v_comoving[2] == 0.) { update_with_rho = false; // standard PSATD @@ -768,7 +765,6 @@ WarpX::ReadParameters () else { update_with_rho = true; // Galilean PSATD or comoving PSATD } -# endif // Overwrite update_with_rho with value set in input file pp.query("update_with_rho", update_with_rho); @@ -779,9 +775,6 @@ WarpX::ReadParameters () } # ifdef WARPX_DIM_RZ - AMREX_ALWAYS_ASSERT_WITH_MESSAGE(update_with_rho, - "psatd.update_with_rho must be equal to 1 in RZ geometry"); - if (!Geom(0).isPeriodic(1)) { use_damp_fields_in_z_guard = true; } @@ -1142,7 +1135,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm realspace_ba.grow(1, ngE[1]); // add guard cells only in z } spectral_solver_fp[lev] = std::make_unique<SpectralSolverRZ>( realspace_ba, dm, - n_rz_azimuthal_modes, noz_fft, do_nodal, m_v_galilean, dx_vect, dt[lev], lev ); + n_rz_azimuthal_modes, noz_fft, do_nodal, m_v_galilean, dx_vect, dt[lev], lev, update_with_rho ); if (use_kspace_filter) { spectral_solver_fp[lev]->InitFilter(filter_npass_each_dir, use_filter_compensation); } @@ -1270,7 +1263,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm # ifdef WARPX_DIM_RZ c_realspace_ba.grow(1, ngE[1]); // add guard cells only in z spectral_solver_cp[lev] = std::make_unique<SpectralSolverRZ>( c_realspace_ba, dm, - n_rz_azimuthal_modes, noz_fft, do_nodal, m_v_galilean, cdx_vect, dt[lev], lev ); + n_rz_azimuthal_modes, noz_fft, do_nodal, m_v_galilean, cdx_vect, dt[lev], lev, update_with_rho ); if (use_kspace_filter) { spectral_solver_cp[lev]->InitFilter(filter_npass_each_dir, use_filter_compensation); } |