Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
polynomials_bernardi_raugel.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 
17 #ifndef dealii_polynomials_bernardi_raugel_h
18 #define dealii_polynomials_bernardi_raugel_h
19 
20 #include <deal.II/base/geometry_info.h>
21 #include <deal.II/base/point.h>
22 #include <deal.II/base/polynomial.h>
23 #include <deal.II/base/polynomial_space.h>
24 #include <deal.II/base/tensor.h>
25 #include <deal.II/base/tensor_product_polynomials.h>
26 
27 #include <vector>
28 
29 DEAL_II_NAMESPACE_OPEN
30 
31 
83 template <int dim>
85 {
86 public:
94  PolynomialsBernardiRaugel(const unsigned int k);
95 
99  unsigned int
100  n() const;
101 
102 
108  unsigned int
109  degree() const;
110 
114  std::string
115  name() const;
116 
129  void
130  compute(const Point<dim> & unit_point,
131  std::vector<Tensor<1, dim>> &values,
132  std::vector<Tensor<2, dim>> &grads,
133  std::vector<Tensor<3, dim>> &grad_grads,
134  std::vector<Tensor<4, dim>> &third_derivatives,
135  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
136 
142  static unsigned int
143  compute_n_pols(const unsigned int k);
144 
145 private:
149  const unsigned int my_degree;
150 
154  const unsigned int n_pols;
155 
163 
170 
175  static std::vector<std::vector<Polynomials::Polynomial<double>>>
177 
182  static std::vector<std::vector<Polynomials::Polynomial<double>>>
184 };
185 
186 
187 template <int dim>
188 inline unsigned int
190 {
191  return n_pols;
192 }
193 
194 
195 
196 template <int dim>
197 inline unsigned int
199 {
200  return 2;
201 }
202 
203 
204 
205 template <int dim>
206 inline std::string
208 {
209  return "BernardiRaugel";
210 }
211 
212 
213 DEAL_II_NAMESPACE_CLOSE
214 
215 #endif
const AnisotropicPolynomials< dim > polynomial_space_Q
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials_Q()
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials_bubble()
PolynomialsBernardiRaugel(const unsigned int k)
static unsigned int compute_n_pols(const unsigned int k)
void compute(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
const AnisotropicPolynomials< dim > polynomial_space_bubble