]> https://gitweb.dealii.org/ - dealii.git/commitdiff
deprecate units in the function parser
authorTimo Heister <timo.heister@gmail.com>
Fri, 7 Feb 2014 21:20:12 +0000 (21:20 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 7 Feb 2014 21:20:12 +0000 (21:20 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_muparser@32432 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/function_parser.h
deal.II/source/base/function_parser.cc

index f4ce3a2f8085e7936b5b15dfe91cfd52f9d25cb5..5a83e54adccc0eb4d14ef0dedcb90c2e5cc9fa38 100644 (file)
@@ -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.
-   *
-   * <b>use_degrees</b>. 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<std::string> &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:
+     * <b>use_degrees</b>. 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<std::string> &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:
+     * <b>use_degrees</b>. 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 <b>units</b>.
@@ -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
index 6954800be2edeab9ae92f494f6fd92bf5af90718..fe95dd5fe260f4012a850f65188113f63d7f001e 100644 (file)
@@ -90,6 +90,17 @@ void FunctionParser<dim>::initialize (const std::string                   &varia
               use_degrees);
 }
 
+template <int dim>
+void FunctionParser<dim>::initialize (const std::string              &vars,
+                                     const std::vector<std::string> &expressions,
+                                     const std::map<std::string, double> &constants,
+                                     const bool time_dependent)
+  {
+    initialize(vars, expressions, constants, time_dependent, false);
+  }
+
+
+
 #ifdef DEAL_II_WITH_MUPARSER
 template <int dim>
 void FunctionParser<dim>:: init_muparser() const
@@ -251,6 +262,14 @@ void FunctionParser<dim>::initialize (const std::string   &variables,
   initialized = true;
 }
 
+template <int dim>
+void FunctionParser<dim>::initialize (const std::string &vars,
+                   const std::string &expression,
+                   const std::map<std::string, double> &constants,
+                   const bool time_dependent)
+{
+  initialize(vars, expression, constants, time_dependent, false);
+}
 
 
 template <int dim>

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.