Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
function_derivative.h
1 // ---------------------------------------------------------------------
2 // @f$Id: function_derivative.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2000 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__function_derivative_h
18 #define __deal2__function_derivative_h
19 
20 #include <deal.II/base/config.h>
22 #include <deal.II/base/function.h>
23 #include <deal.II/base/auto_derivative_function.h>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 
44 template <int dim>
46 {
47 public:
57  const Point<dim> &direction,
58  const double h = 1.e-6);
59 
81  const std::vector<Point<dim> > &direction,
82  const double h = 1.e-6);
83 
103  void set_h (const double h);
104 
105  virtual double value (const Point<dim> &p,
106  const unsigned int component = 0) const;
107 
108  virtual void vector_value(const Point<dim> &p,
109  Vector<double> &value) const;
110 
111  virtual void value_list (const std::vector<Point<dim> > &points,
112  std::vector<double> &values,
113  const unsigned int component = 0) const;
114 
131  std::size_t memory_consumption () const;
132 
139  DeclException0(ExcInvalidFormula);
141 private:
145  const Function<dim> &f;
146 
151  double h;
152 
157 
163  std::vector<Point<dim> > incr;
164 };
165 
166 DEAL_II_NAMESPACE_CLOSE
167 
168 #endif
virtual void vector_value(const Point< dim > &p, Vector< double > &value) const
virtual double value(const Point< dim > &p, const unsigned int component=0) const
void set_formula(typename AutoDerivativeFunction< dim >::DifferenceFormula formula=AutoDerivativeFunction< dim >::Euler)
FunctionDerivative(const Function< dim > &f, const Point< dim > &direction, const double h=1.e-6)
std::vector< Point< dim > > incr
const Function< dim > & f
DeclException0(ExcInvalidFormula)
AutoDerivativeFunction< dim >::DifferenceFormula formula
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< double > &values, const unsigned int component=0) const
std::size_t memory_consumption() const
void set_h(const double h)