From 1577090929e7155e871e71212db4e07c4d578689 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 3 Mar 2020 11:39:42 -0700 Subject: [PATCH] Simplify a piece of code. --- include/deal.II/fe/fe_tools.templates.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 926110a0ef..0a7d0d6375 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1820,14 +1820,10 @@ namespace FETools A(k * nd + d, j) = fine.shape_value_component(j, k, d); Householder H(A); - unsigned int cell_number = 0; Threads::TaskGroup task_group; - for (typename Triangulation::active_cell_iterator - fine_cell = tria.begin_active(); - fine_cell != tria.end(); - ++fine_cell, ++cell_number) + for (const auto &fine_cell : tria.active_cell_iterators()) { fine.reinit(fine_cell); @@ -1847,7 +1843,8 @@ namespace FETools coarse.reinit(tria.begin(0)); - FullMatrix &this_matrix = matrices[cell_number]; + FullMatrix &this_matrix = + matrices[fine_cell->active_cell_index()]; // Compute this once for each // coarse grid basis function. can @@ -1890,10 +1887,6 @@ namespace FETools if (std::fabs(this_matrix(i, j)) < 1e-12) this_matrix(i, j) = 0.; } - - Assert(cell_number == - GeometryInfo::n_children(RefinementCase(ref_case)), - ExcInternalError()); } } // namespace FEToolsComputeEmbeddingMatricesHelper } // namespace internal -- 2.39.5