From b446cdb320719261228abd654549cf4eec5de1b1 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 Apr 2001 15:44:38 +0000 Subject: [PATCH] Better diagnostics in case someone enters a line twice. git-svn-id: https://svn.dealii.org/branches/Branch-3-1@4365 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/grid/tria.h | 7 +++++++ deal.II/deal.II/source/grid/tria.cc | 23 ++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index 1769b4a9b0..33013365ed 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -2992,6 +2992,13 @@ class Triangulation : public TriaDimensionInfo, * 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 */ diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index d6e4040b6a..c08fa1f366 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -729,9 +729,10 @@ void Triangulation<2>::create_triangulation (const std::vector > &v, }; }; - // 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 @@ -750,6 +751,22 @@ void Triangulation<2>::create_triangulation (const std::vector > &v, for (unsigned int i=0; iboundary_indicator() == 255) + { + // same as above + const unsigned int n=n_subscriptions(); + for (unsigned int i=0; i