15#ifndef dealii_function_h
16#define dealii_function_h
35template <
typename number>
37template <
int rank,
int dim,
typename Number>
148template <
int dim,
typename RangeNumberType =
double>
150 typename numbers::NumberTraits<RangeNumberType>::real_type>,
222 virtual RangeNumberType
246 std::vector<RangeNumberType> &values,
247 const unsigned int component = 0)
const;
273 std::vector<std::vector<RangeNumberType>> &values)
const;
299 const unsigned int component = 0)
const;
331 virtual RangeNumberType
346 std::vector<RangeNumberType> &values,
347 const unsigned int component = 0)
const;
378 const unsigned int component = 0)
const;
408 template <
int dim,
typename RangeNumberType =
double>
440 virtual RangeNumberType
449 std::vector<RangeNumberType> &return_values,
450 const unsigned int component = 0)
const override;
459 const unsigned int component = 0)
const override;
469 const unsigned int component = 0)
const override;
479 const unsigned int component = 0)
const override;
481 virtual RangeNumberType
483 const unsigned int component = 0)
const override;
508 template <
int dim,
typename RangeNumberType =
double>
528 template <
int dim,
typename RangeNumberType =
double>
540 virtual RangeNumberType
548 const unsigned int component = 0)
const override;
553 virtual RangeNumberType
555 const unsigned int component = 0)
const override;
562 const unsigned int component = 0)
const override;
579template <
int dim,
typename RangeNumberType =
double>
590 const RangeNumberType
value,
801template <
int dim,
typename RangeNumberType =
double>
817 virtual RangeNumberType
868template <
int dim,
typename RangeNumberType =
double>
870 :
public Function<dim, RangeNumberType>
894 virtual RangeNumberType
956template <
int dim,
typename RangeNumberType =
double>
969 const double initial_time = 0);
980 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
982 const double initial_time = 0.0);
993 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
998 const double initial_time = 0.0);
1007 virtual RangeNumberType
1018 const unsigned int component = 0)
const override;
1027 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1045 std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1052 std::function<Tensor<1, dim, RangeNumberType>(
const Point<dim> &)>>
1092template <
int dim,
typename RangeNumberType =
double>
1126 virtual RangeNumberType
1156 const unsigned int component = 0)
const override;
1175 const unsigned int component = 0)
const override;
1188 &gradients)
const override;
1202 &gradients)
const override;
1227template <
int dim,
typename RangeNumberType>
const std::pair< unsigned int, unsigned int > selected_components
virtual std::size_t memory_consumption() const override
ComponentSelectFunction(const std::pair< unsigned int, unsigned int > &selected, const unsigned int n_components)
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &return_value) const override
ComponentSelectFunction(const unsigned int selected, const unsigned int n_components)
virtual void substitute_function_value_with(const Functions::ConstantFunction< dim, RangeNumberType > &f)
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &values) const override
ComponentSelectFunction(const unsigned int selected, const RangeNumberType value, const unsigned int n_components)
std::vector< std::function< Tensor< 1, dim, RangeNumberType >(const Point< dim > &)> > function_gradients
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const override
FunctionFromFunctionObjects(const std::vector< std::function< RangeNumberType(const Point< dim > &)> > &values, const std::vector< std::function< Tensor< 1, dim, RangeNumberType >(const Point< dim > &)> > &gradients, const double initial_time=0.0)
FunctionFromFunctionObjects(const std::vector< std::function< RangeNumberType(const Point< dim > &)> > &values, const double initial_time=0.0)
void set_function_values(const std::vector< std::function< RangeNumberType(const Point< dim > &)> > &values)
FunctionFromFunctionObjects(const unsigned int n_components=1, const double initial_time=0)
void set_function_gradients(const std::vector< std::function< Tensor< 1, dim, RangeNumberType >(const Point< dim > &)> > &gradients)
std::vector< std::function< RangeNumberType(const Point< dim > &)> > function_values
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients) const
virtual void vector_laplacian_list(const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &values) const
virtual void vector_values(const std::vector< Point< dim > > &points, std::vector< std::vector< RangeNumberType > > &values) const
typename FunctionTime< typename numbers::NumberTraits< RangeNumberType >::real_type >::time_type time_type
static constexpr unsigned int dimension
virtual void vector_laplacian(const Point< dim > &p, Vector< RangeNumberType > &values) const
virtual SymmetricTensor< 2, dim, RangeNumberType > hessian(const Point< dim > &p, const unsigned int component=0) const
Function & operator=(const Function &f)
virtual std::size_t memory_consumption() const
virtual void gradient_list(const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients, const unsigned int component=0) const
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &values) const
const unsigned int n_components
virtual RangeNumberType laplacian(const Point< dim > &p, const unsigned int component=0) const
virtual ~Function() override=0
Function(const unsigned int n_components=1, const time_type initial_time=0.0)
virtual void laplacian_list(const std::vector< Point< dim > > &points, std::vector< RangeNumberType > &values, const unsigned int component=0) const
virtual void vector_hessian_list(const std::vector< Point< dim > > &points, std::vector< std::vector< SymmetricTensor< 2, dim, RangeNumberType > > > &values) const
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< RangeNumberType > &values, const unsigned int component=0) const
virtual void vector_gradient_list(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const
virtual void vector_hessian(const Point< dim > &p, std::vector< SymmetricTensor< 2, dim, RangeNumberType > > &values) const
virtual void vector_gradients(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &values) const
virtual void hessian_list(const std::vector< Point< dim > > &points, std::vector< SymmetricTensor< 2, dim, RangeNumberType > > &values, const unsigned int component=0) const
Function(const Function &f)=default
virtual std::size_t memory_consumption() const override
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< RangeNumberType > &return_values, const unsigned int component=0) const override
ConstantFunction(const RangeNumberType *begin_ptr, const unsigned int n_components)
virtual RangeNumberType laplacian(const Point< dim > &point, const unsigned int component=0) const override
virtual void gradient_list(const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients, const unsigned int component=0) const override
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients) const override
virtual SymmetricTensor< 2, dim, RangeNumberType > hessian(const Point< dim > &point, const unsigned int component=0) const override
ConstantFunction(const RangeNumberType value, const unsigned int n_components=1)
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &return_values) const override
ConstantFunction(const std::vector< RangeNumberType > &values)
virtual void vector_gradient_list(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const override
std::vector< RangeNumberType > function_value_vector
ConstantFunction(const Vector< RangeNumberType > &values)
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &return_value) const override
virtual SymmetricTensor< 2, dim, RangeNumberType > hessian(const Point< dim > &p, const unsigned int component=0) const override
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
virtual RangeNumberType laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const override
ZeroFunction(const unsigned int n_components=1)
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
const std::function< RangeNumberType(const Point< dim > &)> function_object
ScalarFunctionFromFunctionObject(const std::function< RangeNumberType(const Point< dim > &)> &function_object)
const std::function< RangeNumberType(const Point< dim > &)> function_object
const unsigned int selected_component
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &values) const override
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
VectorFunctionFromScalarFunctionObject(const std::function< RangeNumberType(const Point< dim > &)> &function_object, const unsigned int selected_component, const unsigned int n_components)
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients) const override
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_gradients(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const override
virtual void vector_gradient_list(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const override
const TensorFunction< 1, dim, RangeNumberType > & tensor_function
virtual void gradient_list(const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &value_list) const override
VectorFunctionFromTensorFunction(const TensorFunction< 1, dim, RangeNumberType > &tensor_function, const unsigned int selected_component=0, const unsigned int n_components=dim)
virtual ~VectorFunctionFromTensorFunction() override=default
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &values) const override
const unsigned int selected_component
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE