7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test function parser"
10 #include <boost/test/unit_test.hpp>
12 #include <boost/assign/list_of.hpp>
17 using namespace boost;
40 fp.Parse(
"sqrt(x*x + y*y)",
"x,y");
42 double result = fp.Eval(variables);
44 BOOST_CHECK_CLOSE( result, sqrt(1.5*1.5 + 2.9*2.9) , 1
e-6);
50 fp.Parse(
"x/y",
"x,y");
52 double result = fp.Eval(variables);
54 BOOST_CHECK_CLOSE( result, 1.5/2.9 , 1
e-6);
66 BOOST_CHECK_CLOSE( r[0], 1./3. , 1
e-6);
79 BOOST_CHECK_CLOSE( r[0], 5.0 , 1
e-6);
80 BOOST_CHECK_CLOSE( r[1], 35.0 , 1
e-6);
88 BOOST_AUTO_TEST_SUITE_END()
external boost library namespace
Basic Classes for Mathematical applications used by COOLFluiD.
Real e()
Definition of the Unit charge [C].
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealVector
Dynamic sized column vector.
Top-level namespace for coolfluid.
BOOST_AUTO_TEST_CASE(Constructors)
Most basic kernel library.
~FunctionParser_Fixture()
std::vector< Real > VariablesT
Variable storage.