]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a function to ask an iterator for the triangulation it belongs to.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 May 1999 11:15:47 +0000 (11:15 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 May 1999 11:15:47 +0000 (11:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@1293 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/include/grid/tria_accessor.templates.h

index ee28d62fae9e4895b640c1fe204f63dc50050268..bd0b2ef906031e61c90e367a09c2f4341194cc40 100644 (file)
@@ -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<dim> & get_triangulation () const;
+    
                                     /*@}*/
 
                                     /**@name Exceptions for derived classes
index c49912ff2ab88614f8b84d5df2285f4333facfaf..3bb7d42824f43f2947b70df52fca8e2ed78dcab6 100644 (file)
@@ -84,6 +84,16 @@ TriaAccessor<dim>::state () const {
 
 
 
+template <int dim>
+inline
+const Triangulation<dim> &
+TriaAccessor<dim>::get_triangulation () const
+{
+  return *tria;
+};
+
+
+
 /*------------------------ Functions: LineAccessor ---------------------------*/
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.