25 #ifndef EWOMS_FRACTURE_MAPPER_HH
26 #define EWOMS_FRACTURE_MAPPER_HH
39 template <
class TypeTag>
44 FractureEdge(
int edgeVertex1Idx,
int edgeVertex2Idx)
45 : i_(std::min(edgeVertex1Idx, edgeVertex2Idx)),
46 j_(std::max(edgeVertex1Idx, edgeVertex2Idx))
49 bool operator<(
const FractureEdge &e)
const
50 {
return i_ < e.i_ || (i_ == e.i_ && j_ < e.j_); }
52 bool operator==(
const FractureEdge &e)
const
53 {
return i_ == e.i_ && j_ == e.j_; }
74 fractureEdges_.insert(FractureEdge(vertexIdx1, vertexIdx2));
75 fractureVertices_.insert(vertexIdx1);
76 fractureVertices_.insert(vertexIdx2);
85 {
return fractureVertices_.count(vertexIdx) > 0; }
95 FractureEdge tmp(vertex1Idx, vertex2Idx);
96 return fractureEdges_.count(tmp) > 0;
100 std::set<FractureEdge> fractureEdges_;
101 std::set<unsigned> fractureVertices_;
106 #endif // EWOMS_FRACTURE_MAPPER_HH
Stores the topology of fractures.
Definition: fracturemapper.hh:40
FractureMapper()
Constructor.
Definition: fracturemapper.hh:63
void addFractureEdge(int vertexIdx1, int vertexIdx2)
Marks an edge as having a fracture.
Definition: fracturemapper.hh:72
Definition: baseauxiliarymodule.hh:35
Provides the magic behind the eWoms property system.
bool isFractureEdge(unsigned vertex1Idx, unsigned vertex2Idx) const
Returns true iff a fracture is associated with a given edge.
Definition: fracturemapper.hh:93
bool isFractureVertex(unsigned vertexIdx) const
Returns true iff a fracture cuts through a given vertex.
Definition: fracturemapper.hh:84