diff options
author | 2017-03-28 11:11:12 -0700 | |
---|---|---|
committer | 2017-03-28 11:11:12 -0700 | |
commit | 85d6218a3a8838521c495c12bf00942085bc3c8c (patch) | |
tree | 190f2acc98019f325a0f595b54103a0eade478d3 /Source/PlasmaInjector.cpp | |
parent | 6151dc4888aa6c9571aaf06a89e795bb1f20caf7 (diff) | |
download | WarpX-85d6218a3a8838521c495c12bf00942085bc3c8c.tar.gz WarpX-85d6218a3a8838521c495c12bf00942085bc3c8c.tar.zst WarpX-85d6218a3a8838521c495c12bf00942085bc3c8c.zip |
updating the python-ctypes branch for recent changes in master
Diffstat (limited to 'Source/PlasmaInjector.cpp')
-rw-r--r-- | Source/PlasmaInjector.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/PlasmaInjector.cpp b/Source/PlasmaInjector.cpp index 027bb5b57..82837730c 100644 --- a/Source/PlasmaInjector.cpp +++ b/Source/PlasmaInjector.cpp @@ -127,6 +127,21 @@ PlasmaInjector::PlasmaInjector(int ispecies, const std::string& name) pp.query("ymax", ymax); pp.query("zmax", zmax); + // get injection style + pp.get("injection_style", injection_style); + std::transform(injection_style.begin(), + injection_style.end(), + injection_style.begin(), + ::tolower); + if (injection_style == "python") { + return; + } + else if (not (injection_style == "nrandomnormal" or + injection_style == "nrandomuniformpercell" or + injection_style == "ndiagpercell")) { + StringParseAbortMessage("Injection style", injection_style); + } + // parse density information std::string rho_prof_s; pp.get("profile", rho_prof_s); @@ -173,20 +188,6 @@ PlasmaInjector::PlasmaInjector(int ispecies, const std::string& name) } else { StringParseAbortMessage("Momentum distribution type", mom_dist_s); } - - // get injection style - pp.get("injection_style", injection_style); - std::transform(injection_style.begin(), - injection_style.end(), - injection_style.begin(), - ::tolower); - if (injection_style == "nrandomnormal" or - injection_style == "nrandomuniformpercell" or - injection_style == "ndiagpercell") { - return; - } else { - StringParseAbortMessage("Injection style", injection_style); - } } void PlasmaInjector::getMomentum(vec3& u) { |