]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix test that relies on units
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Feb 2014 21:22:27 +0000 (21:22 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Feb 2014 21:22:27 +0000 (21:22 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_muparser@32433 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/function_parser_02.cc
tests/base/function_parser_02.with_functionparser=true.output

index 761e7a382ebfff57374f7eeae7088b560a72a192..ea1fea353547c04db8c47bc7ef6678bb364bba15 100644 (file)
@@ -18,6 +18,8 @@
 
 // This program tests the functionality of the function parser
 // wrapper with respect to the ability to deal with units.
+// because units are deprecated and muparser can not deal with this,
+// recycle the test to use constants instead of units
 
 #include "../tests.h"
 #include <fstream>
@@ -42,14 +44,14 @@ int main ()
   std::map<std::string, double> units;
 
   constants["PI"] = 3.141592654;
-  units["cm"] = 10;
-  units["m"] = 1000;
+  constants["cm"] = 10;
+  constants["m"] = 1000;
 
   Point<2> point(2.0, 3.0);
 
   //initialized with units
   FunctionParser<2> fp;
-  function[0] = "x cm + y m + PI";
+  function[0] = "x * cm + y * m + PI";
   fp.initialize(FunctionParser<2>::default_variable_names(),
                 function, constants, units);
 
index 9e199c816018359eb45bf12d1666ca842e3b5217..e530a8066a9736a5ffe388d6fb299b33bcf68143 100644 (file)
@@ -1,5 +1,5 @@
 
-DEAL::Function [x cm + y m + PI] @point [2.00000 3.00000] is [3023.14]
-DEAL::Function [x cm + y m + PI] @point [2.00000 3.00000] is [3023.14]
+DEAL::Function [x * cm + y * m + PI] @point [2.00000 3.00000] is [3023.14]
+DEAL::Function [x * cm + y * m + PI] @point [2.00000 3.00000] is [3023.14]
 DEAL::Function [x + y + PI] @point [2.00000 3.00000] is [8.14159]
 DEAL::Function [x + y + PI] @point [2.00000 3.00000] is [8.14159]

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.