deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00: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
tensor_polynomials_base.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) 2019 - 2023 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_tensor_polynomials_base_h
14#define dealii_tensor_polynomials_base_h
15
16
17#include <deal.II/base/config.h>
18
20#include <deal.II/base/point.h>
21#include <deal.II/base/tensor.h>
22
23#include <memory>
24#include <string>
25#include <vector>
26
28
58template <int dim>
60{
61public:
66 TensorPolynomialsBase(const unsigned int deg,
67 const unsigned int n_polynomials);
68
73
78
84
92 virtual void
93 evaluate(const Point<dim> &unit_point,
94 std::vector<Tensor<1, dim>> &values,
95 std::vector<Tensor<2, dim>> &grads,
96 std::vector<Tensor<3, dim>> &grad_grads,
97 std::vector<Tensor<4, dim>> &third_derivatives,
98 std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
99
103 unsigned int
104 n() const;
105
111 unsigned int
112 degree() const;
113
124 virtual std::unique_ptr<TensorPolynomialsBase<dim>>
125 clone() const = 0;
126
130 virtual std::string
131 name() const = 0;
132
133private:
137 const unsigned int polynomial_degree;
138
142 const unsigned int n_pols;
143};
144
145
146
147//
148// We "default" the destructor out of line here to work around a sublety
149// when compiling with Clang in CUDA mode. See the comment on
150// ScalarPolynomialsBase<dim>::~ScalarPolynomialsBase() in
151// scalar_polynomials.h for details.
152//
153template <int dim>
155
156
157
158template <int dim>
159inline unsigned int
161{
162 return n_pols;
163}
164
165
166
167template <int dim>
168inline unsigned int
170{
171 return polynomial_degree;
172}
173
174
175
177
178#endif
Definition point.h:111
virtual std::string name() const =0
const unsigned int polynomial_degree
virtual void evaluate(const Point< dim > &unit_point, std::vector< Tensor< 1, dim > > &values, std::vector< Tensor< 2, dim > > &grads, std::vector< Tensor< 3, dim > > &grad_grads, std::vector< Tensor< 4, dim > > &third_derivatives, std::vector< Tensor< 5, dim > > &fourth_derivatives) const =0
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const =0
TensorPolynomialsBase(const TensorPolynomialsBase< dim > &)=default
virtual ~TensorPolynomialsBase()
TensorPolynomialsBase(TensorPolynomialsBase< dim > &&)=default
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39