30template <
int rank,
int dim,
typename Number>
31const std::vector<std::string> &
34 return this->expressions;
39template <
int rank,
int dim,
typename Number>
41 const double initial_time)
47template <
int rank,
int dim,
typename Number>
49 const std::string &expression,
50 const std::string &constants,
51 const std::string &variable_names)
72template <
int rank,
int dim,
typename Number>
75 const std::string & variables,
76 const std::vector<std::string> & expressions,
77 const std::map<std::string, double> &constants,
78 const bool time_dependent)
80 AssertThrow(this->n_components == expressions.size(),
81 ExcInvalidExpressionSize(this->n_components, expressions.size()));
83 variables, expressions, constants, time_dependent);
88template <
int rank,
int dim,
typename Number>
91 const std::string & vars,
92 const std::string & expression,
93 const std::map<std::string, double> &constants,
94 const bool time_dependent)
104template <
int rank,
int dim,
typename Number>
108 std::array<Number, Tensor<rank, dim, Number>::n_independent_components>
111 this->do_all_values(p, this->get_time(), values_view);
119template <
int rank,
int dim,
typename Number>
125 Assert(p.size() == values.size(),
128 for (
unsigned int i = 0; i < p.size(); ++i)
130 values[i] = value(p[i]);
135#include "tensor_function_parser.inst"
ArrayView< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
TensorFunctionParser(const double initial_time=0.0)
virtual Tensor< rank, dim, Number > value(const Point< dim > &p) const override
virtual void value_list(const std::vector< Point< dim > > &p, std::vector< Tensor< rank, dim, Number > > &values) const override
virtual void initialize(const std::string &vars, const std::vector< std::string > &expressions, const ConstMap &constants, const bool time_dependent=false) override
const std::vector< std::string > & get_expressions() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::map< std::string, double > constants
#define Assert(cond, exc)
static T to_value(const std::string &s, const Patterns::PatternBase &p= *Convert< T >::to_pattern())=delete
static const unsigned int max_int_value
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual void initialize(const std::string &vars, const std::vector< std::string > &expressions, const std::map< std::string, double > &constants, const bool time_dependent=false)
#define AssertThrow(cond, exc)
std::vector< std::string > split_string_list(const std::string &s, const std::string &delimiter=",")