From: bangerth Date: Sun, 30 Sep 2012 16:06:12 +0000 (+0000) Subject: Update documentation in a couple of places. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a1631c98ca47284aef3f71c950192e830efbecc;p=dealii-svn.git Update documentation in a couple of places. git-svn-id: https://svn.dealii.org/trunk@26891 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/function_parser.h b/deal.II/include/deal.II/base/function_parser.h index 1f5d9a705e..538e643eaa 100644 --- a/deal.II/include/deal.II/base/function_parser.h +++ b/deal.II/include/deal.II/base/function_parser.h @@ -15,8 +15,6 @@ #define __deal2__function_parser_h -//TODO: Update to latest version of fparser library from http://warp.povusers.org/FunctionParser/ - #include #include #include @@ -56,7 +54,7 @@ template class Vector; * The following example shows how to use this class: * @verbatim // Define some constants that will be used by the function parser - std::map constants; + std::map constants; constants["pi"] = numbers::PI; // Define the variables that will be used inside the expressions @@ -73,12 +71,12 @@ template class Vector; // And populate it with the newly created objects. vector_function.initialize(variables, - expressions, - constants); + expressions, + constants); @endverbatim * FunctionParser also provides an option to use units in expressions. - * We can illustrate the use of this functionality with the following example: + * We illustrate the use of this functionality with the following example: * @verbatim // Define some constants that will be used by the function parser std::map constants; @@ -102,7 +100,7 @@ template class Vector; vector_function.initialize(variables, expressions, constants, - units); //An exptra argument here + units); //An extra argument here // Point at which we want to evaluate the function Point<2> point(2.0, 3.0); @@ -113,24 +111,24 @@ template class Vector; "[" << vector_function.value(point) << "]" << std::endl; * @endverbatim - + * * Units are similar to constants in the way they are passed to the - * parser, i.e. via std::map. But units are slightly different + * parser, i.e. via std::map. But units are slightly different * in that they have a higher precedence than any other operator * (except parentheses). Thus for example "5/2in" is parsed as "5/(2*300)". - * (If 5/2 inches is what one wants, it has to be written "(5/2)in".) - + * (If you actually do want 5/2 inches, it has to be written as "(5/2)in".) + * * Overall, the main point of units is to make input expressions more readable * since expressing, say, length as 10cm looks more natural than 10*cm. - + * * Beware that the user has full control over units as well as full * responsibility for "sanity" of the parsed expressions, because the parser * does NOT know anything about the physical nature of units and one would not * be warned when adding kilometers to kilograms. - - * units argument to the initialize function is optional, i.e. the + * + * The units argument to the initialize function is optional, i.e. the * user does NOT have to use this functionality. - + * * For more information on this feature, please see * contrib/functionparser/fparser.txt @@ -152,10 +150,10 @@ template class Vector; @endverbatim * - * This class overloads for you the virtual methods value() and + * This class overloads the virtual methods value() and * vector_value() of the Function base class with the byte compiled versions * of the expressions given to the initialize() methods. Note that the class - * will not work unless you call the initialize() method first, that accepts + * will not work unless you first call the initialize() method that accepts * the text description of the function as an argument (among other * things). The reason for this is that this text description may be read from * an input file, and may therefore not be available at object construction @@ -534,9 +532,13 @@ class FunctionParser : public Function private: /** * A pointer to the actual - * function parsers. + * function parsers. The pointer is + * to an array of parsers, not + * just a single one. The length of + * the array equals the number of + * vector components. */ - fparser::FunctionParser * fp; + fparser::FunctionParser *fp; /** * State of usability. This