Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
function_derivative.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2018 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.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_function_derivative_h
17 #define dealii_function_derivative_h
18 
19 #include <deal.II/base/config.h>
20 
23 #include <deal.II/base/function.h>
24 
26 
27 
44 template <int dim>
46 {
47 public:
54  const Point<dim> & direction,
55  const double h = 1.e-6);
56 
70  const std::vector<Point<dim>> &direction,
71  const double h = 1.e-6);
72 
81  void
87  void
88  set_h(const double h);
89 
90  virtual double
91  value(const Point<dim> &p, const unsigned int component = 0) const override;
92 
93  virtual void
94  vector_value(const Point<dim> &p, Vector<double> &value) const override;
95 
96  virtual void
97  value_list(const std::vector<Point<dim>> &points,
98  std::vector<double> & values,
99  const unsigned int component = 0) const override;
100 
106  std::size_t
107  memory_consumption() const;
108 
109 private:
113  const Function<dim> &f;
114 
118  double h;
119 
124 
128  std::vector<Tensor<1, dim>> incr;
129 };
130 
132 
133 #endif
auto_derivative_function.h
FunctionDerivative::value_list
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
Definition: function_derivative.cc:165
FunctionDerivative::h
double h
Definition: function_derivative.h:118
FunctionDerivative
Definition: function_derivative.h:45
AutoDerivativeFunction
Definition: auto_derivative_function.h:83
FunctionDerivative::memory_consumption
std::size_t memory_consumption() const
Definition: function_derivative.cc:231
FunctionDerivative::set_formula
void set_formula(typename AutoDerivativeFunction< dim >::DifferenceFormula formula=AutoDerivativeFunction< dim >::Euler)
Definition: function_derivative.cc:57
Physics::Elasticity::Kinematics::e
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
FunctionDerivative::FunctionDerivative
FunctionDerivative(const Function< dim > &f, const Point< dim > &direction, const double h=1.e-6)
Definition: function_derivative.cc:26
FunctionDerivative::set_h
void set_h(const double h)
Definition: function_derivative.cc:81
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
exceptions.h
FunctionDerivative::f
const Function< dim > & f
Definition: function_derivative.h:113
function.h
FunctionDerivative::value
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
Definition: function_derivative.cc:92
Point< dim >
FunctionDerivative::vector_value
virtual void vector_value(const Point< dim > &p, Vector< double > &value) const override
Definition: function_derivative.cc:123
config.h
Function< dim >
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
FunctionDerivative::incr
std::vector< Tensor< 1, dim > > incr
Definition: function_derivative.h:128
Vector< double >
FunctionDerivative::formula
AutoDerivativeFunction< dim >::DifferenceFormula formula
Definition: function_derivative.h:123
AutoDerivativeFunction::DifferenceFormula
DifferenceFormula
Definition: auto_derivative_function.h:89