From: Wolfgang Bangerth Date: Tue, 20 Nov 2018 15:28:14 +0000 (-0700) Subject: Add get_triangulation() functions to TriaAccessor<0,*,structdim> classes. X-Git-Tag: v9.1.0-rc1~547^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0d0a39c02a96f1d18060f1ec141accd39b4f36d;p=dealii.git Add get_triangulation() functions to TriaAccessor<0,*,structdim> classes. --- diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 40ee283c6e..4124892bbf 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -488,7 +488,7 @@ public: state() const; /** - * Return a pointer to the triangulation which the object pointed to by this + * Return a reference to the triangulation which the object pointed to by this * class belongs to. */ const Triangulation & @@ -1794,6 +1794,13 @@ public: int index() const; + /** + * Return a reference to the triangulation which the object pointed to by this + * class belongs to. + */ + const Triangulation & + get_triangulation() const; + /** * @name Advancement of iterators */ @@ -2212,6 +2219,13 @@ public: int index() const; + /** + * Return a reference to the triangulation which the object pointed to by this + * class belongs to. + */ + const Triangulation<1, spacedim> & + get_triangulation() const; + /** * @name Advancement of iterators */ diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 45898346c6..bbb44552b7 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -2327,6 +2327,15 @@ TriaAccessor<0, dim, spacedim>::index() const +template +inline const Triangulation & +TriaAccessor<0, dim, spacedim>::get_triangulation() const +{ + return *tria; +} + + + template inline void TriaAccessor<0, dim, spacedim>::operator++() @@ -2698,6 +2707,15 @@ TriaAccessor<0, 1, spacedim>::index() const +template +inline const Triangulation<1, spacedim> & +TriaAccessor<0, 1, spacedim>::get_triangulation() const +{ + return *tria; +} + + + template inline void TriaAccessor<0, 1, spacedim>::operator++() const