17 #ifndef __deal2__function_parser_h
18 #define __deal2__function_parser_h
21 #include <deal.II/base/config.h>
23 #include <deal.II/base/function.h>
24 #include <deal.II/base/tensor.h>
25 #include <deal.II/base/point.h>
37 template <
typename>
class Vector;
336 const double initial_time = 0.0);
427 const std::vector<std::string> &expressions,
428 const ConstMap &constants,
429 const bool time_dependent =
false,
430 const bool use_degrees =
false);
446 const std::vector<std::string> &expressions,
447 const ConstMap &constants,
448 const ConstMap &units,
449 const bool time_dependent =
false,
450 const bool use_degrees =
false);
465 const std::string &expression,
466 const ConstMap &constants,
467 const bool time_dependent =
false,
468 const bool use_degrees =
false);
476 const std::string &expression,
477 const ConstMap &constants,
478 const ConstMap &units,
479 const bool time_dependent =
false,
480 const bool use_degrees =
false);
507 const unsigned int component = 0)
const;
523 DeclException2 (ExcParseError,
525 <<
"Parsing Error at Column " << arg1
526 <<
". The parser said: " << arg2);
528 DeclException2 (ExcInvalidExpressionSize,
530 <<
"The number of components (" << arg1
531 <<
") is not equal to the number of expressions ("
544 fparser::FunctionParser *
fp;
593 DEAL_II_NAMESPACE_CLOSE
virtual double value(const Point< dim > &p, const unsigned int component=0) const
ConstMap::iterator ConstMapIterator
static std::string default_variable_names()
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const
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)
#define Assert(cond, exc)
FunctionParser(const unsigned int n_components=1, const double initial_time=0.0)
const unsigned int n_components
fparser::FunctionParser * fp
std::map< std::string, double > ConstMap
::ExceptionBase & ExcNotImplemented()