]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
undo r29864 that introduced (level-)subdomain checks in operator< for cell iterators.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Apr 2014 13:46:39 +0000 (13:46 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Apr 2014 13:46:39 +0000 (13:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@32734 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/grid/tria_accessor.h
deal.II/include/deal.II/grid/tria_accessor.templates.h
deal.II/include/deal.II/grid/tria_iterator.h

index bcc902bd802195f2738957103ea95487e97141ea..fa7393093a87591a37222a30cf9d62a08c281b08 100644 (file)
@@ -148,6 +148,17 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+
+  <li> 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.
+  <br>
+  (Timo Heister, 2014/04/08)
+  </li>
+  
   <li> New: GridTools::laplace_transform() now takes an addition, optional
   parameter that indicates the "stiffness" of the mapping.
   <br>
index bdc95697c9e58702ff059890b52f6af9ae44dfda..4a45fd4c5e2660546390ade10737c2575dd40b41 100644 (file)
@@ -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<dim, spacedim> &other) const;
-
-
   /**
    * Return whether this cell is owned by the current processor
    * or is owned by another processor. The function always returns
index cdfd33e40a0c4943800bb39669154a8d18d6c168..341ba46d0b69e0103f21239138c4429461177e62 100644 (file)
@@ -2980,22 +2980,6 @@ CellAccessor<dim,spacedim>::neighbor_face_no (const unsigned int neighbor) const
 }
 
 
-template <int dim, int spacedim>
-inline
-bool
-CellAccessor<dim,spacedim>::operator < (const CellAccessor<dim,spacedim> &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<dim,dim,spacedim>::operator < (other);
-}
 
 
 
index fc7beb902a80a4f18d14f7f0778f65027c94c287..013cb00bcc1bc70c1a503a102e489e8eb328fc89 100644 (file)
@@ -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 <tt>Accessor::structure_dimension <
    * Accessor::dimension</tt>, 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.</li>
    *
-   * <li> The level subdomain id</li>
-   * <li> If both cells are active, the subdomain id.</li>
    * <li> The level of the cell.</li>
    * <li> The index of a cell inside the level.</li>
    * </ol>
+   *
+   * @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;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.