Reference documentation for deal.II version 9.1.0-pre
polynomials_rt_bubbles.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 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_rt_bubbles_h
17 #define dealii_polynomials_rt_bubbles_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/polynomials_raviart_thomas.h>
26 #include <deal.II/base/table.h>
27 #include <deal.II/base/tensor.h>
28 
29 #include <vector>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
87 template <int dim>
89 {
90 public:
95  PolynomialsRT_Bubbles(const unsigned int k);
96 
109  void
110  compute(const Point<dim> & unit_point,
111  std::vector<Tensor<1, dim>> &values,
112  std::vector<Tensor<2, dim>> &grads,
113  std::vector<Tensor<3, dim>> &grad_grads,
114  std::vector<Tensor<4, dim>> &third_derivatives,
115  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
116 
120  unsigned int
121  n() const;
122 
127  unsigned int
128  degree() const;
129 
133  std::string
134  name() const;
135 
141  static unsigned int
142  compute_n_pols(const unsigned int degree);
143 
144 private:
148  const unsigned int my_degree;
149 
154 
159  std::vector<Polynomials::Polynomial<double>> monomials;
160 
164  unsigned int n_pols;
165 };
166 
167 
168 
169 template <int dim>
170 inline unsigned int
172 {
173  return n_pols;
174 }
175 
176 
177 
178 template <int dim>
179 inline unsigned int
181 {
182  return my_degree;
183 }
184 
185 
186 
187 template <int dim>
188 inline std::string
190 {
191  return "RT_bubbles";
192 }
193 
194 
195 DEAL_II_NAMESPACE_CLOSE
196 
197 #endif
const unsigned int my_degree
static unsigned int compute_n_pols(const unsigned int degree)
std::string name() const
unsigned int degree() const
PolynomialsRT_Bubbles(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
unsigned int n() const
const PolynomialsRaviartThomas< dim > raviart_thomas_space
std::vector< Polynomials::Polynomial< double > > monomials