]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
some cleaning
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 19 Jan 2004 11:13:59 +0000 (11:13 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 19 Jan 2004 11:13:59 +0000 (11:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@8324 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 26fa58d8b46db69aa7b8977724219df9f0e91e40..701102564e9739d9128b327a41b133444fa2ae64 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -186,15 +186,14 @@ class PolynomialsBDM
                                      * Returns the number of BDM polynomials.
                                      */
     unsigned int n () const;
-
+    
                                     /**
-                                     * Exception.
+                                     * Returns the degree of the BDM
+                                     * space, which is one less than
+                                     * the highest polynomial degree.
                                      */
-    DeclException3 (ExcDimensionMismatch2,
-                   int, int, int,
-                   << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-
-           
+    unsigned int degree () const;
+    
   private:
                                     /**
                                      * An object representing the
@@ -219,7 +218,7 @@ class PolynomialsBDM
                                      * polynomials.
                                      */
     unsigned int n_pols;
-
+    
                                     /**
                                      * Auxiliary memory.
                                      */
@@ -243,4 +242,11 @@ PolynomialsBDM<dim>::n() const
   return n_pols;
 }
 
+template <int dim>
+inline unsigned int
+PolynomialsBDM<dim>::degree() const
+{
+  return polynomial_space.degree() - 1;
+}
+
 #endif
index 02862b749005f0e24d2679a6c795ba24e5623df4..1a6d62fae3359436bfe4027cacf89af3c2bcac3a 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//    Copyright (C) 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -45,11 +45,11 @@ PolynomialsBDM<dim>::compute (const Point<dim>            &unit_point,
                              std::vector<Tensor<3,dim> > &grad_grads) const
 {
   Assert(values.size()==n_pols || values.size()==0,
-        ExcDimensionMismatch2(values.size(), n_pols, 0));
+        ExcDimensionMismatch(values.size(), n_pols));
   Assert(grads.size()==n_pols|| grads.size()==0,
-        ExcDimensionMismatch2(grads.size(), n_pols, 0));
+        ExcDimensionMismatch(grads.size(), n_pols));
   Assert(grad_grads.size()==n_pols|| grad_grads.size()==0,
-        ExcDimensionMismatch2(grad_grads.size(), n_pols, 0));
+        ExcDimensionMismatch(grad_grads.size(), n_pols));
 
   const unsigned int n_sub = polynomial_space.n();
   p_values.resize((values.size() == 0) ? 0 : n_sub);
@@ -69,7 +69,6 @@ PolynomialsBDM<dim>::compute (const Point<dim>            &unit_point,
       for (unsigned int j=0;j<dim;++j)
        {
          values[i+j*n_sub][j] = p_values[i];
-//       std::cerr << i+j*n_sub << ' ' << j << ' ' << p_values[i] << std::endl;
        }
       
     }
@@ -119,7 +118,7 @@ PolynomialsBDM<dim>::compute_node_matrix (Table<2,double>& A) const
   for (unsigned int i=0;i<legendre.size();++i)
     legendre[i] = Legendre(i);
 
-  QGauss<1> qface(polynomial_space.degree());
+  QGauss<1> qface(polynomial_space.degree()+1);
 
   Table<2,double> integrals (n(), n());
 
@@ -147,8 +146,6 @@ PolynomialsBDM<dim>::compute_node_matrix (Table<2,double>& A) const
              p(1) = x;
              break;          
          }
-//     std::cerr << p << std::endl;
-       
        compute (p, values, grads, grad_grads);
        for (unsigned int i=0;i<n();++i)
          {

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.