Reference documentation for deal.II version 9.0.0
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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/tensor.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_product_polynomials.h>
27 #include <deal.II/base/table.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 compute (const Point<dim> &unit_point,
75  std::vector<Tensor<1,dim> > &values,
76  std::vector<Tensor<2,dim> > &grads,
77  std::vector<Tensor<3,dim> > &grad_grads,
78  std::vector<Tensor<4,dim> > &third_derivatives,
79  std::vector<Tensor<5,dim> > &fourth_derivatives) const;
80 
84  unsigned int n () const;
85 
90  unsigned int degree () const;
91 
95  std::string name () const;
96 
102  static unsigned int compute_n_pols(unsigned int degree);
103 
104 private:
108  const unsigned int my_degree;
109 
115 
119  const unsigned int n_pols;
120 
125  static
126  std::vector<std::vector< Polynomials::Polynomial< double > > >
127  create_polynomials (const unsigned int k);
128 };
129 
130 
131 
132 template <int dim>
133 inline unsigned int
135 {
136  return n_pols;
137 }
138 
139 
140 
141 template <int dim>
142 inline unsigned int
144 {
145  return my_degree;
146 }
147 
148 
149 
150 template <int dim>
151 inline std::string
153 {
154  return "RaviartThomas";
155 }
156 
157 
158 DEAL_II_NAMESPACE_CLOSE
159 
160 #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)