]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add get_triangulation() functions to TriaAccessor<0,*,structdim> classes.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Nov 2018 15:28:14 +0000 (08:28 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Nov 2018 15:28:14 +0000 (08:28 -0700)
include/deal.II/grid/tria_accessor.h
include/deal.II/grid/tria_accessor.templates.h

index 40ee283c6e440543ac037f435e4e114477b28b0e..4124892bbf7464c0c60c186ee9fc744fb9325327 100644 (file)
@@ -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<dim, spacedim> &
@@ -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<dim, spacedim> &
+  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
    */
index 45898346c6750b27e2c699fb9d5de3251c2818c2..bbb44552b7faeaefcd01fb5d7e7a6bf4a0849dc8 100644 (file)
@@ -2327,6 +2327,15 @@ TriaAccessor<0, dim, spacedim>::index() const
 
 
 
+template <int dim, int spacedim>
+inline const Triangulation<dim, spacedim> &
+TriaAccessor<0, dim, spacedim>::get_triangulation() const
+{
+  return *tria;
+}
+
+
+
 template <int dim, int spacedim>
 inline void
 TriaAccessor<0, dim, spacedim>::operator++()
@@ -2698,6 +2707,15 @@ TriaAccessor<0, 1, spacedim>::index() const
 
 
 
+template <int spacedim>
+inline const Triangulation<1, spacedim> &
+TriaAccessor<0, 1, spacedim>::get_triangulation() const
+{
+  return *tria;
+}
+
+
+
 template <int spacedim>
 inline void
 TriaAccessor<0, 1, spacedim>::operator++() const

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.