face_orientation_crash \
refine_and_coarsen_* \
tria_crash_* \
- face_orientation_*
+ face_orientation_* \
+ max_n_cells_*
# tests for the hp branch:
# fe_collection_*
--- /dev/null
+//---------------------------- max_n_cells_01.cc ---------------------------
+// $Id: max_n_cells_01.cc 12193 2006-01-27 15:57:34Z wolf $
+// Version: $Name$
+//
+// Copyright (C) 2007 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.
+//
+//---------------------------- max_n_cells_01.cc ---------------------------
+
+// test the max_n_cells argument to GridRefinement::refine_and_coarsen_fixed_number
+
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <lac/vector.h>
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_boundary_lib.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_refinement.h>
+#include <grid/grid_out.h>
+
+#include <fstream>
+#include <iostream>
+
+
+
+template <int dim>
+void test ()
+{
+ Triangulation<dim> tria;
+ GridGenerator::hyper_cube (tria);
+ tria.refine_global(2);
+
+ for (unsigned int cycle=0; cycle<7*(4-dim)*(4-dim); ++cycle)
+ {
+ deallog << "cycle=" << cycle << ", n_cells=" << tria.n_active_cells() << std::endl;
+
+ Vector<float> criteria (tria.n_active_cells());
+ for (unsigned int i=0; i<tria.n_active_cells(); ++i)
+ criteria(i) = i;
+
+ GridRefinement::refine_and_coarsen_fixed_number (tria,
+ criteria,
+ 0.3, 0.03,
+ 10000);
+ tria.execute_coarsening_and_refinement();
+ }
+}
+
+
+
+int main ()
+{
+ std::ofstream logfile("max_n_cells_01/output");
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+
+ test<1> ();
+ test<2> ();
+ test<3> ();
+}
--- /dev/null
+
+DEAL::cycle=0, n_cells=4
+DEAL::cycle=1, n_cells=6
+DEAL::cycle=2, n_cells=8
+DEAL::cycle=3, n_cells=11
+DEAL::cycle=4, n_cells=15
+DEAL::cycle=5, n_cells=20
+DEAL::cycle=6, n_cells=26
+DEAL::cycle=7, n_cells=34
+DEAL::cycle=8, n_cells=45
+DEAL::cycle=9, n_cells=59
+DEAL::cycle=10, n_cells=77
+DEAL::cycle=11, n_cells=100
+DEAL::cycle=12, n_cells=130
+DEAL::cycle=13, n_cells=168
+DEAL::cycle=14, n_cells=218
+DEAL::cycle=15, n_cells=282
+DEAL::cycle=16, n_cells=366
+DEAL::cycle=17, n_cells=473
+DEAL::cycle=18, n_cells=611
+DEAL::cycle=19, n_cells=789
+DEAL::cycle=20, n_cells=1018
+DEAL::cycle=21, n_cells=1313
+DEAL::cycle=22, n_cells=1691
+DEAL::cycle=23, n_cells=2180
+DEAL::cycle=24, n_cells=2807
+DEAL::cycle=25, n_cells=3613
+DEAL::cycle=26, n_cells=4650
+DEAL::cycle=27, n_cells=5983
+DEAL::cycle=28, n_cells=7695
+DEAL::cycle=29, n_cells=9896
+DEAL::cycle=30, n_cells=10006
+DEAL::cycle=31, n_cells=10005
+DEAL::cycle=32, n_cells=10005
+DEAL::cycle=33, n_cells=10005
+DEAL::cycle=34, n_cells=10005
+DEAL::cycle=35, n_cells=10005
+DEAL::cycle=36, n_cells=10005
+DEAL::cycle=37, n_cells=10005
+DEAL::cycle=38, n_cells=10005
+DEAL::cycle=39, n_cells=10005
+DEAL::cycle=40, n_cells=10005
+DEAL::cycle=41, n_cells=10005
+DEAL::cycle=42, n_cells=10005
+DEAL::cycle=43, n_cells=10005
+DEAL::cycle=44, n_cells=10005
+DEAL::cycle=45, n_cells=10005
+DEAL::cycle=46, n_cells=10005
+DEAL::cycle=47, n_cells=10005
+DEAL::cycle=48, n_cells=10005
+DEAL::cycle=49, n_cells=10005
+DEAL::cycle=50, n_cells=10005
+DEAL::cycle=51, n_cells=10005
+DEAL::cycle=52, n_cells=10005
+DEAL::cycle=53, n_cells=10005
+DEAL::cycle=54, n_cells=10005
+DEAL::cycle=55, n_cells=10005
+DEAL::cycle=56, n_cells=10005
+DEAL::cycle=57, n_cells=10005
+DEAL::cycle=58, n_cells=10005
+DEAL::cycle=59, n_cells=10005
+DEAL::cycle=60, n_cells=10005
+DEAL::cycle=61, n_cells=10005
+DEAL::cycle=62, n_cells=10005
+DEAL::cycle=0, n_cells=16
+DEAL::cycle=1, n_cells=31
+DEAL::cycle=2, n_cells=61
+DEAL::cycle=3, n_cells=118
+DEAL::cycle=4, n_cells=226
+DEAL::cycle=5, n_cells=433
+DEAL::cycle=6, n_cells=829
+DEAL::cycle=7, n_cells=1588
+DEAL::cycle=8, n_cells=3022
+DEAL::cycle=9, n_cells=5734
+DEAL::cycle=10, n_cells=10057
+DEAL::cycle=11, n_cells=10048
+DEAL::cycle=12, n_cells=10048
+DEAL::cycle=13, n_cells=10048
+DEAL::cycle=14, n_cells=10048
+DEAL::cycle=15, n_cells=10048
+DEAL::cycle=16, n_cells=10048
+DEAL::cycle=17, n_cells=10048
+DEAL::cycle=18, n_cells=10048
+DEAL::cycle=19, n_cells=10048
+DEAL::cycle=20, n_cells=10048
+DEAL::cycle=21, n_cells=10048
+DEAL::cycle=22, n_cells=10048
+DEAL::cycle=23, n_cells=10048
+DEAL::cycle=24, n_cells=10048
+DEAL::cycle=25, n_cells=10048
+DEAL::cycle=26, n_cells=10048
+DEAL::cycle=27, n_cells=10048
+DEAL::cycle=0, n_cells=64
+DEAL::cycle=1, n_cells=204
+DEAL::cycle=2, n_cells=715
+DEAL::cycle=3, n_cells=2346
+DEAL::cycle=4, n_cells=7498
+DEAL::cycle=5, n_cells=10032
+DEAL::cycle=6, n_cells=10032
--- /dev/null
+//---------------------------- max_n_cells_02.cc ---------------------------
+// $Id: max_n_cells_02.cc 12193 2006-01-27 15:57:34Z wolf $
+// Version: $Name$
+//
+// Copyright (C) 2007 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.
+//
+//---------------------------- max_n_cells_02.cc ---------------------------
+
+// test the max_n_cells argument to
+// GridRefinement::refine_and_coarsen_fixed_fraction
+
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <lac/vector.h>
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_boundary_lib.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_refinement.h>
+#include <grid/grid_out.h>
+
+#include <fstream>
+#include <iostream>
+
+
+
+template <int dim>
+void test ()
+{
+ deallog << dim << "d:"
+ << std::endl;
+
+ Triangulation<dim> tria;
+ GridGenerator::hyper_cube (tria);
+ tria.refine_global(2);
+
+ for (unsigned int cycle=0; cycle<7*(4-dim)*(4-dim); ++cycle)
+ {
+ deallog << "cycle=" << cycle << ", n_cells=" << tria.n_active_cells() << std::endl;
+
+ Vector<float> criteria (tria.n_active_cells());
+ for (unsigned int i=0; i<tria.n_active_cells(); ++i)
+ criteria(i) = i;
+
+ GridRefinement::refine_and_coarsen_fixed_fraction (tria,
+ criteria,
+ 0.8, 0.03,
+ 10000);
+ tria.execute_coarsening_and_refinement();
+ }
+}
+
+
+
+int main ()
+{
+ std::ofstream logfile("max_n_cells_02/output");
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+
+ test<1> ();
+ test<2> ();
+ test<3> ();
+}
--- /dev/null
+
+DEAL::1d:
+DEAL::cycle=0, n_cells=4
+DEAL::cycle=1, n_cells=5
+DEAL::cycle=2, n_cells=8
+DEAL::cycle=3, n_cells=13
+DEAL::cycle=4, n_cells=20
+DEAL::cycle=5, n_cells=31
+DEAL::cycle=6, n_cells=47
+DEAL::cycle=7, n_cells=71
+DEAL::cycle=8, n_cells=105
+DEAL::cycle=9, n_cells=156
+DEAL::cycle=10, n_cells=231
+DEAL::cycle=11, n_cells=341
+DEAL::cycle=12, n_cells=502
+DEAL::cycle=13, n_cells=741
+DEAL::cycle=14, n_cells=1091
+DEAL::cycle=15, n_cells=1604
+DEAL::cycle=16, n_cells=2354
+DEAL::cycle=17, n_cells=3456
+DEAL::cycle=18, n_cells=5073
+DEAL::cycle=19, n_cells=7443
+DEAL::cycle=20, n_cells=10007
+DEAL::cycle=21, n_cells=10004
+DEAL::cycle=22, n_cells=10003
+DEAL::cycle=23, n_cells=10003
+DEAL::cycle=24, n_cells=10003
+DEAL::cycle=25, n_cells=10003
+DEAL::cycle=26, n_cells=10003
+DEAL::cycle=27, n_cells=10003
+DEAL::cycle=28, n_cells=10003
+DEAL::cycle=29, n_cells=10003
+DEAL::cycle=30, n_cells=10003
+DEAL::cycle=31, n_cells=10003
+DEAL::cycle=32, n_cells=10003
+DEAL::cycle=33, n_cells=10003
+DEAL::cycle=34, n_cells=10003
+DEAL::cycle=35, n_cells=10003
+DEAL::cycle=36, n_cells=10003
+DEAL::cycle=37, n_cells=10003
+DEAL::cycle=38, n_cells=10003
+DEAL::cycle=39, n_cells=10003
+DEAL::cycle=40, n_cells=10003
+DEAL::cycle=41, n_cells=10003
+DEAL::cycle=42, n_cells=10003
+DEAL::cycle=43, n_cells=10003
+DEAL::cycle=44, n_cells=10003
+DEAL::cycle=45, n_cells=10003
+DEAL::cycle=46, n_cells=10003
+DEAL::cycle=47, n_cells=10003
+DEAL::cycle=48, n_cells=10003
+DEAL::cycle=49, n_cells=10003
+DEAL::cycle=50, n_cells=10003
+DEAL::cycle=51, n_cells=10003
+DEAL::cycle=52, n_cells=10003
+DEAL::cycle=53, n_cells=10003
+DEAL::cycle=54, n_cells=10003
+DEAL::cycle=55, n_cells=10003
+DEAL::cycle=56, n_cells=10003
+DEAL::cycle=57, n_cells=10003
+DEAL::cycle=58, n_cells=10003
+DEAL::cycle=59, n_cells=10003
+DEAL::cycle=60, n_cells=10003
+DEAL::cycle=61, n_cells=10003
+DEAL::cycle=62, n_cells=10003
+DEAL::2d:
+DEAL::cycle=0, n_cells=16
+DEAL::cycle=1, n_cells=43
+DEAL::cycle=2, n_cells=118
+DEAL::cycle=3, n_cells=334
+DEAL::cycle=4, n_cells=883
+DEAL::cycle=5, n_cells=2326
+DEAL::cycle=6, n_cells=6034
+DEAL::cycle=7, n_cells=10096
+DEAL::cycle=8, n_cells=10072
+DEAL::cycle=9, n_cells=10072
+DEAL::cycle=10, n_cells=10072
+DEAL::cycle=11, n_cells=10072
+DEAL::cycle=12, n_cells=10072
+DEAL::cycle=13, n_cells=10072
+DEAL::cycle=14, n_cells=10072
+DEAL::cycle=15, n_cells=10072
+DEAL::cycle=16, n_cells=10072
+DEAL::cycle=17, n_cells=10072
+DEAL::cycle=18, n_cells=10072
+DEAL::cycle=19, n_cells=10072
+DEAL::cycle=20, n_cells=10072
+DEAL::cycle=21, n_cells=10072
+DEAL::cycle=22, n_cells=10072
+DEAL::cycle=23, n_cells=10072
+DEAL::cycle=24, n_cells=10072
+DEAL::cycle=25, n_cells=10072
+DEAL::cycle=26, n_cells=10072
+DEAL::cycle=27, n_cells=10072
+DEAL::3d:
+DEAL::cycle=0, n_cells=64
+DEAL::cycle=1, n_cells=316
+DEAL::cycle=2, n_cells=1611
+DEAL::cycle=3, n_cells=8114
+DEAL::cycle=4, n_cells=10081
+DEAL::cycle=5, n_cells=10081
+DEAL::cycle=6, n_cells=10081