Reference documentation for deal.II version 9.0.0
function_derivative.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2017 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_function_derivative_h
17 #define dealii_function_derivative_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/base/exceptions.h>
21 #include <deal.II/base/function.h>
22 #include <deal.II/base/auto_derivative_function.h>
23 
24 DEAL_II_NAMESPACE_OPEN
25 
26 
43 template <int dim>
45 {
46 public:
53  const Point<dim> &direction,
54  const double h = 1.e-6);
55 
69  const std::vector<Point<dim> > &direction,
70  const double h = 1.e-6);
71 
85  void set_h (const double h);
86 
87  virtual double value (const Point<dim> &p,
88  const unsigned int component = 0) const;
89 
90  virtual void vector_value(const Point<dim> &p,
91  Vector<double> &value) const;
92 
93  virtual void value_list (const std::vector<Point<dim> > &points,
94  std::vector<double> &values,
95  const unsigned int component = 0) const;
96 
102  std::size_t memory_consumption () const;
103 
104 private:
108  const Function<dim> &f;
109 
113  double h;
114 
119 
123  std::vector<Tensor<1,dim> > incr;
124 };
125 
126 DEAL_II_NAMESPACE_CLOSE
127 
128 #endif
virtual double value(const Point< dim > &p, const unsigned int component=0) const
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< double > &values, const unsigned int component=0) const
void set_formula(typename AutoDerivativeFunction< dim >::DifferenceFormula formula=AutoDerivativeFunction< dim >::Euler)
std::size_t memory_consumption() const
FunctionDerivative(const Function< dim > &f, const Point< dim > &direction, const double h=1.e-6)
const Function< dim > & f
AutoDerivativeFunction< dim >::DifferenceFormula formula
virtual void vector_value(const Point< dim > &p, Vector< double > &value) const
std::vector< Tensor< 1, dim > > incr
void set_h(const double h)