Reference documentation for deal.II version 9.1.0-pre
polynomials_raviart_thomas.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2017 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_raviart_thomas_h
17 #define dealii_polynomials_raviart_thomas_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/table.h>
27 #include <deal.II/base/tensor.h>
28 #include <deal.II/base/tensor_product_polynomials.h>
29 
30 #include <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
49 template <int dim>
51 {
52 public:
61  PolynomialsRaviartThomas(const unsigned int k);
62 
75  void
76  compute(const Point<dim> & unit_point,
77  std::vector<Tensor<1, dim>> &values,
78  std::vector<Tensor<2, dim>> &grads,
79  std::vector<Tensor<3, dim>> &grad_grads,
80  std::vector<Tensor<4, dim>> &third_derivatives,
81  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
82 
86  unsigned int
87  n() const;
88 
93  unsigned int
94  degree() const;
95 
99  std::string
100  name() const;
101 
107  static unsigned int
108  compute_n_pols(unsigned int degree);
109 
110 private:
114  const unsigned int my_degree;
115 
121 
125  const unsigned int n_pols;
126 
131  static std::vector<std::vector<Polynomials::Polynomial<double>>>
132  create_polynomials(const unsigned int k);
133 };
134 
135 
136 
137 template <int dim>
138 inline unsigned int
140 {
141  return n_pols;
142 }
143 
144 
145 
146 template <int dim>
147 inline unsigned int
149 {
150  return my_degree;
151 }
152 
153 
154 
155 template <int dim>
156 inline std::string
158 {
159  return "RaviartThomas";
160 }
161 
162 
163 DEAL_II_NAMESPACE_CLOSE
164 
165 #endif
PolynomialsRaviartThomas(const unsigned int k)
const AnisotropicPolynomials< dim > polynomial_space
static unsigned int compute_n_pols(unsigned int degree)
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
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(const unsigned int k)