From: Reza Rastak Date: Fri, 30 Aug 2019 00:06:48 +0000 (-0400) Subject: parameter handling for a couple of classes improved X-Git-Tag: v9.2.0-rc1~1157^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8671%2Fhead;p=dealii.git parameter handling for a couple of classes improved --- diff --git a/include/deal.II/algorithms/newton.templates.h b/include/deal.II/algorithms/newton.templates.h index b821beab49..e276451ee0 100644 --- a/include/deal.II/algorithms/newton.templates.h +++ b/include/deal.II/algorithms/newton.templates.h @@ -50,9 +50,9 @@ namespace Algorithms { param.enter_subsection("Newton"); ReductionControl::declare_parameters(param); - param.declare_entry("Assemble threshold", "0.", Patterns::Double()); - param.declare_entry("Stepsize iterations", "21", Patterns::Integer()); - param.declare_entry("Debug level", "0", Patterns::Integer()); + param.declare_entry("Assemble threshold", "0.", Patterns::Double(0.)); + param.declare_entry("Stepsize iterations", "21", Patterns::Integer(0)); + param.declare_entry("Debug level", "0", Patterns::Integer(0)); param.declare_entry("Debug vectors", "false", Patterns::Bool()); param.leave_subsection(); } @@ -65,6 +65,7 @@ namespace Algorithms control.parse_parameters(param); assemble_threshold = param.get_double("Assemble threshold"); n_stepsize_iterations = param.get_integer("Stepsize iterations"); + debug = param.get_integer("Debug level"); debug_vectors = param.get_bool("Debug vectors"); param.leave_subsection(); } diff --git a/include/deal.II/algorithms/theta_timestepping.templates.h b/include/deal.II/algorithms/theta_timestepping.templates.h index 9534f63678..2048a2b212 100644 --- a/include/deal.II/algorithms/theta_timestepping.templates.h +++ b/include/deal.II/algorithms/theta_timestepping.templates.h @@ -58,7 +58,7 @@ namespace Algorithms { param.enter_subsection("ThetaTimestepping"); TimestepControl::declare_parameters(param); - param.declare_entry("Theta", ".5", Patterns::Double()); + param.declare_entry("Theta", ".5", Patterns::Double(0., 1.)); param.declare_entry("Adaptive", "false", Patterns::Bool()); param.leave_subsection(); } diff --git a/source/algorithms/timestep_control.cc b/source/algorithms/timestep_control.cc index b8758f5027..9d5c865a29 100644 --- a/source/algorithms/timestep_control.cc +++ b/source/algorithms/timestep_control.cc @@ -54,9 +54,9 @@ TimestepControl::declare_parameters(ParameterHandler ¶m) { param.declare_entry("Start", "0.", Patterns::Double()); param.declare_entry("Final", "1.", Patterns::Double()); - param.declare_entry("First step", "1.e-2", Patterns::Double()); - param.declare_entry("Max step", "1.", Patterns::Double()); - param.declare_entry("Tolerance", "1.e-2", Patterns::Double()); + param.declare_entry("First step", "1.e-2", Patterns::Double(0.)); + param.declare_entry("Max step", "1.", Patterns::Double(0.)); + param.declare_entry("Tolerance", "1.e-2", Patterns::Double(0.)); param.declare_entry("Print step", "-1.", Patterns::Double()); param.declare_entry("Strategy", "uniform",