 |
Reference documentation for deal.II version 9.1.1
|
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
16 #ifndef dealii_function_parser_h
17 #define dealii_function_parser_h
20 #include <deal.II/base/config.h>
22 #include <deal.II/base/auto_derivative_function.h>
23 #include <deal.II/base/exceptions.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/base/tensor.h>
26 #include <deal.II/base/thread_local_storage.h>
37 DEAL_II_NAMESPACE_OPEN
233 const double initial_time = 0.0,
234 const double h = 1e-8);
246 const double h = 1e-8);
302 const bool time_dependent =
false);
313 const std::string &expression,
315 const bool time_dependent =
false);
332 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
348 const std::vector<std::string> &
358 <<
"Parsing Error at Column " << arg1
359 <<
". The parser said: " << arg2);
364 <<
"The number of components (" << arg1
365 <<
") is not equal to the number of expressions (" << arg2
371 #ifdef DEAL_II_WITH_MUPARSER
450 DEAL_II_NAMESPACE_CLOSE
Threads::ThreadLocalStorage< std::vector< std::unique_ptr< mu::Parser > > > fp
static ::ExceptionBase & ExcNotImplemented()
FunctionParser(const unsigned int n_components=1, const double initial_time=0.0, const double h=1e-8)
void init_muparser() const
const unsigned int n_components
static ::ExceptionBase & ExcParseError(int arg1, std::string arg2)
static std::string default_variable_names()
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
std::map< std::string, double > ConstMap
~FunctionParser() override
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const override
std::map< std::string, double > constants
std::vector< std::string > expressions
A class that provides a separate storage location on each thread that accesses the object.
LinearAlgebra::distributed::Vector< Number > Vector
static ::ExceptionBase & ExcInvalidExpressionSize(int arg1, int arg2)
Threads::ThreadLocalStorage< std::vector< double > > vars
void initialize(const std::string &vars, const std::vector< std::string > &expressions, const ConstMap &constants, const bool time_dependent=false)
std::vector< std::string > var_names
#define Assert(cond, exc)
const std::vector< std::string > & get_expressions() const
ConstMap::iterator ConstMapIterator
#define DeclException2(Exception2, type1, type2, outsequence)