deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40: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
tensor_polynomials_base.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: 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// 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_tensor_polynomials_base_h
16#define dealii_tensor_polynomials_base_h
17
18
19#include <deal.II/base/config.h>
20
22#include <deal.II/base/point.h>
23#include <deal.II/base/tensor.h>
24
25#include <memory>
26#include <string>
27#include <vector>
28
30
60template <int dim>
62{
63public:
68 TensorPolynomialsBase(const unsigned int deg,
69 const unsigned int n_polynomials);
70
75
80
85 virtual ~TensorPolynomialsBase() = default;
86
94 virtual void
95 evaluate(const Point<dim> &unit_point,
96 std::vector<Tensor<1, dim>> &values,
97 std::vector<Tensor<2, dim>> &grads,
98 std::vector<Tensor<3, dim>> &grad_grads,
99 std::vector<Tensor<4, dim>> &third_derivatives,
100 std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
101
105 unsigned int
106 n() const;
107
113 unsigned int
114 degree() const;
115
126 virtual std::unique_ptr<TensorPolynomialsBase<dim>>
127 clone() const = 0;
128
132 virtual std::string
133 name() const = 0;
134
135private:
139 const unsigned int polynomial_degree;
140
144 const unsigned int n_pols;
145};
146
147
148
149template <int dim>
150inline unsigned int
152{
153 return n_pols;
154}
155
156
157
158template <int dim>
159inline unsigned int
161{
162 return polynomial_degree;
163}
164
165
166
168
169#endif
Definition point.h:111
virtual std::string name() const =0
const unsigned int polynomial_degree
virtual ~TensorPolynomialsBase()=default
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
TensorPolynomialsBase(TensorPolynomialsBase< dim > &&)=default
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499