Reference documentation for deal.II version GIT relicensing-437-g81ec864850 2024-04-19 07:30:02+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
function_derivative.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2000 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_function_derivative_h
16#define dealii_function_derivative_h
17
18#include <deal.II/base/config.h>
19
23
25
26
42template <int dim>
44{
45public:
52 const Point<dim> &direction,
53 const double h = 1.e-6);
54
68 const std::vector<Point<dim>> &direction,
69 const double h = 1.e-6);
70
79 void
85 void
86 set_h(const double h);
87
88 virtual double
89 value(const Point<dim> &p, const unsigned int component = 0) const override;
90
91 virtual void
92 vector_value(const Point<dim> &p, Vector<double> &value) const override;
93
94 virtual void
95 value_list(const std::vector<Point<dim>> &points,
96 std::vector<double> &values,
97 const unsigned int component = 0) const override;
98
104 virtual std::size_t
105 memory_consumption() const override;
106
107private:
112
116 double h;
117
122
126 std::vector<Tensor<1, dim>> incr;
127};
128
130
131#endif
virtual std::size_t memory_consumption() const override
virtual void vector_value(const Point< dim > &p, Vector< double > &value) const override
void set_h(const double h)
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< double > &values, const unsigned int component=0) const override
AutoDerivativeFunction< dim >::DifferenceFormula formula
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
const Function< dim > & f
std::vector< Tensor< 1, dim > > incr
void set_formula(typename AutoDerivativeFunction< dim >::DifferenceFormula formula=AutoDerivativeFunction< dim >::Euler)
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503