Reference documentation for deal.II version 9.2.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\}}\)
scalar_polynomials_base.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2005 - 2020 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_scalar_polynomials_base_h
17 #define dealii_scalar_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 <vector>
27 
29 
62 template <int dim>
64 {
65 public:
70  ScalarPolynomialsBase(const unsigned int deg,
71  const unsigned int n_polynomials);
72 
76  ScalarPolynomialsBase(ScalarPolynomialsBase<dim> &&) = default; // NOLINT
77 
82 
87  virtual ~ScalarPolynomialsBase() = default;
88 
101  virtual void
102  evaluate(const Point<dim> & unit_point,
103  std::vector<double> & values,
104  std::vector<Tensor<1, dim>> &grads,
105  std::vector<Tensor<2, dim>> &grad_grads,
106  std::vector<Tensor<3, dim>> &third_derivatives,
107  std::vector<Tensor<4, dim>> &fourth_derivatives) const = 0;
108 
112  unsigned int
113  n() const;
114 
120  unsigned int
121  degree() const;
122 
133  virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
134  clone() const = 0;
135 
139  virtual std::string
140  name() const = 0;
141 
145  virtual std::size_t
146  memory_consumption() const;
147 
148 private:
152  const unsigned int polynomial_degree;
153 
157  const unsigned int n_pols;
158 };
159 
160 
161 
162 template <int dim>
163 inline unsigned int
165 {
166  return n_pols;
167 }
168 
169 
170 
171 template <int dim>
172 inline unsigned int
174 {
175  return polynomial_degree;
176 }
177 
178 
179 
181 
182 #endif
virtual ~ScalarPolynomialsBase()=default
virtual std::string name() const =0
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const =0
unsigned int degree() const
ScalarPolynomialsBase(const unsigned int deg, const unsigned int n_polynomials)
virtual void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim >> &grads, std::vector< Tensor< 2, dim >> &grad_grads, std::vector< Tensor< 3, dim >> &third_derivatives, std::vector< Tensor< 4, dim >> &fourth_derivatives) const =0
const unsigned int polynomial_degree
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
virtual std::size_t memory_consumption() const