aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-07-15 13:19:35 -0700
committerGravatar GitHub <noreply@github.com> 2019-07-15 13:19:35 -0700
commit9644af5ed2eeeadbfb34dea9fdb2d5bbd5d2b34d (patch)
tree99b738a90be029e1fdccc19c4753a287920ad409 /Source/WarpX.cpp
parent73884ee53f35a1845cbbc52d6c47a1c9aedf7d3d (diff)
parent630e4d715894cb5a35a9ea33c4d2859d2fbe08a0 (diff)
downloadWarpX-9644af5ed2eeeadbfb34dea9fdb2d5bbd5d2b34d.tar.gz
WarpX-9644af5ed2eeeadbfb34dea9fdb2d5bbd5d2b34d.tar.zst
WarpX-9644af5ed2eeeadbfb34dea9fdb2d5bbd5d2b34d.zip
Merge pull request #207 from ECP-WarpX/deposition_cpp
Direct current deposition in C++
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 877882037..b20c6211c 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -37,6 +37,7 @@ Vector<int> WarpX::boost_direction = {0,0,0};
int WarpX::do_compute_max_step_from_zmax = 0;
Real WarpX::zmax_plasma_to_compute_max_step = 0.;
+long WarpX::use_picsar_deposition = 1;
long WarpX::current_deposition_algo;
long WarpX::charge_deposition_algo;
long WarpX::field_gathering_algo;
@@ -484,7 +485,17 @@ WarpX::ReadParameters ()
{
ParmParse pp("algo");
+ // If not in RZ mode, read use_picsar_deposition
+ // In RZ mode, use_picsar_deposition is on, as the C++ version
+ // of the deposition does not support RZ
+#ifndef WARPX_RZ
+ pp.query("use_picsar_deposition", use_picsar_deposition);
+#endif
current_deposition_algo = GetAlgorithmInteger(pp, "current_deposition");
+ if (!use_picsar_deposition){
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE( current_deposition_algo >= 2,
+ "if not use_picsar_deposition, cannot use Esirkepov deposition.");
+ }
charge_deposition_algo = GetAlgorithmInteger(pp, "charge_deposition");
field_gathering_algo = GetAlgorithmInteger(pp, "field_gathering");
particle_pusher_algo = GetAlgorithmInteger(pp, "particle_pusher");