From: wolf Date: Fri, 7 May 1999 11:15:47 +0000 (+0000) Subject: Add a function to ask an iterator for the triangulation it belongs to. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82731887100d47ee37ff907be86f18a4c232f611;p=dealii-svn.git Add a function to ask an iterator for the triangulation it belongs to. git-svn-id: https://svn.dealii.org/trunk@1293 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index ee28d62fae..bd0b2ef906 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -96,7 +96,7 @@ class TriaAccessor { * Same as above. */ TriaAccessor &operator = (const TriaAccessor &); - + public: /** * Compare for equality. @@ -146,6 +146,14 @@ class TriaAccessor { * \Ref{TriaRawIterator} documentation. */ IteratorState state () const; + + /** + * Return a pointer to the triangulation + * which the object pointed to by this + * class belongs to. + */ + const Triangulation & get_triangulation () const; + /*@}*/ /**@name Exceptions for derived classes diff --git a/deal.II/deal.II/include/grid/tria_accessor.templates.h b/deal.II/deal.II/include/grid/tria_accessor.templates.h index c49912ff2a..3bb7d42824 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.templates.h +++ b/deal.II/deal.II/include/grid/tria_accessor.templates.h @@ -84,6 +84,16 @@ TriaAccessor::state () const { +template +inline +const Triangulation & +TriaAccessor::get_triangulation () const +{ + return *tria; +}; + + + /*------------------------ Functions: LineAccessor ---------------------------*/