From: heister Date: Fri, 7 Feb 2014 21:20:12 +0000 (+0000) Subject: deprecate units in the function parser X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc56374fd0dc19223b9e7f407fa6ee4ed3ee327d;p=dealii-svn.git deprecate units in the function parser git-svn-id: https://svn.dealii.org/branches/branch_muparser@32432 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 f4ce3a2f80..5a83e54adc 100644 --- a/deal.II/include/deal.II/base/function_parser.h +++ b/deal.II/include/deal.II/base/function_parser.h @@ -424,18 +424,26 @@ public: * method in this case is dim+1. The * value of this parameter defaults to * false, i.e. do not consider time. - * - * use_degrees. Parameter to - * decide if the trigonometric functions - * work in radians or degrees. The - * default for this parameter is false, - * i.e. use radians and not degrees. */ void initialize (const std::string &vars, const std::vector &expressions, const ConstMap &constants, - const bool time_dependent = false, - const bool use_degrees = false); + const bool time_dependent = false); + + /** + * Same as above, but with an additional parameter: + * use_degrees. Parameter to decide if the trigonometric functions + * work in radians or degrees. The default for this parameter is false, + * i.e. use radians and not degrees. + * + * @note: this function is deprecated. Use the function without this + * argument instead (which has the default use_degrees=false). + */ + void initialize (const std::string &vars, + const std::vector &expressions, + const ConstMap &constants, + const bool time_dependent, + const bool use_degrees) DEAL_II_DEPRECATED; /** @@ -455,7 +463,7 @@ public: const ConstMap &constants, const ConstMap &units, const bool time_dependent = false, - const bool use_degrees = false); + const bool use_degrees = false) DEAL_II_DEPRECATED; /** * Initialize the function. Same as @@ -472,9 +480,22 @@ public: void initialize (const std::string &vars, const std::string &expression, const ConstMap &constants, - const bool time_dependent = false, - const bool use_degrees = false); - + const bool time_dependent = false); + + /** + * Same as above, but with an additional parameter: + * use_degrees. Parameter to decide if the trigonometric functions + * work in radians or degrees. The default for this parameter is false, + * i.e. use radians and not degrees. + * + * @note: this function is deprecated. Use the function without this + * argument instead (which has the default use_degrees=false). + */ + void initialize (const std::string &vars, + const std::string &expression, + const ConstMap &constants, + const bool time_dependent, + const bool use_degrees) DEAL_II_DEPRECATED; /** * Initialize the function. Same as * above, but with units. @@ -485,7 +506,7 @@ public: const ConstMap &constants, const ConstMap &units, const bool time_dependent = false, - const bool use_degrees = false); + const bool use_degrees = false) DEAL_II_DEPRECATED; /** * A function that returns diff --git a/deal.II/source/base/function_parser.cc b/deal.II/source/base/function_parser.cc index 6954800be2..fe95dd5fe2 100644 --- a/deal.II/source/base/function_parser.cc +++ b/deal.II/source/base/function_parser.cc @@ -90,6 +90,17 @@ void FunctionParser::initialize (const std::string &varia use_degrees); } +template +void FunctionParser::initialize (const std::string &vars, + const std::vector &expressions, + const std::map &constants, + const bool time_dependent) + { + initialize(vars, expressions, constants, time_dependent, false); + } + + + #ifdef DEAL_II_WITH_MUPARSER template void FunctionParser:: init_muparser() const @@ -251,6 +262,14 @@ void FunctionParser::initialize (const std::string &variables, initialized = true; } +template +void FunctionParser::initialize (const std::string &vars, + const std::string &expression, + const std::map &constants, + const bool time_dependent) +{ + initialize(vars, expression, constants, time_dependent, false); +} template