34 #ifndef MADNESS_MISC_PHANDLER_H__INCLUDED
35 #define MADNESS_MISC_PHANDLER_H__INCLUDED
66 template <
typename T,
int NDIM>
71 static const int MAX_DIM = 6;
72 mutable double vars[MAX_DIM];
89 std::cout <<
"muParser: " << e.
GetMsg() << std::endl;
95 for (
int i = 0; i <
NDIM; ++i) {
97 r += vals_in[i]*vals_in[i];
102 return parser.
Eval();
104 std::cout <<
"muParser: " << e.
GetMsg() << std::endl;
113 std::cout <<
"muParser: " << e.
GetMsg() << std::endl;
118 #endif // MADNESS_MISC_PHANDLER_H__INCLUDED
Main include file for MADNESS and defines Function interface.
void DefineVar(const string_type &a_sName, value_type *a_fVar)
Add a user defined variable.
Definition: muParserBase.cpp:441
const int NDIM
Definition: tdse1.cc:44
::std::string string
Definition: gtest-port.h:872
ParserHandler(std::string expr)
Definition: phandler.h:77
virtual T operator()(const coordT &vals_in) const
You should implement this to return f(x)
Definition: phandler.h:93
Definition of the standard floating point parser.
value_type Eval() const
Calculate the result.
Definition: muParserBase.h:116
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
Error class of the parser.
Definition: muParserError.h:119
void SetExpr(const string_type &a_sExpr)
Set the formula.
Definition: muParserBase.cpp:261
tensorT sqrt(const tensorT &s, double tol=1e-8)
Computes matrix square root (not used any more?)
Definition: DFcode/moldft.cc:446
void changeExpr(const std::string newExpr)
Definition: phandler.h:109
Abstract base class interface required for functors used as input to Functions.
Definition: function_interface.h:58
Mathematical expressions parser.
Definition: muParser.h:52
Definition: phandler.h:67
#define MADNESS_EXCEPTION(msg, value)
Definition: worldexc.h:88
const string_type & GetMsg() const
Returns the message string for this error.
Definition: muParserError.cpp:299