diff options
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 99d360291..a8afa17ec 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -321,7 +321,7 @@ WarpX::ReadParameters () { ParmParse pp;// Traditionally, max_step and stop_time do not have prefix. pp.query("max_step", max_step); - pp.query("stop_time", stop_time); + queryWithParser(pp, "stop_time", stop_time); pp.query("authors", authors); } @@ -368,7 +368,7 @@ WarpX::ReadParameters () } } - pp.query("cfl", cfl); + queryWithParser(pp, "cfl", cfl); pp.query("verbose", verbose); pp.query("regrid_int", regrid_int); pp.query("do_subcycling", do_subcycling); @@ -388,7 +388,7 @@ WarpX::ReadParameters () // pp.query returns 1 if argument zmax_plasma_to_compute_max_step is // specified by the user, 0 otherwise. do_compute_max_step_from_zmax = - pp.query("zmax_plasma_to_compute_max_step", + queryWithParser(pp, "zmax_plasma_to_compute_max_step", zmax_plasma_to_compute_max_step); pp.query("do_moving_window", do_moving_window); @@ -439,8 +439,8 @@ WarpX::ReadParameters () // Read either dz_snapshots_lab or dt_snapshots_lab bool snapshot_interval_is_specified = 0; Real dz_snapshots_lab = 0; - snapshot_interval_is_specified += pp.query("dt_snapshots_lab", dt_snapshots_lab); - if ( pp.query("dz_snapshots_lab", dz_snapshots_lab) ){ + snapshot_interval_is_specified += queryWithParser(pp, "dt_snapshots_lab", dt_snapshots_lab); + if ( queryWithParser(pp, "dz_snapshots_lab", dz_snapshots_lab) ){ dt_snapshots_lab = dz_snapshots_lab/PhysConst::c; snapshot_interval_is_specified = 1; } @@ -520,10 +520,12 @@ WarpX::ReadParameters () sort_bin_size[i] = vect_sort_bin_size[i]; } - double quantum_xi; - int quantum_xi_is_specified = pp.query("quantum_xi", quantum_xi); - if (quantum_xi_is_specified) + amrex::Real quantum_xi_tmp; + int quantum_xi_is_specified = queryWithParser(pp, "quantum_xi", quantum_xi_tmp); + if (quantum_xi_is_specified) { + double const quantum_xi = quantum_xi_tmp; quantum_xi_c2 = quantum_xi * PhysConst::c * PhysConst::c; + } pp.query("do_pml", do_pml); pp.query("pml_ncell", pml_ncell); |