Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
polynomials_p.h
1 // ---------------------------------------------------------------------
2 // @f$Id: polynomials_p.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_P_h
18 #define __deal2__polynomials_P_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/table.h>
28 
29 #include <vector>
30 
49 template <int dim>
50 class PolynomialsP: public PolynomialSpace<dim>
51 {
52 public:
59  static const unsigned int dimension = dim;
60 
67  PolynomialsP (const unsigned int p);
68 
79  unsigned int degree() const;
80 
88  void directional_degrees(unsigned int n,
89  unsigned int (&degrees)[dim]) const;
90 
91 private:
92 
96  void create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
97 
105  const unsigned int p;
106 };
107 
110 template <int dim>
111 inline unsigned int
113 {
114  return p;
115 }
116 
117 
118 template <int dim>
119 inline void
121  unsigned int (&degrees)[dim]) const
122 {
123  this->compute_index(n,degrees);
124 }
125 
126 DEAL_II_NAMESPACE_CLOSE
127 
128 #endif
void create_polynomial_ordering(std::vector< unsigned int > &index_map) const
void directional_degrees(unsigned int n, unsigned int(&degrees)[dim]) const
static const unsigned int dimension
Definition: polynomials_p.h:59
unsigned int degree() const
const unsigned int p
PolynomialsP(const unsigned int p)