From 06a14d17c7fcbe8fa6b6d8ce7371b52f2079f1ef Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 9 Mar 2021 19:11:45 -0700 Subject: [PATCH] Hotfix: dealii::Vector does not accept integral types. --- source/dofs/dof_handler.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index e16d10eb70..2e36ac73e2 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -2701,7 +2701,8 @@ DoFHandler::prepare_coarsening_and_refinement( using level_type = active_fe_index_type; static const level_type invalid_level = invalid_active_fe_index; - LinearAlgebra::distributed::Vector future_levels; + // HOTFIX: dealii::Vector does not accept integral types + LinearAlgebra::distributed::Vector future_levels; if (const auto parallel_tria = dynamic_cast *>( &(*tria))) @@ -2751,8 +2752,8 @@ DoFHandler::prepare_coarsening_and_refinement( for (const auto &cell : active_cell_iterators()) if (!cell->is_artificial()) { - const level_type cell_level = - future_levels[cell->global_active_cell_index()]; + const level_type cell_level = static_cast( + future_levels[cell->global_active_cell_index()]); // ignore cells that are not part of the hierarchy if (cell_level == invalid_level) @@ -2773,8 +2774,8 @@ DoFHandler::prepare_coarsening_and_refinement( // owning process and communicated at the next loop iteration. if (neighbor->is_locally_owned()) { - const level_type neighbor_level = - future_levels[neighbor->global_active_cell_index()]; + const level_type neighbor_level = static_cast( + future_levels[neighbor->global_active_cell_index()]); // ignore neighbors that are not part of the hierarchy if (neighbor_level == invalid_level) @@ -2803,8 +2804,8 @@ DoFHandler::prepare_coarsening_and_refinement( for (const auto &cell : active_cell_iterators()) if (cell->is_locally_owned()) { - const level_type cell_level = - future_levels[cell->global_active_cell_index()]; + const level_type cell_level = static_cast( + future_levels[cell->global_active_cell_index()]); if (cell_level != invalid_level) { -- 2.39.5