From 0429eaadcc013e65f5c22a8f5e21e7c3e2085121 Mon Sep 17 00:00:00 2001 From: "Dennis.Glaeser" <dennis.glaeser@iws.uni-stuttgart.de> Date: Wed, 3 Apr 2019 14:26:56 +0200 Subject: [PATCH] [facet][couplingmanager] provide non-const return for grid in protected scope --- dumux/multidomain/facet/gridmanager.hh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dumux/multidomain/facet/gridmanager.hh b/dumux/multidomain/facet/gridmanager.hh index b09a7f04e2..24d7f6a5bf 100644 --- a/dumux/multidomain/facet/gridmanager.hh +++ b/dumux/multidomain/facet/gridmanager.hh @@ -251,6 +251,7 @@ public: if (id > bulkGridId) lowDimGridVertexIndices_[id-1] = std::move(lowDimGridVertexIndices); } +private: //! data on connectivity between the grids std::array<EmbedmentMap, numGrids> embeddedEntityMaps_; std::array<EmbedmentMap, numGrids> adjoinedEntityMaps_; @@ -258,7 +259,6 @@ public: //! Contains the hierarchy insertion indices that make up a lower-dimensional grid std::array<std::vector<GridIndexType>, numGrids-1> lowDimGridVertexIndices_; -private: //! tuple to store the grids using Indices = std::make_index_sequence<numGrids>; template<std::size_t id> using GridViewPtr = std::shared_ptr<GridView<id>>; @@ -310,11 +310,6 @@ public: const Grid<id>& grid() const { return *std::get<id>(gridPtrTuple_); } - //! returns the i-th grid - template<std::size_t id> - Grid<id>& grid() - { return *std::get<id>(gridPtrTuple_); } - //! return a pointer to the grid data object std::shared_ptr<const GridData> getGridData() const { @@ -368,6 +363,12 @@ public: }); } +protected: + //! return non-const reference to i-th grid + template<std::size_t id> + Grid<id>& grid_() + { return *std::get<id>(gridPtrTuple_); } + private: //! Returns the filename extension of a given filename static std::string getFileExtension(const std::string& fileName) @@ -441,14 +442,12 @@ private: //! tuple to store the grids using Indices = std::make_index_sequence<numGrids>; using GridPtrTuple = typename makeFromIndexedType<std::tuple, GridPtr, Indices>::type; - protected: GridPtrTuple gridPtrTuple_; - private: + //! grid data, i.e. parameters and markers bool enableEntityMarkers_; std::shared_ptr<GridData> gridDataPtr_; - protected: //! data on embeddings std::shared_ptr<Embeddings> embeddingsPtr_; }; -- GitLab