From 13387139778aa35ef33f6aad72e9a68d6ec776b8 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 17 Sep 2016 13:21:02 -0400 Subject: [PATCH] Use parse_input, not read_input, in tutorials. read_input is now deprecated in favor of parse_input, which raises exceptions. --- examples/step-19/doc/intro.dox | 3 +-- examples/step-19/step-19.cc | 2 +- examples/step-28/step-28.cc | 2 +- examples/step-29/step-29.cc | 2 +- examples/step-32/step-32.cc | 4 +--- examples/step-33/step-33.cc | 2 +- examples/step-34/step-34.cc | 2 +- examples/step-35/step-35.cc | 2 +- examples/step-36/step-36.cc | 2 +- examples/step-42/step-42.cc | 2 +- examples/step-44/step-44.cc | 2 +- 11 files changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/step-19/doc/intro.dox b/examples/step-19/doc/intro.dox index e4a598ce06..5e7dff7f43 100644 --- a/examples/step-19/doc/intro.dox +++ b/examples/step-19/doc/intro.dox @@ -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 -ParameterHandler::read_input family of functions. There are +ParameterHandler::parse_input 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 ParameterHandler class for more information on specific details of that class. - diff --git a/examples/step-19/step-19.cc b/examples/step-19/step-19.cc index 44902224a1..f2ed06f7e1 100644 --- a/examples/step-19/step-19.cc +++ b/examples/step-19/step-19.cc @@ -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 diff --git a/examples/step-28/step-28.cc b/examples/step-28/step-28.cc index 5a84cfd913..86d9bcfac3 100644 --- a/examples/step-28/step-28.cc +++ b/examples/step-28/step-28.cc @@ -1756,7 +1756,7 @@ int main (int argc, char **argv) NeutronDiffusionProblem::Parameters parameters; parameters.declare_parameters (parameter_handler); - parameter_handler.read_input (filename); + parameter_handler.parse_input (filename); parameters.get_parameters (parameter_handler); diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index 622e00b8fc..25d9b4ab7e 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -253,7 +253,7 @@ namespace Step29 { declare_parameters(); - prm.read_input (parameter_file); + prm.parse_input (parameter_file); } diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index c650d850d0..e1656ca381 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -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); } diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index b78ade3a5c..b721d7ab86 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -1378,7 +1378,7 @@ namespace Step33 ParameterHandler prm; Parameters::AllParameters::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); diff --git a/examples/step-34/step-34.cc b/examples/step-34/step-34.cc index d507e8fb8f..787c57beba 100644 --- a/examples/step-34/step-34.cc +++ b/examples/step-34/step-34.cc @@ -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"); diff --git a/examples/step-35/step-35.cc b/examples/step-35/step-35.cc index 54ab51e68d..37fc372a6d 100644 --- a/examples/step-35/step-35.cc +++ b/examples/step-35/step-35.cc @@ -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; diff --git a/examples/step-36/step-36.cc b/examples/step-36/step-36.cc index 13ab66dcf3..5c64fdacc4 100644 --- a/examples/step-36/step-36.cc +++ b/examples/step-36/step-36.cc @@ -135,7 +135,7 @@ namespace Step36 Patterns::Anything(), "A functional description of the potential."); - parameters.read_input (prm_file); + parameters.parse_input (prm_file); } diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index 54860f51e7..f289de7baa 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -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); { diff --git a/examples/step-44/step-44.cc b/examples/step-44/step-44.cc index 2dec4d7909..2e271821ed 100644 --- a/examples/step-44/step-44.cc +++ b/examples/step-44/step-44.cc @@ -406,7 +406,7 @@ namespace Step44 { ParameterHandler prm; declare_parameters(prm); - prm.read_input(input_file); + prm.parse_input(input_file); parse_parameters(prm); } -- 2.39.5