]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added getters for Mapping and Triangulation
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 13 Oct 2017 10:09:51 +0000 (12:09 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Fri, 13 Oct 2017 10:09:51 +0000 (12:09 +0200)
include/deal.II/grid/grid_tools_cache.h

index 89577ef802e51f8b1c7a9fb088acb006f43ab44d..138d604320ec48675480d92e8ff726b1e7f44388 100644 (file)
@@ -109,6 +109,16 @@ namespace GridTools
     const std::vector<std::vector<Tensor<1,spacedim>>>
     &get_vertex_to_cell_centers_directions() const;
 
+    /**
+     * Return a reference to the stored triangulation.
+     */
+    const Triangulation<dim,spacedim> & get_triangulation() const;
+
+    /**
+     * Return a reference to the stored mapping.
+     */
+    const Mapping<dim,spacedim> & get_mapping() const;
+
 #ifdef DEAL_II_WITH_NANOFLANN
     /**
      * Return the cached vertex_kdtree object, constructed with the vertices of
@@ -162,8 +172,26 @@ namespace GridTools
     boost::signals2::connection tria_signal;
   };
 
+
+
+  // Inline functions
+  template<int dim, int spacedim>
+  inline const Triangulation<dim, spacedim>& Cache::get_triangulation() const
+  {
+    return *tria;
+  }
+
+
+
+  template<int dim, int spacedim>
+  inline const Mapping<dim, spacedim>& Cache::get_mapping() const
+  {
+    return *mapping;
+  }
 }
 
+
+
 DEAL_II_NAMESPACE_CLOSE
 
 #endif

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.