From: Wolfgang Bangerth Date: Fri, 4 Aug 2017 12:04:30 +0000 (-0600) Subject: Move an iterator declaration that is now completely generic. X-Git-Tag: v9.0.0-rc1~1357^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13e236be3c913be4af377ffe68d3248bab5a8ed;p=dealii.git Move an iterator declaration that is now completely generic. The internal::Triangulation::Iterators class was meant to abstract away things that look differently between dimensions. But we can now do better because at least the vertex iterators are completely generic now. So move the typedef from there to the Triangulation class, where it easier to find for users. --- diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index fc26bb647f..70a2927574 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -1503,8 +1503,8 @@ public: typedef TriaIterator > face_iterator; typedef TriaActiveIterator > active_face_iterator; - typedef typename IteratorSelector::vertex_iterator vertex_iterator; - typedef typename IteratorSelector::active_vertex_iterator active_vertex_iterator; + typedef TriaIterator > vertex_iterator; + typedef TriaActiveIterator > active_vertex_iterator; typedef typename IteratorSelector::line_iterator line_iterator; typedef typename IteratorSelector::active_line_iterator active_line_iterator; @@ -3245,12 +3245,12 @@ private: * Since users should never have to access these internal properties of how * we store data, these iterator types are made private. */ - typedef TriaRawIterator > raw_cell_iterator; - typedef TriaRawIterator > raw_face_iterator; - typedef typename IteratorSelector::raw_vertex_iterator raw_vertex_iterator; - typedef typename IteratorSelector::raw_line_iterator raw_line_iterator; - typedef typename IteratorSelector::raw_quad_iterator raw_quad_iterator; - typedef typename IteratorSelector::raw_hex_iterator raw_hex_iterator; + typedef TriaRawIterator > raw_cell_iterator; + typedef TriaRawIterator > raw_face_iterator; + typedef TriaRawIterator > raw_vertex_iterator; + typedef typename IteratorSelector::raw_line_iterator raw_line_iterator; + typedef typename IteratorSelector::raw_quad_iterator raw_quad_iterator; + typedef typename IteratorSelector::raw_hex_iterator raw_hex_iterator; /** * Iterator to the first cell, used or not, on level @p level. If a level diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 664cfc970b..dc5531a534 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -655,7 +655,7 @@ public: * Pointer to the @p ith vertex bounding this object. Throw an exception if * dim=1. */ - typename dealii::internal::Triangulation::Iterators::vertex_iterator + TriaIterator > vertex_iterator (const unsigned int i) const; /** diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 9d6252cad1..6529d22ab9 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -1189,11 +1189,10 @@ TriaAccessor::used () const template inline -typename dealii::internal::Triangulation::Iterators::vertex_iterator +TriaIterator > TriaAccessor::vertex_iterator (const unsigned int i) const { - return typename dealii::internal::Triangulation::Iterators::vertex_iterator - (this->tria, 0, vertex_index (i)); + return TriaIterator >(this->tria, 0, vertex_index (i)); } diff --git a/include/deal.II/grid/tria_iterator_selector.h b/include/deal.II/grid/tria_iterator_selector.h index 47ea96f54a..18c1a9342e 100644 --- a/include/deal.II/grid/tria_iterator_selector.h +++ b/include/deal.II/grid/tria_iterator_selector.h @@ -42,9 +42,6 @@ namespace internal * @ref Iterators * module for more information. * - * A @p vertex_iterator is typedef'd to an iterator operating on the @p - * vertices member variable of a Triangulation<1> object. - * * A @p line_iterator is typedef'd to an iterator operating on the @p * lines member variable of a Triangulation<1> object. An @p * active_line_iterator only operates on the active lines. @p @@ -72,10 +69,6 @@ namespace internal template struct Iterators<1,spacedim> { - typedef TriaRawIterator > raw_vertex_iterator; - typedef TriaIterator > vertex_iterator; - typedef TriaActiveIterator > active_vertex_iterator; - typedef TriaRawIterator > raw_line_iterator; typedef TriaIterator > line_iterator; typedef TriaActiveIterator > active_line_iterator; @@ -99,9 +92,6 @@ namespace internal * @ref Iterators * module for more information. * - * A @p vertex_iterator is typedef'd to an iterator operating on the @p - * vertices member variable of a Triangulation<2> object. - * * A @p line_iterator is typedef'd to an iterator operating on the @p * lines member variable of a Triangulation<2> object. An @p * active_line_iterator only operates on the active lines. @p @@ -135,10 +125,6 @@ namespace internal template struct Iterators<2,spacedim> { - typedef TriaRawIterator > raw_vertex_iterator; - typedef TriaIterator > vertex_iterator; - typedef TriaActiveIterator > active_vertex_iterator; - typedef TriaRawIterator > raw_line_iterator; typedef TriaIterator > line_iterator; typedef TriaActiveIterator > active_line_iterator; @@ -179,10 +165,6 @@ namespace internal template struct Iterators<3,spacedim> { - typedef TriaRawIterator > raw_vertex_iterator; - typedef TriaIterator > vertex_iterator; - typedef TriaActiveIterator > active_vertex_iterator; - typedef TriaRawIterator > raw_line_iterator; typedef TriaIterator > line_iterator; typedef TriaActiveIterator > active_line_iterator;