Skip to content
Snippets Groups Projects
Commit 0d5f8e79 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Add readBoundaryPatch for arbitrary patches and deprecate the levelview one

parent 75894c4f
Branches
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ inline void readBitField(Dune::BitSetVector<ncomp>& field, int size, const std:: ...@@ -67,6 +67,7 @@ inline void readBitField(Dune::BitSetVector<ncomp>& field, int size, const std::
//! Read level boundarypatch from an AmiraMesh file. */ //! Read level boundarypatch from an AmiraMesh file. */
template <class GridType> template <class GridType>
DUNE_DEPRECATED_MSG("This method is deprecated. Please use the version with GridView as template.")
void readBoundaryPatch(BoundaryPatch<typename GridType::LevelGridView>& patch, void readBoundaryPatch(BoundaryPatch<typename GridType::LevelGridView>& patch,
const std::string& filename) { const std::string& filename) {
/** \todo Not very memory efficient! */ /** \todo Not very memory efficient! */
...@@ -75,4 +76,16 @@ void readBoundaryPatch(BoundaryPatch<typename GridType::LevelGridView>& patch, ...@@ -75,4 +76,16 @@ void readBoundaryPatch(BoundaryPatch<typename GridType::LevelGridView>& patch,
patch.setup(patch.gridView(), vertices); patch.setup(patch.gridView(), vertices);
} }
//! Read level boundarypatch from an AmiraMesh file. */
template <class GridView>
void readBoundaryPatch(BoundaryPatch<GridView>& patch,
const std::string& filename) {
/** \todo Not very memory efficient! */
Dune::BitSetVector<1> vertices(patch.gridView().size(GridView::dimension), false);
readBitField(vertices, vertices.size(), filename);
patch.setup(patch.gridView(), vertices);
}
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment