Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
polynomials_raviart_thomas.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_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/tensor.h>
27 #include <deal.II/base/tensor_product_polynomials.h>
28 
29 #include <vector>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
48 template <int dim>
50 {
51 public:
60  PolynomialsRaviartThomas(const unsigned int k);
61 
74  void
75  compute(const Point<dim> & unit_point,
76  std::vector<Tensor<1, dim>> &values,
77  std::vector<Tensor<2, dim>> &grads,
78  std::vector<Tensor<3, dim>> &grad_grads,
79  std::vector<Tensor<4, dim>> &third_derivatives,
80  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
81 
85  unsigned int
86  n() const;
87 
92  unsigned int
93  degree() const;
94 
98  std::string
99  name() const;
100 
106  static unsigned int
107  compute_n_pols(unsigned int degree);
108 
109 private:
113  const unsigned int my_degree;
114 
120 
124  const unsigned int n_pols;
125 
130  static std::vector<std::vector<Polynomials::Polynomial<double>>>
131  create_polynomials(const unsigned int k);
132 };
133 
134 
135 
136 template <int dim>
137 inline unsigned int
139 {
140  return n_pols;
141 }
142 
143 
144 
145 template <int dim>
146 inline unsigned int
148 {
149  return my_degree;
150 }
151 
152 
153 
154 template <int dim>
155 inline std::string
157 {
158  return "RaviartThomas";
159 }
160 
161 
162 DEAL_II_NAMESPACE_CLOSE
163 
164 #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)