deal.II version GIT relicensing-2871-g8250ab479a 2025-03-20 13:10:00+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
24#include <vector>
25
26
28
29
45template <int dim>
47{
48public:
55 const Point<dim> &direction,
56 const double h = 1.e-6);
57
71 const std::vector<Point<dim>> &direction,
72 const double h = 1.e-6);
73
82 void
88 void
89 set_h(const double h);
90
91 virtual double
92 value(const Point<dim> &p, const unsigned int component = 0) const override;
93
94 virtual void
95 vector_value(const Point<dim> &p, Vector<double> &value) const override;
96
97 virtual void
98 value_list(const std::vector<Point<dim>> &points,
99 std::vector<double> &values,
100 const unsigned int component = 0) const override;
101
107 virtual std::size_t
108 memory_consumption() const override;
109
110private:
115
119 double h;
120
125
129 std::vector<Tensor<1, dim>> incr;
130};
131
133
134#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:113
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:40
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:41