From 669dce79516ff1b1b8f1815b0e29432f0171e87d Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 23 Apr 2021 10:30:06 -0400 Subject: [PATCH] Fix compilation with gcc-5. The compiler generates identical symbols for each static declaration, which leads to a problem in the assembler. Work around it by not declaring the variable as static. --- source/hp/refinement.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index ef2d65fbd3..83362280c9 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -828,8 +828,7 @@ namespace hp // possible using level_type = typename dealii::DoFHandler::active_fe_index_type; - static const level_type invalid_level = - dealii::DoFHandler::invalid_active_fe_index; + const auto invalid_level = static_cast(-1); // map from FE index to level in hierarchy // FE indices that are not covered in the hierarchy are not in the map @@ -888,8 +887,8 @@ namespace hp // Function that updates the level of neighbor to fulfill difference // criterion, and returns whether it was changed. const auto update_neighbor_level = - [&future_levels, max_difference](const auto & neighbor, - const level_type cell_level) -> bool { + [&future_levels, max_difference, invalid_level]( + const auto &neighbor, const level_type cell_level) -> bool { Assert(neighbor->is_active(), ExcInternalError()); // We only care about locally owned neighbors. If neighbor is a ghost // cell, its future FE index will be updated on the owning process and -- 2.39.5