From 2058b39dae72baab43973b7d3aed744a7b457442 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 27 Jun 2017 20:14:41 -0600 Subject: [PATCH] Fix a wrong data type. When distributing MG DoF indices, we accidentally used 'unsigned int' instead of 'types::global_dof_index'. That's a bug. We didn't notice this because we never have more than 4B unknowns on one processor, and the function was only called in the parallel context to enumerate the DoFs on the *local* portion of the mesh, before indices were shifted after communication with other processors. Regardless, it's worth fixing. --- source/dofs/dof_handler_policy.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index c0add2bf29..c3da27fbaa 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -325,9 +325,9 @@ namespace internal */ template static - unsigned int + types::global_dof_index distribute_mg_dofs_on_cell (const typename DoFHandler::level_cell_iterator &cell, - unsigned int next_free_dof, + types::global_dof_index next_free_dof, const internal::int2type<1> &) { // distribute dofs of vertices @@ -378,9 +378,9 @@ namespace internal template static - unsigned int + types::global_dof_index distribute_mg_dofs_on_cell (const typename DoFHandler::level_cell_iterator &cell, - unsigned int next_free_dof, + types::global_dof_index next_free_dof, const internal::int2type<2> &) { if (cell->get_fe().dofs_per_vertex > 0) @@ -424,9 +424,9 @@ namespace internal template static - unsigned int + types::global_dof_index distribute_mg_dofs_on_cell (const typename DoFHandler::level_cell_iterator &cell, - unsigned int next_free_dof, + types::global_dof_index next_free_dof, const internal::int2type<3> &) { if (cell->get_fe().dofs_per_vertex > 0) @@ -485,7 +485,7 @@ namespace internal template static - unsigned int + types::global_dof_index distribute_dofs_on_level (const types::subdomain_id level_subdomain_id, DoFHandler &dof_handler, const unsigned int level) @@ -504,7 +504,7 @@ namespace internal tria.save_user_flags(user_flags); const_cast &>(tria).clear_user_flags (); - unsigned int next_free_dof = 0; + types::global_dof_index next_free_dof = 0; typename DoFHandler::level_cell_iterator cell = dof_handler.begin(level), endc = dof_handler.end(level); -- 2.39.5