32 #ifndef MADNESS_MISC_PHANDLER_H__INCLUDED
33 #define MADNESS_MISC_PHANDLER_H__INCLUDED
52 #include <madness/external/muParser/muParser.h>
61 template <
typename T,
int NDIM>
83 }
catch (mu::Parser::exception_type &
e) {
84 std::cout <<
"muParser: " <<
e.GetMsg() << std::endl;
90 for (
int i = 0; i <
NDIM; ++i) {
92 r += vals_in[i]*vals_in[i];
98 }
catch (mu::Parser::exception_type &
e) {
99 std::cout <<
"muParser: " <<
e.GetMsg() << std::endl;
107 }
catch (mu::Parser::exception_type &
e) {
108 std::cout <<
"muParser: " <<
e.GetMsg() << std::endl;
Definition: phandler.h:62
double r
Definition: phandler.h:68
ParserHandler(std::string expr)
Definition: phandler.h:72
double vars[MAX_DIM]
Definition: phandler.h:67
mu::Parser parser
Definition: phandler.h:65
static const int MAX_DIM
Definition: phandler.h:66
void changeExpr(const std::string newExpr)
Definition: phandler.h:104
madness::Vector< double, NDIM > coordT
Definition: phandler.h:69
virtual T operator()(const coordT &vals_in) const
You should implement this to return f(x)
Definition: phandler.h:88
Abstract base class interface required for functors used as input to Functions.
Definition: function_interface.h:68
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition: madness_exception.h:119
Main include file for MADNESS and defines Function interface.
void e()
Definition: test_sig.cc:75
static const std::size_t NDIM
Definition: testpdiff.cc:42