]> https://gitweb.dealii.org/ - dealii.git/commitdiff
public compute_n_pols function
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 7 Feb 2005 15:56:38 +0000 (15:56 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 7 Feb 2005 15:56:38 +0000 (15:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@9900 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/polynomial_space.h
deal.II/base/include/base/polynomials_bdm.h
deal.II/base/source/polynomials_bdm.cc

index 522d8ffda2a5c326f1ddd429c963121e3c0665d2..ceb2fc5e859ca5f5ab4079974ecfa97ca6376b09 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -166,8 +166,15 @@ class PolynomialSpace
                                      * never checked and therefore
                                      * left to the application.
                                      */
-    unsigned int degree () const;
+    unsigned int degree () const;  
     
+                                    /**
+                                     * Static function used in the
+                                     * constructor to compute the
+                                     * number of polynomials.
+                                     */
+    static unsigned int compute_n_pols (const unsigned int n);
+
   protected:
     
                                     /**
@@ -208,13 +215,6 @@ class PolynomialSpace
                                      * polynomials.
                                      */
     std::vector<unsigned int> index_map_inverse;
-    
-                                    /**
-                                     * Static function used in the
-                                     * constructor to compute the
-                                     * number of polynomials.
-                                     */
-    static unsigned int compute_n_pols (const unsigned int n);
 };
 
 /// @if NoDoc
index fec9a051983942fc87438b65d0a4d7af8ab64e72..058c7a74bfd3669ca703b1619163af11c391f98c 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004 by the deal.II authors
+//    Copyright (C) 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -194,6 +194,17 @@ class PolynomialsBDM
                                      */
     unsigned int degree () const;
     
+                                    /**
+                                     * Return the number of
+                                     * polynomials in the space
+                                     * <TT>BDM(degree)</tt> without
+                                     * requiring to build an object
+                                     * of PolynomialsBDM. This is
+                                     * required by the FiniteElement
+                                     * classes.
+                                     */
+    static unsigned int compute_n_pols(unsigned int degree);
+    
   private:
                                     /**
                                      * An object representing the
index 2dc82866fb877c70e4b74dda276163c7cbf948ff..fc249addfc2a0c49c4f096183cc896222cd07760 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004 by the deal.II authors
+//    Copyright (C) 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -24,7 +24,7 @@ PolynomialsBDM<dim>::PolynomialsBDM (const unsigned int k)
                :
                polynomial_space (Polynomials::Legendre::generate_complete_basis(k)),
                monomials(1),
-               n_pols(dim * polynomial_space.n()+2),
+               n_pols(compute_n_pols(k)),
                p_values(polynomial_space.n()),
                p_grads(polynomial_space.n()),
                p_grad_grads(polynomial_space.n())
@@ -191,5 +191,13 @@ PolynomialsBDM<dim>::compute_node_matrix (Table<2,double>& A) const
 }
 
 
+template <int dim>
+unsigned int
+PolynomialsBDM<dim>::compute_n_pols(unsigned int k)
+{
+  return dim*PolynomialSpace<dim>::compute_n_pols(k)+2;
+}
+
+
 template class PolynomialsBDM<2>;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.