aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.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/WarpX.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/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp11
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);
}