* Exception
*/
DeclException0 (ExcInteriorQuadCantBeBoundary);
+ /**
+ * Exception
+ */
+ DeclException2 (ExcMultiplySetLineInfoOfLine,
+ int, int,
+ << "In SubCellData the line info of the line with vertex indices "
+ << arg1 << " and " << arg2 << " is multiply set.");
/**
* Exception
*/
};
};
- // Assert that only exterior lines
- // are given a boundary indicator
- if (! (line->boundary_indicator() == 0))
+ // assert that we only set
+ // boundary info once
+ if (line->boundary_indicator() != 0 &&
+ line->boundary_indicator() != 255)
{
// clear will only work if
// there are no
for (unsigned int i=0; i<n; ++i)
subscribe();
+ AssertThrow (false, ExcMultiplySetLineInfoOfLine(
+ line_vertices.first, line_vertices.second));
+ };
+
+ // Assert that only exterior lines
+ // are given a boundary indicator
+ if (line->boundary_indicator() == 255)
+ {
+ // same as above
+ const unsigned int n=n_subscriptions();
+ for (unsigned int i=0; i<n; ++i)
+ unsubscribe();
+ clear ();
+ for (unsigned int i=0; i<n; ++i)
+ subscribe();
+
AssertThrow (false, ExcInteriorLineCantBeBoundary());
};