Reference documentation for deal.II version 9.5.0
\(\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// Copyright (C) 2005 - 2022 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_tensor_polynomials_base_h
17#define dealii_tensor_polynomials_base_h
18
19
20#include <deal.II/base/config.h>
21
23#include <deal.II/base/point.h>
24#include <deal.II/base/tensor.h>
25
26#include <memory>
27#include <string>
28#include <vector>
29
31
61template <int dim>
63{
64public:
69 TensorPolynomialsBase(const unsigned int deg,
70 const unsigned int n_polynomials);
71
76
81
86 virtual ~TensorPolynomialsBase() = default;
87
100 virtual void
101 evaluate(const Point<dim> & unit_point,
102 std::vector<Tensor<1, dim>> &values,
103 std::vector<Tensor<2, dim>> &grads,
104 std::vector<Tensor<3, dim>> &grad_grads,
105 std::vector<Tensor<4, dim>> &third_derivatives,
106 std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
107
111 unsigned int
112 n() const;
113
119 unsigned int
120 degree() const;
121
132 virtual std::unique_ptr<TensorPolynomialsBase<dim>>
133 clone() const = 0;
134
138 virtual std::string
139 name() const = 0;
140
141private:
145 const unsigned int polynomial_degree;
146
150 const unsigned int n_pols;
151};
152
153
154
155template <int dim>
156inline unsigned int
158{
159 return n_pols;
160}
161
162
163
164template <int dim>
165inline unsigned int
167{
168 return polynomial_degree;
169}
170
171
172
174
175#endif
Definition point.h:112
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:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473