From: Luca Heltai Date: Fri, 13 Oct 2017 10:09:51 +0000 (+0200) Subject: Added getters for Mapping and Triangulation X-Git-Tag: v9.0.0-rc1~943^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7595965cc35dfa5276b886d87da8db52b5d3c688;p=dealii.git Added getters for Mapping and Triangulation --- diff --git a/include/deal.II/grid/grid_tools_cache.h b/include/deal.II/grid/grid_tools_cache.h index 89577ef802..138d604320 100644 --- a/include/deal.II/grid/grid_tools_cache.h +++ b/include/deal.II/grid/grid_tools_cache.h @@ -109,6 +109,16 @@ namespace GridTools const std::vector>> &get_vertex_to_cell_centers_directions() const; + /** + * Return a reference to the stored triangulation. + */ + const Triangulation & get_triangulation() const; + + /** + * Return a reference to the stored mapping. + */ + const Mapping & 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 + inline const Triangulation& Cache::get_triangulation() const + { + return *tria; + } + + + + template + inline const Mapping& Cache::get_mapping() const + { + return *mapping; + } } + + DEAL_II_NAMESPACE_CLOSE #endif