Reference documentation for deal.II version GIT 7b2de2f2f9 2023-09-24 11:00:02+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\}}\)
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 
61 template <int dim>
63 {
64 public:
69  TensorPolynomialsBase(const unsigned int deg,
70  const unsigned int n_polynomials);
71 
76 
81 
86  virtual ~TensorPolynomialsBase() = default;
87 
95  virtual void
96  evaluate(const Point<dim> &unit_point,
97  std::vector<Tensor<1, dim>> &values,
98  std::vector<Tensor<2, dim>> &grads,
99  std::vector<Tensor<3, dim>> &grad_grads,
100  std::vector<Tensor<4, dim>> &third_derivatives,
101  std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
102 
106  unsigned int
107  n() const;
108 
114  unsigned int
115  degree() const;
116 
127  virtual std::unique_ptr<TensorPolynomialsBase<dim>>
128  clone() const = 0;
129 
133  virtual std::string
134  name() const = 0;
135 
136 private:
140  const unsigned int polynomial_degree;
141 
145  const unsigned int n_pols;
146 };
147 
148 
149 
150 template <int dim>
151 inline unsigned int
153 {
154  return n_pols;
155 }
156 
157 
158 
159 template <int dim>
160 inline unsigned int
162 {
163  return polynomial_degree;
164 }
165 
166 
167 
169 
170 #endif
Definition: point.h:112
virtual std::string name() const =0
const unsigned int polynomial_degree
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const =0
virtual ~TensorPolynomialsBase()=default
TensorPolynomialsBase(const unsigned int deg, const unsigned int n_polynomials)
TensorPolynomialsBase(const TensorPolynomialsBase< dim > &)=default
unsigned int degree() const
TensorPolynomialsBase(TensorPolynomialsBase< dim > &&)=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
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478