]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use parse_input, not read_input, in tutorials.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 17 Sep 2016 17:21:02 +0000 (13:21 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 28 Sep 2016 13:54:12 +0000 (09:54 -0400)
read_input is now deprecated in favor of parse_input, which raises
exceptions.

examples/step-19/doc/intro.dox
examples/step-19/step-19.cc
examples/step-28/step-28.cc
examples/step-29/step-29.cc
examples/step-32/step-32.cc
examples/step-33/step-33.cc
examples/step-34/step-34.cc
examples/step-35/step-35.cc
examples/step-36/step-36.cc
examples/step-42/step-42.cc
examples/step-44/step-44.cc

index e4a598ce0677cf60967340efd785633ac268fc70..5e7dff7f43a003ef8619c2466252e4efbcad90d2 100644 (file)
@@ -68,7 +68,7 @@ that might later give an explanation of what the parameter stands for.
 
 
 Once all parameters have been declared, parameters can be read, using the
-<code>ParameterHandler::read_input</code> family of functions. There are
+<code>ParameterHandler::parse_input</code> family of functions. There are
 versions of this function that can read from a file stream, that take a file
 name, or that simply take a string and parse it. When reading parameters, the
 class makes sure that only parameters are listed in the input that have been
@@ -118,4 +118,3 @@ The rest of the story is probably best told by looking at the source of step-19
 itself. Let us, however, end this introduction by pointing the reader at the
 extensive class documentation of the <code>ParameterHandler</code> class for
 more information on specific details of that class.
-
index 44902224a118078cc4d94c71df4f6b580981a787..f2ed06f7e1e246739880829eba94c9d45759ebae 100644 (file)
@@ -270,7 +270,7 @@ namespace Step19
             args.pop_front ();
 
             // Now read the input file:
-            prm.read_input (parameter_file);
+            prm.parse_input (parameter_file);
 
             // Both the output file name as well as the format can be
             // specified on the command line. We have therefore given them
index 5a84cfd9137746bb4cb9a0ed258428fe89e96dfc..86d9bcfac37a20f66b98870a99022a759e879970 100644 (file)
@@ -1756,7 +1756,7 @@ int main (int argc, char **argv)
       NeutronDiffusionProblem<dim>::Parameters parameters;
       parameters.declare_parameters (parameter_handler);
 
-      parameter_handler.read_input (filename);
+      parameter_handler.parse_input (filename);
 
       parameters.get_parameters (parameter_handler);
 
index 622e00b8fc248cf72a06cf2cb88990919314d3f0..25d9b4ab7e1236b01688ed4d504699480a115346 100644 (file)
@@ -253,7 +253,7 @@ namespace Step29
   {
     declare_parameters();
 
-    prm.read_input (parameter_file);
+    prm.parse_input (parameter_file);
   }
 
 
index c650d850d0aa92ec78a723e7c85aece8874d1749..e1656ca381a86863fff53fd82bed279e49b06610 100644 (file)
@@ -1054,9 +1054,7 @@ namespace Step32
         AssertThrow (false, ExcMessage (message.str().c_str()));
       }
 
-    const bool success = prm.read_input (parameter_file);
-    AssertThrow (success, ExcMessage ("Invalid input parameter file."));
-
+    prm.parse_input (parameter_file);
     parse_parameters (prm);
   }
 
index b78ade3a5cd43d3423081b6312f5319baf147379..b721d7ab867fdd0f81324c38cfd4d3181aa284f0 100644 (file)
@@ -1378,7 +1378,7 @@ namespace Step33
     ParameterHandler prm;
     Parameters::AllParameters<dim>::declare_parameters (prm);
 
-    prm.read_input (input_filename);
+    prm.parse_input (input_filename);
     parameters.parse_parameters (prm);
 
     verbose_cout.set_condition (parameters.output == Parameters::Solver::verbose);
index d507e8fb8f074b718ed1a7a245b3d3fba29795b9..787c57beba6e88c1ed5d29cc80778d1fdaca8cba 100644 (file)
@@ -417,7 +417,7 @@ namespace Step34
     // After declaring all these parameters to the ParameterHandler object,
     // let's read an input file that will give the parameters their values. We
     // then proceed to extract these values from the ParameterHandler object:
-    prm.read_input(filename);
+    prm.parse_input(filename);
 
     n_cycles = prm.get_integer("Number of cycles");
     external_refinement = prm.get_integer("External refinement");
index 54ab51e68d361250fb81ddb115f9b4905706c680..37fc372a6d30e95688535c7e0f691fcfeee97ce9 100644 (file)
@@ -209,7 +209,7 @@ namespace Step35
       std::ifstream file (filename);
       AssertThrow (file, ExcFileNotOpen (filename));
 
-      prm.read_input (file);
+      prm.parse_input (file);
 
       if (prm.get ("Method_Form") == std::string ("rotational"))
         form = METHOD_ROTATIONAL;
index 13ab66dcf3ec9dd35f5acb5092725ad3685d247a..5c64fdacc499809e99e6d8a295124dbb0a4fa71d 100644 (file)
@@ -135,7 +135,7 @@ namespace Step36
                               Patterns::Anything(),
                               "A functional description of the potential.");
 
-    parameters.read_input (prm_file);
+    parameters.parse_input (prm_file);
   }
 
 
index 54860f51e7c9eee81e28fefe7943bda95079e384..f289de7baac9790afb5ac0335a4a7f7efa329ccb 100644 (file)
@@ -2211,7 +2211,7 @@ int main (int argc, char *argv[])
           return 1;
         }
 
-      prm.read_input(argv[1]);
+      prm.parse_input(argv[1]);
       Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv,
                                                            numbers::invalid_unsigned_int);
       {
index 2dec4d7909aa4dd4d05f7ec525dd215f974e9a9a..2e271821edede55a06798dc756efa634b231ace9 100644 (file)
@@ -406,7 +406,7 @@ namespace Step44
     {
       ParameterHandler prm;
       declare_parameters(prm);
-      prm.read_input(input_file);
+      prm.parse_input(input_file);
       parse_parameters(prm);
     }
 

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.