Commit f7bb43b0 authored by Samuel Scherrer's avatar Samuel Scherrer Committed by Timo Koch
Browse files

[io][grid] Add GmshBoundaryFlag class in gridmanager_alu.hh

For gmsh we always want the intersection.boundarySegmentIndex as a
boundary flag, while for DGF file Alu grid needs to use the non-standard
intersection.impl().boundaryId().
parent 173a4a1d
......@@ -219,6 +219,28 @@ private:
int flag_;
};
template<class Grid>
class GmshBoundaryFlag
{
public:
GmshBoundaryFlag() : flag_(-1) {}
template<class Intersection>
GmshBoundaryFlag(const Intersection& i) : flag_(-1)
{
if (i.boundary())
flag_ = i.boundarySegmentIndex();
}
using value_type = std::size_t;
value_type get() const { return flag_; }
private:
value_type flag_;
};
#endif // DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
#endif // HAVE_DUNE_ALUGRID
......
Supports Markdown
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