From: bangerth Date: Fri, 22 Mar 2013 12:27:26 +0000 (+0000) Subject: Fix a few bugs with handling the hp DoF data structure. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b324af49761a799e986809f0ba7e3507b76fc8c;p=dealii-svn.git Fix a few bugs with handling the hp DoF data structure. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28981 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/dofs/dof_accessor.templates.h b/deal.II/include/deal.II/dofs/dof_accessor.templates.h index dfe57da782..45a8ec9a70 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -1162,9 +1162,9 @@ namespace internal // a fe index is always small Assert((*pointer)::max(), ExcInternalError()); - const unsigned int this_fe_index = static_cast(*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)::max(), ExcInternalError()); - const unsigned int this_fe_index = static_cast(*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)::max(), ExcInternalError()); - const unsigned int this_fe_index = static_cast(*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)::max(), ExcInternalError()); - const unsigned int this_fe_index = static_cast(*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)::max(), ExcInternalError()); - const unsigned int this_fe_index = static_cast(*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;