From 7595965cc35dfa5276b886d87da8db52b5d3c688 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 13 Oct 2017 12:09:51 +0200 Subject: [PATCH] Added getters for Mapping and Triangulation --- include/deal.II/grid/grid_tools_cache.h | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 -- 2.39.5