]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a few bugs with handling the hp DoF data structure.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 22 Mar 2013 12:27:26 +0000 (12:27 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 22 Mar 2013 12:27:26 +0000 (12:27 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28981 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_accessor.templates.h

index dfe57da782d750a42db841ba368571e822ea9ba9..45a8ec9a70f410e61d23c51baae634a273e5945d 100644 (file)
@@ -1162,9 +1162,9 @@ namespace internal
 
             // a fe index is always small
             Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
-            const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
+            const types::global_dof_index this_fe_index = *pointer;
 
-            Assert (this_fe_index != numbers::invalid_unsigned_int,
+            Assert (this_fe_index != numbers::invalid_dof_index,
                     ExcInternalError());
             Assert (this_fe_index < dof_handler.finite_elements->size(),
                     ExcInternalError());
@@ -1253,9 +1253,9 @@ namespace internal
             Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
             Assert((*pointer)<std::numeric_limits<types::global_dof_index>::max(), ExcInternalError());
-            const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
+            const types::global_dof_index this_fe_index = *pointer;
 
-            Assert (this_fe_index != numbers::invalid_unsigned_int,
+            Assert (this_fe_index != numbers::invalid_dof_index,
                     ExcInternalError());
             Assert (this_fe_index < dof_handler.finite_elements->size(),
                     ExcInternalError());
@@ -1302,10 +1302,9 @@ namespace internal
           {
             Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-            Assert((*pointer)<std::numeric_limits<types::global_dof_index>::max(), ExcInternalError());
-            const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
+            const types::global_dof_index this_fe_index = *pointer;
 
-            if (this_fe_index == numbers::invalid_unsigned_int)
+            if (this_fe_index == numbers::invalid_dof_index)
               return counter;
             else
               {
@@ -1356,7 +1355,7 @@ namespace internal
             Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
             Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
-            const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
+            const types::global_dof_index this_fe_index = *pointer;
 
             Assert (this_fe_index < dof_handler.finite_elements->size(),
                     ExcInternalError());
@@ -1364,7 +1363,7 @@ namespace internal
             if (counter == n)
               return this_fe_index;
 
-            Assert (this_fe_index != numbers::invalid_unsigned_int,
+            Assert (this_fe_index != numbers::invalid_dof_index,
                     ExcInternalError());
 
             pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1;
@@ -1416,12 +1415,12 @@ namespace internal
             Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
             Assert((*pointer)<std::numeric_limits<types::global_dof_index>::max(), ExcInternalError());
-            const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
+            const types::global_dof_index this_fe_index = *pointer;
 
             Assert (this_fe_index < dof_handler.finite_elements->size(),
                     ExcInternalError());
 
-            if (this_fe_index == numbers::invalid_unsigned_int)
+            if (this_fe_index == numbers::invalid_dof_index)
               return false;
             else if (this_fe_index == fe_index)
               return true;

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.