From: Wolfgang Bangerth Date: Thu, 13 Nov 2008 15:12:36 +0000 (+0000) Subject: Remove a test that used a particular mesh that can't be reproduced any more after... X-Git-Tag: v8.0.0~8386 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ea24ce68a4878d40142678bec7740f68bac13ce;p=dealii.git Remove a test that used a particular mesh that can't be reproduced any more after a later fix. git-svn-id: https://svn.dealii.org/trunk@17568 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/mesh_smoothing_01.cc b/tests/deal.II/mesh_smoothing_01.cc deleted file mode 100644 index 9e4b6467e6..0000000000 --- a/tests/deal.II/mesh_smoothing_01.cc +++ /dev/null @@ -1,225 +0,0 @@ -//---------------------------- mesh_smoothing_01.cc --------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2006, 2007, 2008 by the deal.II authors -// -// This file is subject to QPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. -// -//---------------------------- mesh_smoothing_01.cc --------------------------- - - -// something went wrong with smoothing a mesh when a particular set of -// cells were set to be refined. found in step-31 -// -// a redux is in mesh_smoothing_02 - - -char logname[] = "mesh_smoothing_01/output"; - - -#include "../tests.h" - - -#include -#include -#include -#include -#include - -#include -#include -#include - - - // Finally, this is as in previous - // programs: -using namespace dealii; - - - -template -bool cell_is_patch_level_1 (const typename Triangulation::cell_iterator &cell) -{ - Assert (cell->active() == false, ExcInternalError()); - - unsigned int n_active_children = 0; - for (unsigned int i=0; in_children(); ++i) - if (cell->child(i)->active()) - ++n_active_children; - - return (n_active_children == 0) || (n_active_children == cell->n_children()); -} - - -void test () -{ - Triangulation<2> triangulation (Triangulation<2>::maximum_smoothing); - GridGenerator::hyper_cube (triangulation); - triangulation.refine_global (3); - - const char *refinement_flags[] - = - { - "1010222211110211222222220211211111111111111111111111111111111111", - "1212111111111111111111111111111111111111222222222222222211111111111111111101102201110210012211112001111111111111111111111111111111111111", - "1111111111111111111111111111111111111111111111111121111111111111111111111111111111111111111111111111111211111111111111111111111111021121222222221112112022222222021222011111111102102021111111111111110210102222111102121111111111211111222201012021111111111111", - "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110112211111111112111110222222222222022202211212222210111111111111111121111111111221101111202221210222222222022222222220011222211111111222111111111111111112212111111112222000111111111111111111111112210022222021222221011220211111111111111111122111122220120222220212220011111111111", - "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111121111111111111111111111111111111111211111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100110011111111111111111111100010100000000000000001101010100000101000001101111100001000000011010000000011111111111111111010000000000001111111111111111111111111111111111111111110001100111111111111111111100000000000001111111111111111000001010010000000000000010100100100111100000101111111100100000000000101000001010000000011111111000101111111111110110010111111110000000011111111111111111111110011111111111110000000000000000001111100001111101000001111000010000010000011111111111111111100111100000000001000001111111101001111111100000100000000001111010111110000000111111111" - }; - const unsigned int n_refinement_steps = sizeof(refinement_flags) / - sizeof(refinement_flags[0]); - - for (unsigned int i=0; i::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (refinement_flags[i][index] == '2') - cell->set_refine_flag(); - else if (refinement_flags[i][index] == '1') - cell->set_coarsen_flag(); - - triangulation.prepare_coarsening_and_refinement (); - - // at this point, of course the - // mesh needs to be - // patch_level_1, but the flags - // also need to be set in such - // a way that it preserves - // patch_level_1. check - // this. the reason that the - // test failed is because flags - // were incorrectly set, - // resulting in a mesh that - // wasn't patch_level_1, and we - // got an assertion in the next - // call to prepare_c_and_r - // after setting flags next - // time around - for (Triangulation<2>::cell_iterator - cell = triangulation.begin(); - cell != triangulation.end(); ++cell) - if (!cell->active()) - { - unsigned int n_active_children = 0; - for (unsigned int i=0; in_children(); ++i) - if (cell->child(i)->active()) - ++n_active_children; - - Assert ((n_active_children == 0) || (n_active_children == cell->n_children()), - ExcInternalError()); - - // if there are no active - // children, then nothing - // to do here - if (n_active_children == 0) - continue; - - // otherwise: all - // children are - // active. patch_level_1 - // then means that either - // all of them need to be - // flagged for - // refinement, or - // none. check that this - // is so by making sure - // that they all have the - // same flags as child(0) - for (unsigned int i=1; in_children(); ++i) - Assert(cell->child(i)->refine_flag_set() - == - cell->child(0)->refine_flag_set(), - ExcInternalError()); - } - - for (Triangulation<2>::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) - if (cell->coarsen_flag_set ()) - deallog << "Coarsen flag set: " << cell - << std::endl; - - - triangulation.execute_coarsening_and_refinement (); - - // and at this point, the - // mesh still needs to be - // patch_level_1, but no flags - // should remain set - for (Triangulation<2>::cell_iterator - cell = triangulation.begin(); - cell != triangulation.end(); ++cell) - { - Assert ((cell->refine_flag_set() == false) - && - (cell->coarsen_flag_set() == false), - ExcInternalError()); - if (!cell->active()) - Assert (cell_is_patch_level_1<2>(cell), - ExcInternalError()); - } - - - deallog << triangulation.n_active_cells() - << " (on " - << triangulation.n_levels() - << " levels)" - << std::endl; - } - - deallog << "OK" << std::endl; -} - - - -int main () -{ - std::ofstream logfile(logname); - logfile.precision (3); - - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - try - { - test(); - } - catch (std::exception &exc) - { - std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; - std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - - return 1; - } - catch (...) - { - std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; - std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - return 1; - } - - return 0; -} diff --git a/tests/deal.II/mesh_smoothing_01/cmp/generic b/tests/deal.II/mesh_smoothing_01/cmp/generic deleted file mode 100644 index 861839f80f..0000000000 --- a/tests/deal.II/mesh_smoothing_01/cmp/generic +++ /dev/null @@ -1,215 +0,0 @@ - -DEAL::136 (on 5 levels) -DEAL::256 (on 6 levels) -DEAL::520 (on 7 levels) -DEAL::1120 (on 8 levels) -DEAL::Coarsen flag set: 5.208 -DEAL::Coarsen flag set: 5.209 -DEAL::Coarsen flag set: 5.210 -DEAL::Coarsen flag set: 5.211 -DEAL::Coarsen flag set: 5.212 -DEAL::Coarsen flag set: 5.213 -DEAL::Coarsen flag set: 5.214 -DEAL::Coarsen flag set: 5.215 -DEAL::Coarsen flag set: 5.216 -DEAL::Coarsen flag set: 5.217 -DEAL::Coarsen flag set: 5.218 -DEAL::Coarsen flag set: 5.219 -DEAL::Coarsen flag set: 5.220 -DEAL::Coarsen flag set: 5.221 -DEAL::Coarsen flag set: 5.222 -DEAL::Coarsen flag set: 5.223 -DEAL::Coarsen flag set: 6.288 -DEAL::Coarsen flag set: 6.289 -DEAL::Coarsen flag set: 6.290 -DEAL::Coarsen flag set: 6.291 -DEAL::Coarsen flag set: 6.292 -DEAL::Coarsen flag set: 6.293 -DEAL::Coarsen flag set: 6.294 -DEAL::Coarsen flag set: 6.295 -DEAL::Coarsen flag set: 6.296 -DEAL::Coarsen flag set: 6.297 -DEAL::Coarsen flag set: 6.298 -DEAL::Coarsen flag set: 6.299 -DEAL::Coarsen flag set: 6.300 -DEAL::Coarsen flag set: 6.301 -DEAL::Coarsen flag set: 6.302 -DEAL::Coarsen flag set: 6.303 -DEAL::Coarsen flag set: 6.320 -DEAL::Coarsen flag set: 6.321 -DEAL::Coarsen flag set: 6.322 -DEAL::Coarsen flag set: 6.323 -DEAL::Coarsen flag set: 6.324 -DEAL::Coarsen flag set: 6.325 -DEAL::Coarsen flag set: 6.326 -DEAL::Coarsen flag set: 6.327 -DEAL::Coarsen flag set: 6.328 -DEAL::Coarsen flag set: 6.329 -DEAL::Coarsen flag set: 6.330 -DEAL::Coarsen flag set: 6.331 -DEAL::Coarsen flag set: 6.332 -DEAL::Coarsen flag set: 6.333 -DEAL::Coarsen flag set: 6.334 -DEAL::Coarsen flag set: 6.335 -DEAL::Coarsen flag set: 6.336 -DEAL::Coarsen flag set: 6.337 -DEAL::Coarsen flag set: 6.338 -DEAL::Coarsen flag set: 6.339 -DEAL::Coarsen flag set: 6.340 -DEAL::Coarsen flag set: 6.341 -DEAL::Coarsen flag set: 6.342 -DEAL::Coarsen flag set: 6.343 -DEAL::Coarsen flag set: 6.344 -DEAL::Coarsen flag set: 6.345 -DEAL::Coarsen flag set: 6.346 -DEAL::Coarsen flag set: 6.347 -DEAL::Coarsen flag set: 6.348 -DEAL::Coarsen flag set: 6.349 -DEAL::Coarsen flag set: 6.350 -DEAL::Coarsen flag set: 6.351 -DEAL::Coarsen flag set: 6.368 -DEAL::Coarsen flag set: 6.369 -DEAL::Coarsen flag set: 6.370 -DEAL::Coarsen flag set: 6.371 -DEAL::Coarsen flag set: 6.372 -DEAL::Coarsen flag set: 6.373 -DEAL::Coarsen flag set: 6.374 -DEAL::Coarsen flag set: 6.375 -DEAL::Coarsen flag set: 6.376 -DEAL::Coarsen flag set: 6.377 -DEAL::Coarsen flag set: 6.378 -DEAL::Coarsen flag set: 6.379 -DEAL::Coarsen flag set: 6.380 -DEAL::Coarsen flag set: 6.381 -DEAL::Coarsen flag set: 6.382 -DEAL::Coarsen flag set: 6.383 -DEAL::Coarsen flag set: 6.384 -DEAL::Coarsen flag set: 6.385 -DEAL::Coarsen flag set: 6.386 -DEAL::Coarsen flag set: 6.387 -DEAL::Coarsen flag set: 6.388 -DEAL::Coarsen flag set: 6.389 -DEAL::Coarsen flag set: 6.390 -DEAL::Coarsen flag set: 6.391 -DEAL::Coarsen flag set: 6.392 -DEAL::Coarsen flag set: 6.393 -DEAL::Coarsen flag set: 6.394 -DEAL::Coarsen flag set: 6.395 -DEAL::Coarsen flag set: 6.396 -DEAL::Coarsen flag set: 6.397 -DEAL::Coarsen flag set: 6.398 -DEAL::Coarsen flag set: 6.399 -DEAL::Coarsen flag set: 6.432 -DEAL::Coarsen flag set: 6.433 -DEAL::Coarsen flag set: 6.434 -DEAL::Coarsen flag set: 6.435 -DEAL::Coarsen flag set: 6.436 -DEAL::Coarsen flag set: 6.437 -DEAL::Coarsen flag set: 6.438 -DEAL::Coarsen flag set: 6.439 -DEAL::Coarsen flag set: 6.440 -DEAL::Coarsen flag set: 6.441 -DEAL::Coarsen flag set: 6.442 -DEAL::Coarsen flag set: 6.443 -DEAL::Coarsen flag set: 6.444 -DEAL::Coarsen flag set: 6.445 -DEAL::Coarsen flag set: 6.446 -DEAL::Coarsen flag set: 6.447 -DEAL::Coarsen flag set: 7.16 -DEAL::Coarsen flag set: 7.17 -DEAL::Coarsen flag set: 7.18 -DEAL::Coarsen flag set: 7.19 -DEAL::Coarsen flag set: 7.20 -DEAL::Coarsen flag set: 7.21 -DEAL::Coarsen flag set: 7.22 -DEAL::Coarsen flag set: 7.23 -DEAL::Coarsen flag set: 7.24 -DEAL::Coarsen flag set: 7.25 -DEAL::Coarsen flag set: 7.26 -DEAL::Coarsen flag set: 7.27 -DEAL::Coarsen flag set: 7.28 -DEAL::Coarsen flag set: 7.29 -DEAL::Coarsen flag set: 7.30 -DEAL::Coarsen flag set: 7.31 -DEAL::Coarsen flag set: 7.112 -DEAL::Coarsen flag set: 7.113 -DEAL::Coarsen flag set: 7.114 -DEAL::Coarsen flag set: 7.115 -DEAL::Coarsen flag set: 7.116 -DEAL::Coarsen flag set: 7.117 -DEAL::Coarsen flag set: 7.118 -DEAL::Coarsen flag set: 7.119 -DEAL::Coarsen flag set: 7.120 -DEAL::Coarsen flag set: 7.121 -DEAL::Coarsen flag set: 7.122 -DEAL::Coarsen flag set: 7.123 -DEAL::Coarsen flag set: 7.124 -DEAL::Coarsen flag set: 7.125 -DEAL::Coarsen flag set: 7.126 -DEAL::Coarsen flag set: 7.127 -DEAL::Coarsen flag set: 7.144 -DEAL::Coarsen flag set: 7.145 -DEAL::Coarsen flag set: 7.146 -DEAL::Coarsen flag set: 7.147 -DEAL::Coarsen flag set: 7.148 -DEAL::Coarsen flag set: 7.149 -DEAL::Coarsen flag set: 7.150 -DEAL::Coarsen flag set: 7.151 -DEAL::Coarsen flag set: 7.152 -DEAL::Coarsen flag set: 7.153 -DEAL::Coarsen flag set: 7.154 -DEAL::Coarsen flag set: 7.155 -DEAL::Coarsen flag set: 7.156 -DEAL::Coarsen flag set: 7.157 -DEAL::Coarsen flag set: 7.158 -DEAL::Coarsen flag set: 7.159 -DEAL::Coarsen flag set: 7.160 -DEAL::Coarsen flag set: 7.161 -DEAL::Coarsen flag set: 7.162 -DEAL::Coarsen flag set: 7.163 -DEAL::Coarsen flag set: 7.164 -DEAL::Coarsen flag set: 7.165 -DEAL::Coarsen flag set: 7.166 -DEAL::Coarsen flag set: 7.167 -DEAL::Coarsen flag set: 7.168 -DEAL::Coarsen flag set: 7.169 -DEAL::Coarsen flag set: 7.170 -DEAL::Coarsen flag set: 7.171 -DEAL::Coarsen flag set: 7.172 -DEAL::Coarsen flag set: 7.173 -DEAL::Coarsen flag set: 7.174 -DEAL::Coarsen flag set: 7.175 -DEAL::Coarsen flag set: 7.192 -DEAL::Coarsen flag set: 7.193 -DEAL::Coarsen flag set: 7.194 -DEAL::Coarsen flag set: 7.195 -DEAL::Coarsen flag set: 7.196 -DEAL::Coarsen flag set: 7.197 -DEAL::Coarsen flag set: 7.198 -DEAL::Coarsen flag set: 7.199 -DEAL::Coarsen flag set: 7.200 -DEAL::Coarsen flag set: 7.201 -DEAL::Coarsen flag set: 7.202 -DEAL::Coarsen flag set: 7.203 -DEAL::Coarsen flag set: 7.204 -DEAL::Coarsen flag set: 7.205 -DEAL::Coarsen flag set: 7.206 -DEAL::Coarsen flag set: 7.207 -DEAL::Coarsen flag set: 7.224 -DEAL::Coarsen flag set: 7.225 -DEAL::Coarsen flag set: 7.226 -DEAL::Coarsen flag set: 7.227 -DEAL::Coarsen flag set: 7.228 -DEAL::Coarsen flag set: 7.229 -DEAL::Coarsen flag set: 7.230 -DEAL::Coarsen flag set: 7.231 -DEAL::Coarsen flag set: 7.232 -DEAL::Coarsen flag set: 7.233 -DEAL::Coarsen flag set: 7.234 -DEAL::Coarsen flag set: 7.235 -DEAL::Coarsen flag set: 7.236 -DEAL::Coarsen flag set: 7.237 -DEAL::Coarsen flag set: 7.238 -DEAL::Coarsen flag set: 7.239 -DEAL::988 (on 8 levels) -DEAL::OK diff --git a/tests/deal.II/mesh_smoothing_02.cc b/tests/deal.II/mesh_smoothing_02.cc index 482734e1b5..19fccb7b6f 100644 --- a/tests/deal.II/mesh_smoothing_02.cc +++ b/tests/deal.II/mesh_smoothing_02.cc @@ -12,8 +12,10 @@ //---------------------------- mesh_smoothing_02.cc --------------------------- -// a redux of mesh_smoothing_01: when we have patch_level_1 set, and if we -// have a mesh like this: +// a redux of mesh_smoothing_01 (since deleted since it used a list of +// refinement flags for one particular mesh that after a later fix +// cannot be reproduced any more in exactly this way): when we have +// patch_level_1 set, and if we have a mesh like this: // // *-*-*-*-*---*---* // *-*-*-*-* | |