]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests for face interpolation in FE_FaceQ
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 7 Aug 2013 15:49:33 +0000 (15:49 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 7 Aug 2013 15:49:33 +0000 (15:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@30248 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_face.cc
deal.II/source/fe/fe_q_base.cc

index 30c23b4c260c485878f91bf76374aebee823ec70..63f7ea67385e241b3021ac4529b2ed13614b37a6 100644 (file)
@@ -162,7 +162,7 @@ get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
 
   // Rule of thumb for FP accuracy, that can be expected for a given
   // polynomial degree.  This value is used to cut off values close to zero.
-  const double eps = 2e-13*this->degree*(dim-1);
+  const double eps = 2e-13*(this->degree+1)*(dim-1);
 
   // compute the interpolation matrix by simply taking the value at the
   // support points.
@@ -195,8 +195,7 @@ get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
       for (unsigned int i=0; i<this->dofs_per_face; ++i)
         sum += interpolation_matrix(j,i);
 
-      Assert (std::fabs(sum-1) < 2e-13*this->degree*(dim-1),
-              ExcInternalError());
+      Assert (std::fabs(sum-1) < eps, ExcInternalError());
     }
 }
 
@@ -238,7 +237,7 @@ get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe
       // Rule of thumb for FP accuracy, that can be expected for a given
       // polynomial degree.  This value is used to cut off values close to
       // zero.
-      const double eps = 2e-13*this->degree*(dim-1);
+      const double eps = 2e-13*(this->degree+1)*(dim-1);
 
       // compute the interpolation matrix by simply taking the value at the
       // support points.
@@ -273,8 +272,7 @@ get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe
           for (unsigned int i=0; i<this->dofs_per_face; ++i)
             sum += interpolation_matrix(j,i);
 
-          Assert (std::fabs(sum-1) < 2e-13*this->degree*(dim-1),
-                  ExcInternalError());
+          Assert (std::fabs(sum-1) < eps, ExcInternalError());
         }
     }
   else if (dynamic_cast<const FE_Nothing<dim> *>(&x_source_fe) != 0)
index 2540d1cfdc5c25d909f69b63b708d571433d6d78..71b776635c5ee816698e5a1293f4677b1a46f363 100644 (file)
@@ -606,8 +606,7 @@ get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
       for (unsigned int i=0; i<this->dofs_per_face; ++i)
         sum += interpolation_matrix(j,i);
 
-      Assert (std::fabs(sum-1) < 2e-13*this->degree*(dim-1),
-              ExcInternalError());
+      Assert (std::fabs(sum-1) < eps, ExcInternalError());
     }
 }
 
@@ -688,8 +687,7 @@ get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe
           for (unsigned int i=0; i<this->dofs_per_face; ++i)
             sum += interpolation_matrix(j,i);
 
-          Assert (std::fabs(sum-1) < 2e-13*this->degree*dim,
-                  ExcInternalError());
+          Assert (std::fabs(sum-1) < eps, ExcInternalError());
         }
     }
   else if (dynamic_cast<const FE_Nothing<dim> *>(&x_source_fe) != 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.