include/deal.II/base/polynomials_p.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: polynomials_p.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 2004, 2005, 2006, 2009, 2012 by the deal.II authors
00005 //
00006 //    This file is subject to QPL and may not be  distributed
00007 //    without copyright and license information. Please refer
00008 //    to the file deal.II/doc/license.html for the  text  and
00009 //    further information on this license.
00010 //
00011 //---------------------------------------------------------------------------
00012 #ifndef __deal2__polynomials_P_h
00013 #define __deal2__polynomials_P_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/base/exceptions.h>
00018 #include <deal.II/base/tensor.h>
00019 #include <deal.II/base/point.h>
00020 #include <deal.II/base/polynomial.h>
00021 #include <deal.II/base/polynomial_space.h>
00022 #include <deal.II/base/table.h>
00023 
00024 #include <vector>
00025 
00026 DEAL_II_NAMESPACE_OPEN
00044 template <int dim>
00045 class PolynomialsP: public PolynomialSpace<dim>
00046 {
00047   public:
00054     static const unsigned int dimension = dim;
00055 
00062     PolynomialsP (const unsigned int p);
00063 
00074     unsigned int degree() const;
00075 
00083     void directional_degrees(unsigned int n,
00084                              unsigned int (&degrees)[dim]) const;
00085 
00086   private:
00087 
00091     void create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
00092 
00100     const unsigned int p;
00101 };
00102 
00105 template <int dim>
00106 inline unsigned int
00107 PolynomialsP<dim>::degree() const
00108 {
00109   return p;
00110 }
00111 
00112 
00113 template <int dim>
00114 inline void
00115 PolynomialsP<dim>::directional_degrees(unsigned int n,
00116                                        unsigned int (&degrees)[dim]) const
00117 {
00118   this->compute_index(n,degrees);
00119 }
00120 
00121 DEAL_II_NAMESPACE_CLOSE
00122 
00123 #endif
00124 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Wed May 23 2012 06:07:31 by doxygen 1.7.3