From: Matthias Maier Date: Mon, 25 Nov 2019 22:41:02 +0000 (-0600) Subject: hide an implementational detail X-Git-Tag: v9.2.0-rc1~658^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1720f217cfe859f87a40f459c84d3c34b98da62b;p=dealii.git hide an implementational detail The whole notion of a "Triangulation::active_cell_iterator" in DataOut and DataOut_DoFData is unnecessary. This data type is in fact never used except for one implementational detail. Thus, remove it. --- diff --git a/doc/news/changes/incompatibilities/20191125MatthiasMaier b/doc/news/changes/incompatibilities/20191125MatthiasMaier new file mode 100644 index 0000000000..eb0152e576 --- /dev/null +++ b/doc/news/changes/incompatibilities/20191125MatthiasMaier @@ -0,0 +1,5 @@ +Removed: The typedefs DataOut::active_cell_iterator and +DataOut_DoFData::active_cell_iterator have been removed. These typedefs are +an implementational detail that should have never exposed in the interface. +
+(Matthias Maier, 2019/11/25) diff --git a/include/deal.II/numerics/data_out.h b/include/deal.II/numerics/data_out.h index e0051930d4..0d57f5c5a0 100644 --- a/include/deal.II/numerics/data_out.h +++ b/include/deal.II/numerics/data_out.h @@ -170,10 +170,6 @@ public: typename DataOut_DoFData::cell_iterator; - using active_cell_iterator = typename DataOut_DoFData< - DoFHandlerType, - DoFHandlerType::dimension, - DoFHandlerType::space_dimension>::active_cell_iterator; /** * Enumeration describing the part of the domain in which cells diff --git a/include/deal.II/numerics/data_out_dof_data.h b/include/deal.II/numerics/data_out_dof_data.h index 7d6622dac4..0c5669ee36 100644 --- a/include/deal.II/numerics/data_out_dof_data.h +++ b/include/deal.II/numerics/data_out_dof_data.h @@ -604,9 +604,6 @@ public: using cell_iterator = typename Triangulation::cell_iterator; - using active_cell_iterator = typename Triangulation< - DoFHandlerType::dimension, - DoFHandlerType::space_dimension>::active_cell_iterator; public: /** diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 3675e60d46..c982eede9c 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -228,7 +228,11 @@ namespace internal bool duplicate = false; for (unsigned int j = 0; j < dataset; ++j) if (finite_elements[dataset].get() == finite_elements[j].get()) - duplicate = true; + { + duplicate = true; + break; + } + if (duplicate == false) { typename DoFHandlerType::active_cell_iterator dh_cell( diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index 96f77701fc..eac86627f2 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -910,16 +910,16 @@ DataOut::build_patches( // data from (cell data vectors do not have the length distance computed by // first_locally_owned_cell/next_locally_owned_cell because this might skip // some values (FilteredIterator). - active_cell_iterator active_cell = this->triangulation->begin_active(); - unsigned int active_index = 0; - cell_iterator cell = first_locally_owned_cell(); + auto active_cell = this->triangulation->begin_active(); + unsigned int active_index = 0; + cell_iterator cell = first_locally_owned_cell(); for (; cell != this->triangulation->end(); cell = next_locally_owned_cell(cell)) { // move forward until active_cell points at the cell (cell) we are // looking at to compute the current active_index while (active_cell != this->triangulation->end() && cell->active() && - active_cell_iterator(cell) != active_cell) + decltype(active_cell)(cell) != active_cell) { ++active_cell; ++active_index;