]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Modify the definition of CellId 8567/head
authorpeterrum <peterrmuench@gmail.com>
Wed, 14 Aug 2019 02:20:17 +0000 (04:20 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 20 Aug 2019 05:35:49 +0000 (07:35 +0200)
Conflicts:
include/deal.II/grid/tria.h

doc/news/changes/minor/20190813PeterMunch [new file with mode: 0644]
include/deal.II/grid/tria.h
source/grid/cell_id.cc
source/grid/tria_accessor.cc

diff --git a/doc/news/changes/minor/20190813PeterMunch b/doc/news/changes/minor/20190813PeterMunch
new file mode 100644 (file)
index 0000000..85229cd
--- /dev/null
@@ -0,0 +1,4 @@
+New: The definition of CellID has been modified so that it depends on the 
+unique coarse-cell id and no longer on the coarse-cell index.
+<br>
+(Peter Munch, 2019/08/13)
index 65826ba89ac3e395c578c234dbd212eb5d09218c..0c140e52ce8ef5d40e6cf3ba7cd7dfc33ad8467a 100644 (file)
@@ -3502,7 +3502,7 @@ public:
    * Translate the index of coarse cell to its unique id.
    *
    * @note: See the note of the method
-   * translate_coarse_cell_id_to_coarse_cell_index().
+   * coarse_cell_id_to_coarse_cell_index().
    *
    * @param coarse_cell_index Index of the coarse cell.
    * @return Id of the coarse cell.
index ff5c3d5548b6436c355ad65a0585b7f9926990e9..28c4b8206c42e1ce13423f706519607cd445c32c 100644 (file)
@@ -158,9 +158,8 @@ template <int dim, int spacedim>
 typename Triangulation<dim, spacedim>::cell_iterator
 CellId::to_cell(const Triangulation<dim, spacedim> &tria) const
 {
-  typename Triangulation<dim, spacedim>::cell_iterator cell(&tria,
-                                                            0,
-                                                            coarse_cell_id);
+  typename Triangulation<dim, spacedim>::cell_iterator cell(
+    &tria, 0, tria.coarse_cell_id_to_coarse_cell_index(coarse_cell_id));
 
   for (unsigned int i = 0; i < n_child_indices; ++i)
     cell = cell->child(static_cast<unsigned int>(child_indices[i]));
index 80579e6e84a1987bc51598a9571f9608847850d4..290917877cd4cddc5280a3333fe5e2aa0d0ad9a9 100644 (file)
@@ -2179,7 +2179,9 @@ CellAccessor<dim, spacedim>::id() const
   Assert(ptr.level() == 0, ExcInternalError());
   const unsigned int coarse_index = ptr.index();
 
-  return {coarse_index, n_child_indices, id.data()};
+  return {this->tria->coarse_cell_index_to_coarse_cell_id(coarse_index),
+          n_child_indices,
+          id.data()};
 }
 
 

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.