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>
819 const std::function<RangeNumberType(
const double,
const Point<dim> &)>
826 virtual RangeNumberType
834 const std::function<RangeNumberType(
const double,
const Point<dim> &)>
878template <
int dim,
typename RangeNumberType =
double>
880 :
public Function<dim, RangeNumberType>
904 virtual RangeNumberType
966template <
int dim,
typename RangeNumberType =
double>
979 const double initial_time = 0);
990 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
992 const double initial_time = 0.0);
1003 const std::function<RangeNumberType(
const Point<dim> &,
const unsigned int)>
1006 const double initial_time = 0.0);
1017 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1022 const double initial_time = 0.0);
1031 virtual RangeNumberType
1042 const unsigned int component = 0)
const override;
1051 const std::vector<std::function<RangeNumberType(
const Point<dim> &)>>
1069 std::function<RangeNumberType(
const Point<dim> &,
const unsigned int)>
1075 std::function<Tensor<1, dim, RangeNumberType>(
const Point<dim> &,
1076 const unsigned int)>
1116template <
int dim,
typename RangeNumberType =
double>
1150 virtual RangeNumberType
1180 const unsigned int component = 0)
const override;
1199 const unsigned int component = 0)
const override;
1212 &gradients)
const override;
1226 &gradients)
const override;
1251template <
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)
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
std::function< RangeNumberType(const Point< dim > &, const unsigned int)> function_values
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)
std::function< Tensor< 1, dim, RangeNumberType >(const Point< dim > &, const unsigned int)> function_gradients
FunctionFromFunctionObjects(const std::vector< std::function< RangeNumberType(const Point< dim > &)> > &values, const double initial_time=0.0)
FunctionFromFunctionObjects(const std::function< RangeNumberType(const Point< dim > &, const unsigned int)> &values, const unsigned int n_components, 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)
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)
ScalarFunctionFromFunctionObject(const std::function< RangeNumberType(const double, const Point< dim > &)> &function_object_t)
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
const std::function< RangeNumberType(const double, 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