From: Peter Munch Date: Fri, 15 Jul 2022 18:56:01 +0000 (+0200) Subject: p:d:GridRefinement: actually accept other types of triangulations X-Git-Tag: v9.5.0-rc1~1084^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14141%2Fhead;p=dealii.git p:d:GridRefinement: actually accept other types of triangulations --- diff --git a/include/deal.II/distributed/grid_refinement.h b/include/deal.II/distributed/grid_refinement.h index bf2adf4c5f..9ef0a5c6d5 100644 --- a/include/deal.II/distributed/grid_refinement.h +++ b/include/deal.II/distributed/grid_refinement.h @@ -154,11 +154,11 @@ namespace parallel template void refine_and_coarsen_fixed_number( - Triangulation & tria, - const dealii::Vector & criteria, - const double top_fraction_of_cells, - const double bottom_fraction_of_cells, - const types::global_cell_index max_n_cells = + dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_fraction_of_cells, + const double bottom_fraction_of_cells, + const types::global_cell_index max_n_cells = std::numeric_limits::max()); /** @@ -208,10 +208,10 @@ namespace parallel template void refine_and_coarsen_fixed_fraction( - Triangulation &tria, - const dealii::Vector &criteria, - const double top_fraction_of_error, - const double bottom_fraction_of_error, + dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_fraction_of_error, + const double bottom_fraction_of_error, const VectorTools::NormType norm_type = VectorTools::NormType::L1_norm); } // namespace GridRefinement } // namespace distributed diff --git a/source/distributed/grid_refinement.cc b/source/distributed/grid_refinement.cc index 6a9a5ceff0..2fb60f9433 100644 --- a/source/distributed/grid_refinement.cc +++ b/source/distributed/grid_refinement.cc @@ -113,10 +113,9 @@ namespace */ template void - get_locally_owned_indicators( - const parallel::distributed::Triangulation &tria, - const dealii::Vector & criteria, - Vector &locally_owned_indicators) + get_locally_owned_indicators(const dealii::Triangulation &tria, + const dealii::Vector &criteria, + Vector &locally_owned_indicators) { Assert(locally_owned_indicators.size() == n_locally_owned_active_cells(tria), @@ -182,10 +181,10 @@ namespace */ template void - mark_cells(parallel::distributed::Triangulation &tria, - const dealii::Vector & criteria, - const double top_threshold, - const double bottom_threshold) + mark_cells(dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_threshold, + const double bottom_threshold) { dealii::GridRefinement::refine(tria, criteria, top_threshold); dealii::GridRefinement::coarsen(tria, criteria, bottom_threshold); @@ -212,10 +211,10 @@ namespace template void refine_and_coarsen_fixed_fraction_via_l1_norm( - parallel::distributed::Triangulation &tria, - const dealii::Vector & criteria, - const double top_fraction_of_error, - const double bottom_fraction_of_error) + dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_fraction_of_error, + const double bottom_fraction_of_error) { // first extract from the vector of indicators the ones that correspond // to cells that we locally own @@ -503,11 +502,11 @@ namespace parallel template void refine_and_coarsen_fixed_number( - parallel::distributed::Triangulation &tria, - const dealii::Vector & criteria, - const double top_fraction_of_cells, - const double bottom_fraction_of_cells, - const types::global_cell_index max_n_cells) + dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_fraction_of_cells, + const double bottom_fraction_of_cells, + const types::global_cell_index max_n_cells) { Assert(criteria.size() == tria.n_active_cells(), ExcDimensionMismatch(criteria.size(), tria.n_active_cells())); @@ -576,11 +575,11 @@ namespace parallel template void refine_and_coarsen_fixed_fraction( - parallel::distributed::Triangulation &tria, - const dealii::Vector & criteria, - const double top_fraction_of_error, - const double bottom_fraction_of_error, - const VectorTools::NormType norm_type) + dealii::Triangulation &tria, + const dealii::Vector & criteria, + const double top_fraction_of_error, + const double bottom_fraction_of_error, + const VectorTools::NormType norm_type) { Assert(criteria.size() == tria.n_active_cells(), ExcDimensionMismatch(criteria.size(), tria.n_active_cells())); diff --git a/source/distributed/grid_refinement.inst.in b/source/distributed/grid_refinement.inst.in index 8f3a7e025d..7ff532ba9a 100644 --- a/source/distributed/grid_refinement.inst.in +++ b/source/distributed/grid_refinement.inst.in @@ -65,7 +65,7 @@ for (S : REAL_SCALARS; deal_II_dimension : DIMENSIONS) refine_and_coarsen_fixed_number( - Triangulation &, + dealii::Triangulation &, const dealii::Vector &, const double, const double, @@ -75,7 +75,7 @@ for (S : REAL_SCALARS; deal_II_dimension : DIMENSIONS) refine_and_coarsen_fixed_fraction( - Triangulation &, + dealii::Triangulation &, const dealii::Vector &, const double, const double, @@ -97,7 +97,7 @@ for (S : REAL_SCALARS; deal_II_dimension : DIMENSIONS) refine_and_coarsen_fixed_number( - Triangulation &, + dealii::Triangulation &, const dealii::Vector &, const double, const double, @@ -107,7 +107,7 @@ for (S : REAL_SCALARS; deal_II_dimension : DIMENSIONS) refine_and_coarsen_fixed_fraction( - Triangulation &, + dealii::Triangulation &, const dealii::Vector &, const double, const double,