Commit 0d5f8e79 authored by Jonathan Youett's avatar Jonathan Youett

Add readBoundaryPatch for arbitrary patches and deprecate the levelview one

parent 75894c4f
......@@ -67,6 +67,7 @@ inline void readBitField(Dune::BitSetVector<ncomp>& field, int size, const std::
//! Read level boundarypatch from an AmiraMesh file. */
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,
const std::string& filename) {
/** \todo Not very memory efficient! */
......@@ -75,4 +76,16 @@ void readBoundaryPatch(BoundaryPatch<typename GridType::LevelGridView>& patch,
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment