]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Slight re-arrangements
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 15:15:07 +0000 (15:15 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 15:15:07 +0000 (15:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@13666 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_q.cc

index f90a33f340ce9c9735563418874cd0355c4c7cdd..7fc62790ccf2b7c498ac36bc56d89a14affbecb6 100644 (file)
@@ -247,17 +247,17 @@ get_interpolation_matrix (const FiniteElement<dim> &x_source_fe,
                typename FiniteElement<dim>::
                ExcInterpolationNotImplemented());
   
-                                  // ok, source is a Q element, so
-                                  // we will be able to do the work
-  const FE_Q<dim> &source_fe
-    = dynamic_cast<const FE_Q<dim>&>(x_source_fe);
-
   Assert (interpolation_matrix.m() == this->dofs_per_cell,
          ExcDimensionMismatch (interpolation_matrix.m(),
                                this->dofs_per_cell));
-  Assert (interpolation_matrix.n() == source_fe.dofs_per_cell,
+  Assert (interpolation_matrix.n() == x_source_fe.dofs_per_cell,
          ExcDimensionMismatch (interpolation_matrix.m(),
-                               source_fe.dofs_per_cell));
+                               x_source_fe.dofs_per_cell));
+
+                                  // ok, source is a Q element, so
+                                  // we will be able to do the work
+  const FE_Q<dim> &source_fe
+    = dynamic_cast<const FE_Q<dim>&>(x_source_fe);
 
   const std::vector<unsigned int> &index_map=
     this->poly_space.get_numbering();
@@ -339,6 +339,9 @@ get_subface_interpolation_matrix (const FiniteElement<1> &/*x_source_fe*/,
                                  const unsigned int      /*subface*/,
                                  FullMatrix<double>     &/*interpolation_matrix*/) const
 {
+  Assert (false,
+         FiniteElement<1>::
+         ExcInterpolationNotImplemented ());
 }
 
 #endif
@@ -361,6 +364,13 @@ get_face_interpolation_matrix (const FiniteElement<dim> &x_source_fe,
                typename FiniteElement<dim>::
                ExcInterpolationNotImplemented());
   
+  Assert (interpolation_matrix.m() == this->dofs_per_face,
+         ExcDimensionMismatch (interpolation_matrix.m(),
+                               this->dofs_per_face));
+  Assert (interpolation_matrix.n() == x_source_fe.dofs_per_face,
+         ExcDimensionMismatch (interpolation_matrix.m(),
+                               x_source_fe.dofs_per_face));
+
                                   // ok, source is a Q element, so
                                   // we will be able to do the work
   const FE_Q<dim> &source_fe
@@ -381,13 +391,6 @@ get_face_interpolation_matrix (const FiniteElement<dim> &x_source_fe,
          typename FiniteElement<dim>::
          ExcInterpolationNotImplemented ());
   
-  Assert (interpolation_matrix.m() == this->dofs_per_face,
-         ExcDimensionMismatch (interpolation_matrix.m(),
-                               this->dofs_per_face));
-  Assert (interpolation_matrix.n() == source_fe.dofs_per_face,
-         ExcDimensionMismatch (interpolation_matrix.m(),
-                               source_fe.dofs_per_face));
-
                                    // generate a quadrature
                                    // with the unit support points.
                                    // This is later based as a
@@ -466,6 +469,13 @@ get_subface_interpolation_matrix (const FiniteElement<dim> &x_source_fe,
                typename FiniteElement<dim>::
                ExcInterpolationNotImplemented());
   
+  Assert (interpolation_matrix.m() == this->dofs_per_face,
+         ExcDimensionMismatch (interpolation_matrix.m(),
+                               this->dofs_per_face));
+  Assert (interpolation_matrix.n() == x_source_fe.dofs_per_face,
+         ExcDimensionMismatch (interpolation_matrix.m(),
+                               x_source_fe.dofs_per_face));
+
                                   // ok, source is a Q element, so
                                   // we will be able to do the work
   const FE_Q<dim> &source_fe
@@ -486,13 +496,6 @@ get_subface_interpolation_matrix (const FiniteElement<dim> &x_source_fe,
          typename FiniteElement<dim>::
          ExcInterpolationNotImplemented ());
   
-  Assert (interpolation_matrix.m() == this->dofs_per_face,
-         ExcDimensionMismatch (interpolation_matrix.m(),
-                               this->dofs_per_face));
-  Assert (interpolation_matrix.n() == source_fe.dofs_per_face,
-         ExcDimensionMismatch (interpolation_matrix.m(),
-                               source_fe.dofs_per_face));
-  
                                    // generate a point on this
                                    // cell and evaluate the
                                    // shape functions there

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.