Reference documentation for deal.II version Git 8668eb52a3 2020-04-08 14:09:01 +0200
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
polynomials_bdm.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2018 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_polynomials_BDM_h
17 #define dealii_polynomials_BDM_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/exceptions.h>
23 #include <deal.II/base/point.h>
24 #include <deal.II/base/polynomial.h>
25 #include <deal.II/base/polynomial_space.h>
26 #include <deal.II/base/tensor.h>
27 #include <deal.II/base/tensor_polynomials_base.h>
28 #include <deal.II/base/thread_management.h>
29 
30 #include <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
100 template <int dim>
102 {
103 public:
112  PolynomialsBDM(const unsigned int k);
113 
126  void
127  evaluate(const Point<dim> & unit_point,
128  std::vector<Tensor<1, dim>> &values,
129  std::vector<Tensor<2, dim>> &grads,
130  std::vector<Tensor<3, dim>> &grad_grads,
131  std::vector<Tensor<4, dim>> &third_derivatives,
132  std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
133 
137  std::string
138  name() const override;
139 
145  static unsigned int
146  n_polynomials(const unsigned int degree);
147 
151  virtual std::unique_ptr<TensorPolynomialsBase<dim>>
152  clone() const override;
153 
154 private:
160 
165  std::vector<Polynomials::Polynomial<double>> monomials;
166 
171 
175  mutable std::vector<double> p_values;
176 
180  mutable std::vector<Tensor<1, dim>> p_grads;
181 
185  mutable std::vector<Tensor<2, dim>> p_grad_grads;
186 
190  mutable std::vector<Tensor<3, dim>> p_third_derivatives;
191 
195  mutable std::vector<Tensor<4, dim>> p_fourth_derivatives;
196 };
197 
198 
199 template <int dim>
200 inline std::string
202 {
203  return "BDM";
204 }
205 
206 
207 DEAL_II_NAMESPACE_CLOSE
208 
209 #endif
unsigned int degree() const
PolynomialsBDM(const unsigned int k)
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const override
static unsigned int n_polynomials(const unsigned int degree)
std::vector< Polynomials::Polynomial< double > > monomials
std::string name() const override
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 override
std::vector< Tensor< 3, dim > > p_third_derivatives
std::vector< double > p_values
std::vector< Tensor< 1, dim > > p_grads
std::vector< Tensor< 4, dim > > p_fourth_derivatives
std::vector< Tensor< 2, dim > > p_grad_grads
Threads::Mutex mutex
const PolynomialSpace< dim > polynomial_space