From bff4f9c2b6e31ba334fd02e7fb9ceb81dde95c93 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 22 Mar 2013 12:27:26 +0000 Subject: [PATCH] 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 --- .../deal.II/dofs/dof_accessor.templates.h | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) 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; -- 2.39.5