]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use new function FiniteElementData<dim>::face_to_equivalent_cell_index
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Mar 2006 23:19:09 +0000 (23:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Mar 2006 23:19:09 +0000 (23:19 +0000)
to simplify code.

git-svn-id: https://svn.dealii.org/trunk@12737 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h

index 6e07a62b47b39bcaf3772f732fc7230df36114a7..4e2f891f871ec904a4e34982b8c23be0c5e3156d 100644 (file)
@@ -2220,52 +2220,7 @@ FiniteElement<dim>::face_system_to_component_index (const unsigned int index) co
                                    //
                                    // in 1d, the face index is equal
                                    // to the cell index
-  Assert (((dim == 1) && is_primitive(index))
-          ||
-                                           // in 2d, construct it like
-                                           // this:
-          ((dim == 2) &&
-           is_primitive (index < (GeometryInfo<2>::vertices_per_face *
-                                  this->dofs_per_vertex)
-                         ?
-                         index
-                         :
-                         GeometryInfo<2>::vertices_per_cell *
-                         this->dofs_per_vertex +
-                         (index -
-                          GeometryInfo<2>::vertices_per_face *
-                          this->dofs_per_vertex)))
-          ||
-                                           // likewise in 3d, but more
-                                           // complicated
-          ((dim == 3) &&
-           is_primitive (index < (GeometryInfo<3>::vertices_per_face *
-                                  this->dofs_per_vertex)
-                         ?
-                         index
-                         :
-                         (index < (GeometryInfo<3>::vertices_per_face *
-                                   this->dofs_per_vertex
-                                   +
-                                   GeometryInfo<3>::lines_per_face *
-                                   this->dofs_per_line)
-                          ?
-                          GeometryInfo<3>::vertices_per_cell *
-                          this->dofs_per_vertex +
-                          (index -
-                           GeometryInfo<3>::vertices_per_face *
-                           this->dofs_per_vertex)
-                          :
-                          GeometryInfo<3>::vertices_per_cell *
-                          this->dofs_per_vertex +
-                          GeometryInfo<3>::lines_per_cell *
-                          this->dofs_per_line +
-                          (index -
-                           GeometryInfo<3>::vertices_per_face *
-                           this->dofs_per_vertex
-                           -
-                           GeometryInfo<3>::lines_per_face *
-                           this->dofs_per_line)))),
+  Assert (is_primitive(this->face_to_equivalent_cell_index(index)),
           typename FiniteElement<dim>::ExcShapeFunctionNotPrimitive(index));
 
   return face_system_to_component_table[index];

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.