From 892c2d074e0ec8b6ab0b344d87739b4cf8f1b67b Mon Sep 17 00:00:00 2001 From: heister Date: Tue, 8 Apr 2014 13:46:39 +0000 Subject: [PATCH] undo r29864 that introduced (level-)subdomain checks in operator< for cell iterators. git-svn-id: https://svn.dealii.org/trunk@32734 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 11 +++++++++++ deal.II/include/deal.II/grid/tria_accessor.h | 10 ---------- .../deal.II/grid/tria_accessor.templates.h | 16 ---------------- deal.II/include/deal.II/grid/tria_iterator.h | 18 ++++++------------ 4 files changed, 17 insertions(+), 38 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index bcc902bd80..fa7393093a 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -148,6 +148,17 @@ inconvenience this causes.

Specific improvements

    + +
  1. Changed: operator< for cell iterators no longer looks at + (level-)subdomain ids but only compares level() and index(). This makes the + ordering inconsistent between processes on a + parallel::distributed::Triangulation, but fixes the problem that the + ordering of cells changes under mesh refinement or other causes for changing + the subdomain id. +
    + (Timo Heister, 2014/04/08) +
  2. +
  3. New: GridTools::laplace_transform() now takes an addition, optional parameter that indicates the "stiffness" of the mapping.
    diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index bdc95697c9..4a45fd4c5e 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -2865,16 +2865,6 @@ public: */ bool active () const; - /** - * Ordering of accessors. This function implements a total ordering - * of cells even on a parallel::distributed::Triangulation. This - * function first compares level_subdomain_id(). If these are equal, - * and both cells are active, it compares subdomain_id(). If this is - * inconclusive, TriaAccessorBase::operator < () is called. - */ - bool operator < (const CellAccessor &other) const; - - /** * Return whether this cell is owned by the current processor * or is owned by another processor. The function always returns diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index cdfd33e40a..341ba46d0b 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -2980,22 +2980,6 @@ CellAccessor::neighbor_face_no (const unsigned int neighbor) const } -template -inline -bool -CellAccessor::operator < (const CellAccessor &other) const -{ - Assert (this->tria == other.tria, TriaAccessorExceptions::ExcCantCompareIterators()); - - if (level_subdomain_id() != other.level_subdomain_id()) - return (level_subdomain_id() < other.level_subdomain_id()); - - if (active() && other.active() && - (subdomain_id() != other.subdomain_id())) - return (subdomain_id() < other.subdomain_id()); - - return TriaAccessorBase::operator < (other); -} diff --git a/deal.II/include/deal.II/grid/tria_iterator.h b/deal.II/include/deal.II/grid/tria_iterator.h index fc7beb902a..013cb00bcc 100644 --- a/deal.II/include/deal.II/grid/tria_iterator.h +++ b/deal.II/include/deal.II/grid/tria_iterator.h @@ -445,21 +445,13 @@ public: /** * Ordering relation for iterators. * - * This relation attempts a total ordering of cells. For lower - * dimensional objects on distributed meshes, we only attempt a - * partial ordering. + * This relation attempts a total ordering of cells. * * The relation is defined as follows: * * For objects of Accessor::structure_dimension < * Accessor::dimension, we simply compare the index of such an - * object. This consitutes an ordering of the elements of same - * dimension on a mesh on a single process. For a distributed mesh, - * the result of the ordering relation between faces across - * processes is not defined, but most likely irrelevant. - * - * For cells, there is a total ordering even in a - * distributed::parallel::Triangulation. The ordering is lexicographic + * object. The ordering is lexicographic * according to the following hierarchy (in the sense, that the next * test is only applied if the previous was inconclusive): * @@ -468,11 +460,13 @@ public: * past-the-end iterators rank the same, thus false is returned in * that case.
  4. * - *
  5. The level subdomain id
  6. - *
  7. If both cells are active, the subdomain id.
  8. *
  9. The level of the cell.
  10. *
  11. The index of a cell inside the level.
  12. *
+ * + * @Note: the ordering is not consistent between different processor in + * a parallel::distributed::Triangulation because we rely on index(), + * which is likely not the same. */ bool operator < (const TriaRawIterator &) const; -- 2.39.5