29template <
int rank,
int dim,
typename Number>
30const std::vector<std::string> &
33 return this->expressions;
38template <
int rank,
int dim,
typename Number>
40 const double initial_time)
46template <
int rank,
int dim,
typename Number>
48 const std::string &expression,
49 const std::string &constants,
50 const std::string &variable_names)
71template <
int rank,
int dim,
typename Number>
74 const std::string &variables,
75 const std::vector<std::string> &expressions,
76 const std::map<std::string, double> &constants,
77 const bool time_dependent)
79 AssertThrow(this->n_components == expressions.size(),
80 ExcInvalidExpressionSize(this->n_components, expressions.size()));
82 variables, expressions, constants, time_dependent);
87template <
int rank,
int dim,
typename Number>
90 const std::string &vars,
91 const std::string &expression,
92 const std::map<std::string, double> &constants,
93 const bool time_dependent)
103template <
int rank,
int dim,
typename Number>
107 std::array<Number, Tensor<rank, dim, Number>::n_independent_components>
110 this->do_all_values(p, this->get_time(), values_view);
118template <
int rank,
int dim,
typename Number>
124 Assert(p.size() == values.size(),
127 for (
unsigned int i = 0; i < p.size(); ++i)
129 values[i] = value(p[i]);
134#include "tensor_function_parser.inst"
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
static const unsigned int max_int_value
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
std::map< std::string, double > constants
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 DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
std::vector< std::string > split_string_list(const std::string &s, const std::string &delimiter=",")