Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
polynomials_raviart_thomas.h
1 // ---------------------------------------------------------------------
2 // @f$Id: polynomials_raviart_thomas.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2004 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__polynomials_raviart_thomas_h
18 #define __deal2__polynomials_raviart_thomas_h
19 
20 
21 #include <deal.II/base/config.h>
23 #include <deal.II/base/tensor.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/base/polynomial.h>
26 #include <deal.II/base/polynomial_space.h>
27 #include <deal.II/base/tensor_product_polynomials.h>
28 #include <deal.II/base/table.h>
29 
30 #include <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
51 template <int dim>
53 {
54 public:
66  PolynomialsRaviartThomas (const unsigned int k);
67 
92  void compute (const Point<dim> &unit_point,
93  std::vector<Tensor<1,dim> > &values,
94  std::vector<Tensor<2,dim> > &grads,
95  std::vector<Tensor<3,dim> > &grad_grads) const;
96 
100  unsigned int n () const;
101 
107  unsigned int degree () const;
108 
113  std::string name () const;
114 
124  static unsigned int compute_n_pols(unsigned int degree);
125 
126 private:
131  const unsigned int my_degree;
132 
141 
146  const unsigned int n_pols;
147 
155  static
156  std::vector<std::vector< Polynomials::Polynomial< double > > >
157  create_polynomials (const unsigned int k);
158 };
159 
160 
161 
162 template <int dim>
163 inline unsigned int
165 {
166  return n_pols;
167 }
168 
169 
170 
171 template <int dim>
172 inline unsigned int
174 {
175  return my_degree;
176 }
177 
178 
179 
180 template <int dim>
181 inline std::string
183 {
184  return "RaviartThomas";
185 }
186 
187 
188 DEAL_II_NAMESPACE_CLOSE
189 
190 #endif
PolynomialsRaviartThomas(const unsigned int k)
static unsigned int compute_n_pols(unsigned int degree)
const AnisotropicPolynomials< dim > polynomial_space
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(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) const