Skip to content
Snippets Groups Projects
Commit 0429eaad authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[facet][couplingmanager] provide non-const return for grid in protected scope

parent fa114acb
No related branches found
No related tags found
1 merge request!1545Some fixes for coupling moving meshes.
...@@ -251,6 +251,7 @@ public: ...@@ -251,6 +251,7 @@ public:
if (id > bulkGridId) if (id > bulkGridId)
lowDimGridVertexIndices_[id-1] = std::move(lowDimGridVertexIndices); lowDimGridVertexIndices_[id-1] = std::move(lowDimGridVertexIndices);
} }
private:
//! data on connectivity between the grids //! data on connectivity between the grids
std::array<EmbedmentMap, numGrids> embeddedEntityMaps_; std::array<EmbedmentMap, numGrids> embeddedEntityMaps_;
std::array<EmbedmentMap, numGrids> adjoinedEntityMaps_; std::array<EmbedmentMap, numGrids> adjoinedEntityMaps_;
...@@ -258,7 +259,6 @@ public: ...@@ -258,7 +259,6 @@ public:
//! Contains the hierarchy insertion indices that make up a lower-dimensional grid //! Contains the hierarchy insertion indices that make up a lower-dimensional grid
std::array<std::vector<GridIndexType>, numGrids-1> lowDimGridVertexIndices_; std::array<std::vector<GridIndexType>, numGrids-1> lowDimGridVertexIndices_;
private:
//! tuple to store the grids //! tuple to store the grids
using Indices = std::make_index_sequence<numGrids>; using Indices = std::make_index_sequence<numGrids>;
template<std::size_t id> using GridViewPtr = std::shared_ptr<GridView<id>>; template<std::size_t id> using GridViewPtr = std::shared_ptr<GridView<id>>;
...@@ -310,11 +310,6 @@ public: ...@@ -310,11 +310,6 @@ public:
const Grid<id>& grid() const const Grid<id>& grid() const
{ return *std::get<id>(gridPtrTuple_); } { 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 //! return a pointer to the grid data object
std::shared_ptr<const GridData> getGridData() const std::shared_ptr<const GridData> getGridData() const
{ {
...@@ -368,6 +363,12 @@ public: ...@@ -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: private:
//! Returns the filename extension of a given filename //! Returns the filename extension of a given filename
static std::string getFileExtension(const std::string& fileName) static std::string getFileExtension(const std::string& fileName)
...@@ -441,14 +442,12 @@ private: ...@@ -441,14 +442,12 @@ private:
//! tuple to store the grids //! tuple to store the grids
using Indices = std::make_index_sequence<numGrids>; using Indices = std::make_index_sequence<numGrids>;
using GridPtrTuple = typename makeFromIndexedType<std::tuple, GridPtr, Indices>::type; using GridPtrTuple = typename makeFromIndexedType<std::tuple, GridPtr, Indices>::type;
protected:
GridPtrTuple gridPtrTuple_; GridPtrTuple gridPtrTuple_;
private:
//! grid data, i.e. parameters and markers //! grid data, i.e. parameters and markers
bool enableEntityMarkers_; bool enableEntityMarkers_;
std::shared_ptr<GridData> gridDataPtr_; std::shared_ptr<GridData> gridDataPtr_;
protected:
//! data on embeddings //! data on embeddings
std::shared_ptr<Embeddings> embeddingsPtr_; std::shared_ptr<Embeddings> embeddingsPtr_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment