16#ifndef dealii_function_h
17#define dealii_function_h
36template <
typename number>
38template <
int rank,
int dim,
typename Number>
149template <
int dim,
typename RangeNumberType =
double>
151 typename numbers::NumberTraits<RangeNumberType>::real_type>,
223 virtual RangeNumberType
247 std::vector<RangeNumberType> & values,
248 const unsigned int component = 0)
const;
274 std::vector<std::vector<RangeNumberType>> &values)
const;
300 const unsigned int component = 0)
const;
332 virtual RangeNumberType
347 std::vector<RangeNumberType> & values,
348 const unsigned int component = 0)
const;
379 const unsigned int component = 0)
const;
409 template <
int dim,
typename RangeNumberType =
double>
441 virtual RangeNumberType
450 std::vector<RangeNumberType> & return_values,
451 const unsigned int component = 0)
const override;
460 const unsigned int component = 0)
const override;
470 const unsigned int component = 0)
const override;
480 const unsigned int component = 0)
const override;
482 virtual RangeNumberType
484 const unsigned int component = 0)
const override;
509 template <
int dim,
typename RangeNumberType =
double>
529 template <
int dim,
typename RangeNumberType =
double>
541 virtual RangeNumberType
549 const unsigned int component = 0)
const override;
554 virtual RangeNumberType
556 const unsigned int component = 0)
const override;
563 const unsigned int component = 0)
const override;
573template <
int dim,
typename RangeNumberType =
double>
582template <
int dim,
typename RangeNumberType =
double>
601template <
int dim,
typename RangeNumberType =
double>
612 const RangeNumberType
value,
823template <
int dim,
typename RangeNumberType =
double>
839 virtual RangeNumberType
890template <
int dim,
typename RangeNumberType =
double>
892 :
public Function<dim, RangeNumberType>
916 virtual RangeNumberType
978template <
int dim,
typename RangeNumberType =
double>
991 const double initial_time = 0);
1002 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1004 const double initial_time = 0.0);
1015 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1020 const double initial_time = 0.0);
1029 virtual RangeNumberType
1040 const unsigned int component = 0)
const override;
1049 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1067 std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1074 std::function<Tensor<1, dim, RangeNumberType>(
const Point<dim> &)>>
1114template <
int dim,
typename RangeNumberType =
double>
1148 virtual RangeNumberType
1195template <
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
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
typename FunctionTime< typename numbers::NumberTraits< RangeNumberType >::real_type >::time_type time_type
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 RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
const TensorFunction< 1, dim, RangeNumberType > & tensor_function
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_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE