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\}}\)
tensor_polynomials_base.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2005 - 2019 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 <vector>
27 
29 
61 template <int dim>
63 {
64 public:
69  TensorPolynomialsBase(const unsigned int deg,
70  const unsigned int n_polynomials);
71 
75  TensorPolynomialsBase(TensorPolynomialsBase<dim> &&) = default; // NOLINT
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 
141 private:
145  const unsigned int polynomial_degree;
146 
150  const unsigned int n_pols;
151 };
152 
153 
154 
155 template <int dim>
156 inline unsigned int
158 {
159  return n_pols;
160 }
161 
162 
163 
164 template <int dim>
165 inline unsigned int
167 {
168  return polynomial_degree;
169 }
170 
171 
172 
174 
175 #endif
TensorPolynomialsBase::n_pols
const unsigned int n_pols
Definition: tensor_polynomials_base.h:150
TensorPolynomialsBase::name
virtual std::string name() const =0
TensorPolynomialsBase::n
unsigned int n() const
Definition: tensor_polynomials_base.h:157
TensorPolynomialsBase::~TensorPolynomialsBase
virtual ~TensorPolynomialsBase()=default
TensorPolynomialsBase::degree
unsigned int degree() const
Definition: tensor_polynomials_base.h:166
TensorPolynomialsBase::TensorPolynomialsBase
TensorPolynomialsBase(const unsigned int deg, const unsigned int n_polynomials)
Definition: tensor_polynomials_base.cc:26
tensor.h
TensorPolynomialsBase::clone
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const =0
Tensor< 1, dim >
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
exceptions.h
TensorPolynomialsBase
Definition: tensor_polynomials_base.h:62
TensorPolynomialsBase::polynomial_degree
const unsigned int polynomial_degree
Definition: tensor_polynomials_base.h:145
TensorPolynomialsBase::evaluate
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
Point< dim >
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
point.h