aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> 2021-10-12 02:39:58 +0200
committerGravatar GitHub <noreply@github.com> 2021-10-11 17:39:58 -0700
commit5a12391f0c2350e9083bf3138da210eb81707e6e (patch)
tree5755fcbc17dfd120e2f3ad8fd019de7b15aca24f /Source/Particles/PhysicalParticleContainer.cpp
parentd367eb0c15c36baf390d0c9ec7bc068fe25490b7 (diff)
downloadWarpX-5a12391f0c2350e9083bf3138da210eb81707e6e.tar.gz
WarpX-5a12391f0c2350e9083bf3138da210eb81707e6e.tar.zst
WarpX-5a12391f0c2350e9083bf3138da210eb81707e6e.zip
Use parser for more input parameters (#2386)
* Use parser for more input parameters * Fix PSATD compilation and apply suggestions from code review * Avoid out of bound array access for num_particles_per_cell_each_dim * Fix few input files with respect to num_particles_per_cell_each_dim * Fix get that incorrectly became query
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 0369c6e54..d6238528f 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -233,7 +233,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp
pp_species_name.query("do_continuous_injection", do_continuous_injection);
pp_species_name.query("initialize_self_fields", initialize_self_fields);
queryWithParser(pp_species_name, "self_fields_required_precision", self_fields_required_precision);
- pp_species_name.query("self_fields_max_iters", self_fields_max_iters);
+ queryWithParser(pp_species_name, "self_fields_max_iters", self_fields_max_iters);
pp_species_name.query("self_fields_verbosity", self_fields_verbosity);
// Whether to plot back-transformed (lab-frame) diagnostics
// for this species.
@@ -312,7 +312,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp
if (use_default_v_galilean) {
m_v_galilean[2] = -std::sqrt(1._rt - 1._rt / (WarpX::gamma_boost * WarpX::gamma_boost));
} else {
- pp_psatd.query("v_galilean", m_v_galilean);
+ queryArrWithParser(pp_psatd, "v_galilean", m_v_galilean, 0, 3);
}
// Scale the Galilean velocity by the speed of light
for (int i=0; i<3; i++) m_v_galilean[i] *= PhysConst::c;
@@ -2521,7 +2521,7 @@ PhysicalParticleContainer::InitIonizationModule ()
"charge != q_e for ionizable species: overriding user value and setting charge = q_e.");
charge = PhysConst::q_e;
}
- pp_species_name.query("ionization_initial_level", ionization_initial_level);
+ queryWithParser(pp_species_name, "ionization_initial_level", ionization_initial_level);
pp_species_name.get("ionization_product_species", ionization_product_name);
pp_species_name.get("physical_element", physical_element);
// Add runtime integer component for ionization level