]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
use formulae from Brezzi-Fortin for number of polynomials
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 May 2005 10:34:01 +0000 (10:34 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 May 2005 10:34:01 +0000 (10:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@10720 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/polynomials_bdm.cc

index 4213d9ffea0f9af45d46cabce7d497c26a07cce6..83574b543db540e65099b99a56a264df4fad33d7 100644 (file)
@@ -196,12 +196,9 @@ template <int dim>
 unsigned int
 PolynomialsBDM<dim>::compute_n_pols(unsigned int k)
 {
-  if (dim == 1)
-    return PolynomialSpace<dim>::compute_n_pols(k)+1;
-  if (dim == 2)
-    return 2*PolynomialSpace<dim>::compute_n_pols(k)+2;
-  if (dim == 3)
-    return 3*PolynomialSpace<dim>::compute_n_pols(k)+3*(k+1);
+  if (dim == 1) return k+1;
+  if (dim == 2) return (k+1)*(k+2)+2;
+  if (dim == 3) return ((k+1)*(k+2)*(k+3))/2+3*(k+1);
   Assert(false, ExcNotImplemented());
   return 0;
 }

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.