From 5df0977d3f88e20800d329a2dd7c319e452e58ba Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 19 Sep 2020 12:12:11 -0400 Subject: [PATCH] Avoid gcc-10 warning about deprecated parallel::Triangulation --- include/deal.II/distributed/cell_weights.h | 4 ++-- source/distributed/cell_weights.cc | 28 ++++++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/deal.II/distributed/cell_weights.h b/include/deal.II/distributed/cell_weights.h index 6066e30995..1ecfad304a 100644 --- a/include/deal.II/distributed/cell_weights.h +++ b/include/deal.II/distributed/cell_weights.h @@ -137,8 +137,8 @@ namespace parallel * Triangulation associated with the @p dof_handler. */ static std::function::cell_iterator &cell, - const typename Triangulation::CellStatus status)> + const typename dealii::Triangulation::cell_iterator &cell, + const typename dealii::Triangulation::CellStatus status)> make_weighting_callback(const DoFHandler &dof_handler, const WeightingFunction &weighting_function); diff --git a/source/distributed/cell_weights.cc b/source/distributed/cell_weights.cc index fb8dfff2bc..c6d052f59a 100644 --- a/source/distributed/cell_weights.cc +++ b/source/distributed/cell_weights.cc @@ -126,8 +126,8 @@ namespace parallel template std::function::cell_iterator &cell, - const typename Triangulation::CellStatus status)> + const typename dealii::Triangulation::cell_iterator &cell, + const typename dealii::Triangulation::CellStatus status)> CellWeights::make_weighting_callback( const DoFHandler &dof_handler, const typename CellWeights::WeightingFunction @@ -142,17 +142,19 @@ namespace parallel ExcMessage( "parallel::CellWeights requires a parallel::TriangulationBase object.")); - return [&dof_handler, tria, weighting_function]( - const typename Triangulation::cell_iterator &cell, - const typename Triangulation::CellStatus status) - -> unsigned int { - return CellWeights::weighting_callback(cell, - status, - std::cref( - dof_handler), - std::cref(*tria), - weighting_function); - }; + return + [&dof_handler, tria, weighting_function]( + const typename dealii::Triangulation::cell_iterator + & cell, + const typename dealii::Triangulation::CellStatus status) + -> unsigned int { + return CellWeights::weighting_callback( + cell, + status, + std::cref(dof_handler), + std::cref(*tria), + weighting_function); + }; } -- 2.39.5