]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a problem with an assertion that is not valid as it was. the
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 09:07:57 +0000 (09:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 09:07:57 +0000 (09:07 +0000)
problem was that we checked at one of the first steps of the main loop
in prepare_* whether the level difference of cells at one vertex was
greater than two which we considered an error; this is not true in
some cases, namely in the first loop in which the condition that no
double refinement at each line is allowed is only enforced in step 4
so we can't rely on that in step 1 or 2 and therefore the assertion
may be violated even though no error is present.

git-svn-id: https://svn.dealii.org/trunk@1433 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index f29b4f2e85e9c38901264d2abfc9deb5e08185e0..5f26140bf3311e780a2ccf3dec294a0296d3b52e 100644 (file)
@@ -25,7 +25,6 @@ const StraightBoundary<dim>& Triangulation<dim>::straight_boundary
 
 
 
-
 template <int dim>
 Triangulation<dim>::Triangulation (const MeshSmoothing smooth_grid) :
                Subscriptor (),
@@ -6384,14 +6383,6 @@ bool Triangulation<dim>::prepare_coarsening_and_refinement () {
                if (vertex_level[cell->vertex_index(vertex)] >
                    cell->level()+1)
                  {
-                                                    // if we did not make an
-                                                    // error, the level diff
-                                                    // should not be more than
-                                                    // two
-                   Assert (vertex_level[cell->vertex_index(vertex)] ==
-                           cell->level()+2,
-                           ExcInternalError());
-
                                                     // refine cell and
                                                     // update vertex levels
                    cell->clear_coarsen_flag();
@@ -6405,21 +6396,7 @@ bool Triangulation<dim>::prepare_coarsening_and_refinement () {
 
                                                     // now that we fixed this cell,
                                                     // we can safely leave this
-                                                    // inner loop. however, we check
-                                                    // the remaining vertices before
-                                                    // leaving. note that since
-                                                    // we flagged this cell, 
-                                                    // vertex_level might be up to
-                                                    // three levels higher than this
-                                                    // cell
-                   for (unsigned int v=vertex+1; v<GeometryInfo<dim>::vertices_per_cell;
-                        ++v)
-                     Assert (vertex_level[cell->vertex_index(v)]
-                             <=
-                             cell->level()+3,
-                             ExcInternalError());
-                   
-                                                    // next cell
+                                                    // inner loop.
                    break;
                  };      
        };

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.