aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2020-09-22 20:05:55 -0700
committerGravatar GitHub <noreply@github.com> 2020-09-22 20:05:55 -0700
commit8610be2dfb6d37fa2caa3c93afa01b666caedc2d (patch)
tree1f2c8adeeeba9b2acb17527e50afddf524678d2b /Source/WarpX.cpp
parent6e847c4b0ae54e20a1aac6445a25f75a1e6cb7bc (diff)
downloadWarpX-8610be2dfb6d37fa2caa3c93afa01b666caedc2d.tar.gz
WarpX-8610be2dfb6d37fa2caa3c93afa01b666caedc2d.tar.zst
WarpX-8610be2dfb6d37fa2caa3c93afa01b666caedc2d.zip
Initial version of use_damp_fields_in_z_guard option (#1304)
* Initial version of use_damp_in_z_guard option * Fix typo in WarpX.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Changed use_damp_in_z_guard to use_damp_fields_in_z_guard * Added documentatin for use_damp_fields_in_z_guard * Clean up for use_damp_fields_in_z_guard * Added use_damp_fields_in_z_guard to picmi interface, and moved it to the psatd input group * For RZ spectral, damping of the fields is on by default when not periodic * Updated documentation for use_damp_fields_in_z_guard Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index ff8509369..719212e3b 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -87,6 +87,7 @@ bool WarpX::galerkin_interpolation = true;
bool WarpX::use_filter = false;
bool WarpX::use_kspace_filter = false;
bool WarpX::use_filter_compensation = false;
+bool WarpX::use_damp_fields_in_z_guard = false;
bool WarpX::serialize_ics = false;
bool WarpX::refine_plasma = false;
@@ -634,6 +635,7 @@ WarpX::ReadParameters ()
ParmParse pp("psatd");
pp.query("periodic_single_box_fft", fft_periodic_single_box);
pp.query("fftw_plan_measure", fftw_plan_measure);
+
std::string nox_str;
std::string noy_str;
std::string noz_str;
@@ -681,6 +683,14 @@ WarpX::ReadParameters ()
// Overwrite update_with_rho with value set in input file
pp.query("update_with_rho", update_with_rho);
+
+# ifdef WARPX_DIM_RZ
+ if (!Geom(0).isPeriodic(1)) {
+ use_damp_fields_in_z_guard = true;
+ }
+ pp.query("use_damp_fields_in_z_guard", use_damp_fields_in_z_guard);
+# endif
+
}
#endif