From: Jiaxin Wang Date: Wed, 19 Sep 2018 08:49:05 +0000 (+0200) Subject: slight modification of step-30 X-Git-Tag: v9.1.0-rc1~553^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ae27b2b2130f8335b0cab775219a17b96b03d1f;p=dealii.git slight modification of step-30 The active cell selection rule doesn't work in 1D problems, but works by a slight modification. The point is, in a 1D problem, there are no actual sub-surfaces, a surface can not see any refined neighbor surfaces. The old selection rule would easily choose a non-active neighbor, but the new rule can avoid it. --- diff --git a/examples/step-30/step-30.cc b/examples/step-30/step-30.cc index b67f895e65..4e1b19f6aa 100644 --- a/examples/step-30/step-30.cc +++ b/examples/step-30/step-30.cc @@ -568,13 +568,13 @@ namespace Step30 // situation of our cell and the neighbor we want to treat // only one half, so that each face is considered only // once. Thus we have the additional condition, that the - // cell with the lower index does the work. In the rare - // case that both cells have the same index, the cell with - // lower level is selected. + // cell with the higher level does the work. In the rare + // case that both cells have the same level, the cell with + // lower index is selected. if (!cell->neighbor_is_coarser(face_no) && - (neighbor->index() > cell->index() || - (neighbor->level() < cell->level() && - neighbor->index() == cell->index()))) + (neighbor->level() < cell->level() || + (neighbor->index() > cell->index() && + neighbor->level() == cell->level()))) { // Here we know, that the neighbor is not coarser so we // can use the usual @p neighbor_of_neighbor