]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Trivially work around an internal compiler error when compiling this
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Sep 2001 14:50:59 +0000 (14:50 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Sep 2001 14:50:59 +0000 (14:50 +0000)
file in optimized mode on a Linux machine with gcc2.95.3.

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

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

index a49ea86c82969d8a67499644de9bc9dcd9490323..ccb2cb0504ef5b5bdeee3a62bb77ec33fb9110d0 100644 (file)
@@ -928,18 +928,19 @@ FE_Q<dim>::lexicographic_to_hierarchic_numbering (const FiniteElementData<dim> &
              }
        }
 
-      for (int i=0; i<static_cast<signed int>(GeometryInfo<dim>::hexes_per_cell); ++i)
-       {
-         unsigned int index = fe_data.first_hex_index;
-         
-         for (unsigned int jz = 1; jz<degree; jz++)
-           for (unsigned int jy = 1; jy<degree; jy++)
-             for (unsigned int jx = 1; jx<degree; jx++)
-               {
-                 const unsigned int tensorindex = jx + jy*n + jz*n*n;
-                 renumber[tensorindex]=index++;
-               }  
-       } 
+      if (GeometryInfo<dim>::hexes_per_cell > 0)
+       for (int i=0; i<static_cast<signed int>(GeometryInfo<dim>::hexes_per_cell); ++i)
+         {
+           unsigned int index = fe_data.first_hex_index;
+           
+           for (unsigned int jz = 1; jz<degree; jz++)
+             for (unsigned int jy = 1; jy<degree; jy++)
+               for (unsigned int jx = 1; jx<degree; jx++)
+                 {
+                   const unsigned int tensorindex = jx + jy*n + jz*n*n;
+                   renumber[tensorindex]=index++;
+                 }  
+         } 
     }
 }
 
index b986c746388a84a0f23fec362307d910950cdf42..f12e03f7a830a81371cebbe33aeff7a589784cb4 100644 (file)
@@ -689,18 +689,19 @@ FETools::lexicographic_to_hierarchic_numbering (const FE_Q<dim>           &fe,
              }
        }
 
-      for (int i=0; i<static_cast<signed int>(GeometryInfo<dim>::hexes_per_cell); ++i)
-       {
-         unsigned int index = fe.first_hex_index;
-         
-         for (unsigned int jz = 1; jz<degree; jz++)
-           for (unsigned int jy = 1; jy<degree; jy++)
-             for (unsigned int jx = 1; jx<degree; jx++)
-               {
-                 const unsigned int tensorindex = jx + jy*n + jz*n*n;
-                 l2h[tensorindex]=index++;
-               }  
-       } 
+      if (GeometryInfo<dim>::hexes_per_cell > 0)
+       for (int i=0; i<static_cast<signed int>(GeometryInfo<dim>::hexes_per_cell); ++i)
+         {
+           unsigned int index = fe.first_hex_index;
+           
+           for (unsigned int jz = 1; jz<degree; jz++)
+             for (unsigned int jy = 1; jy<degree; jy++)
+               for (unsigned int jx = 1; jx<degree; jx++)
+                 {
+                   const unsigned int tensorindex = jx + jy*n + jz*n*n;
+                   l2h[tensorindex]=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.