]> https://gitweb.dealii.org/ - dealii.git/commitdiff
parameter handling for a couple of classes improved 8671/head
authorReza Rastak <rastak@stanford.edu>
Fri, 30 Aug 2019 00:06:48 +0000 (20:06 -0400)
committerReza Rastak <rastak@stanford.edu>
Fri, 30 Aug 2019 00:06:48 +0000 (20:06 -0400)
include/deal.II/algorithms/newton.templates.h
include/deal.II/algorithms/theta_timestepping.templates.h
source/algorithms/timestep_control.cc

index b821beab4920af4be2120e6f5ee4e11b352aa38f..e276451ee0e7ec1721d7bbdcfc478a53b4db0ca0 100644 (file)
@@ -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();
   }
index 9534f6367889c9b0810f898a3f1b470d4d161da5..2048a2b2126c872b01ab5117935a8dce6d30c524 100644 (file)
@@ -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();
   }
index b8758f50272969282fe4c696acc6d97232f139af..9d5c865a2939fb7c3901bd87ae87309670a39355 100644 (file)
@@ -54,9 +54,9 @@ TimestepControl::declare_parameters(ParameterHandler &param)
 {
   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",

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.