From 02e7df0cbe0e94d5e4604dfecae3266c4272d460 Mon Sep 17 00:00:00 2001 From: schrage Date: Wed, 28 Jul 1999 08:51:23 +0000 Subject: [PATCH] Finished. git-svn-id: https://svn.dealii.org/trunk@1619 0785d39b-7218-0410-832d-ea1e28bc413d --- .../chapter-1.elements/parameters.html | 65 ++++++++++++++++++- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/deal.II/doc/tutorial/chapter-1.elements/parameters.html b/deal.II/doc/tutorial/chapter-1.elements/parameters.html index f442255c32..0effc5a77b 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/parameters.html +++ b/deal.II/doc/tutorial/chapter-1.elements/parameters.html @@ -205,7 +205,7 @@ Subsections may be nested, i.e. you are at liberty to declare subsections within subsections within subsections...

-

Parameter types and pattern matching

+

Parameter types

The parameter handler allows you to specify that any parameter @@ -213,7 +213,7 @@ be of a distinct type. Upon reading a file the value of this parameter is checked against the type and an exception is thrown if they do not match. An exception is also thrown if the default -parameter if the default parameter does not match the specified type. +parameter does not match the specified type. Below we show a list of the types available. The first column gives an explanation, the second lists the corresponding C++ type and the third column shows how to use this type in deal.II. @@ -281,20 +281,79 @@ multiple lines.

Leading and trailing whitespace is ignored and multiple whitespace is condensed into one. Entry or subsection -declarations in your code should therefore +declarations within your code should therefore not contain multiple whitespace, which will not be recognized.

Different input sources

+You can obtain data from three different kinds of source:

+ + +

+It is possible to use different sources successively. Parameters +that are entered more than once will be overwritten, i.e. the +value encountered last of the parameter in question is used. +

+ +

+Example: +We read parameters successively +from three different sources. This example was taken from +the ParameterHandler class documentation. +

+ +
+
+ParameterHandler prm;
+...
+// declaration of entries
+...
+prm.read_input (cin);         // read input from standard in,
+// or
+prm.read_input ("simulation.in");
+// or
+char *in = "set Time step size = 0.3 \n ...";
+prm.read_input (in);
+...
+
+

Parameter output

+You can, for example for logging purposes, write all the parameters +your code knows about to an ostream in a given format. +The formats supported at present are text and LaTeX. +The method handling this is called:
+ +ostream & ParameterHandler::print_parameters(ostream &out, const OutputStyle style) +
+

+ +

+You can also write the parameters of a single subsection to an +ostream using
+ +void ParameterHandler::print_parameters_section (ostream &out, + const OutputStyle style, + const unsigned int indent_level); +

+

+In both cases out is the ostream +the parameters are written to, style is +the output format, either +text or LaTeX. In the case of subsections +the indent_level is the level of indentation. +


-- 2.39.5