deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+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
auto_derivative_function.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2001 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_auto_derivative_function_h
14#define dealii_auto_derivative_function_h
15
16
17#include <deal.II/base/config.h>
18
20
22
77template <int dim>
79{
80public:
114
129 AutoDerivativeFunction(const double h,
130 const unsigned int n_components = 1,
131 const double initial_time = 0.0);
132
136 virtual ~AutoDerivativeFunction() override = default;
137
142 void
144
153 void
154 set_h(const double h);
155
163 virtual Tensor<1, dim>
164 gradient(const Point<dim> &p,
165 const unsigned int component = 0) const override;
166
173 virtual void
175 std::vector<Tensor<1, dim>> &gradients) const override;
176
186 virtual void
187 gradient_list(const std::vector<Point<dim>> &points,
188 std::vector<Tensor<1, dim>> &gradients,
189 const unsigned int component = 0) const override;
190
203 virtual void
205 const std::vector<Point<dim>> &points,
206 std::vector<std::vector<Tensor<1, dim>>> &gradients) const override;
207
211 static DifferenceFormula
212 get_formula_of_order(const unsigned int ord);
213
214
215private:
219 double h;
220
224 std::vector<Tensor<1, dim>> ht;
225
230};
231
232
234
235#endif
virtual ~AutoDerivativeFunction() override=default
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim > > &gradients) const override
virtual void vector_gradient_list(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const override
std::vector< Tensor< 1, dim > > ht
void set_formula(const DifferenceFormula formula=Euler)
virtual void gradient_list(const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim > > &gradients, const unsigned int component=0) const override
static DifferenceFormula get_formula_of_order(const unsigned int ord)
const unsigned int n_components
Definition function.h:162
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39