and the number of calls of different parts of the program like assembly or
calculating the residual, for the most recent mesh refinement cycle. Some of
the numbers above can be improved by transfering the solution from one mesh to
-the next, an option we have not exercised here.
+the next, an option we have not exercised here. Of course, you can also make
+the program run faster, especially on the later refinement cycles, by just
+using more processors: the accompanying paper shows good scaling to at least
+1000 cores.
In a typical run, you can observe that for every refinement step, the active
set - the contact points - are iterated out at first. After that the Newton
-# Listing of Parameters
-# ---------------------
-
-# polynomial degree of the FE_Q finite element space, typically 1 or 2
set polynomial degree = 1
-
-# number of initial global refinements before the first computation
set number of initial refinements = 3
-
-# number of adaptive cycles to run
set number of cycles = 12
-
-# refinement strategy for each cycle:
-# global: one global refinement
-# percentage: fixed percentage gets refined using kelly
-# fix dofs: tries to achieve 2^initial_refinement*300 dofs after cycle 1 (only
-# use 2 cycles!). Changes the coarse mesh!
set refinement strategy = percentage
-
-# obstacle file to read, leave empty to use a sphere or 'obstacle_file.pbm'
-set obstacle filename =
-
-# directory to put output files (graphical output and benchmark statistics,
-# leave empty to put into current directory
-set output directory = p1adaptive
+set obstacle = sphere
+set output directory = p1_adaptive
-# Listing of Parameters
-# ---------------------
-
-# polynomial degree of the FE_Q finite element space, typically 1 or 2
set polynomial degree = 1
-
-# number of initial global refinements before the first computation
set number of initial refinements = 3
-
-# number of adaptive cycles to run
set number of cycles = 12
-
-# refinement strategy for each cycle:
-# global: one global refinement
-# percentage: fixed percentage gets refined using kelly
-# fix dofs: tries to achieve 2^initial_refinement*300 dofs after cycle 1 (only
-# use 2 cycles!). Changes the coarse mesh!
set refinement strategy = percentage
-
-# obstacle file to read, leave empty to use a sphere or 'obstacle_file.pbm'
-set obstacle filename = obstacle_file.pbm
-
-# directory to put output files (graphical output and benchmark statistics,
-# leave empty to put into current directory
-set output directory = p1adaptive
+set obstacle = read from file
+set output directory = p1_chinese
-# Listing of Parameters
-# ---------------------
-
-# polynomial degree of the FE_Q finite element space, typically 1 or 2
set polynomial degree = 1
-
-# number of initial global refinements before the first computation
set number of initial refinements = 3
-
-# number of adaptive cycles to run
set number of cycles = 7
-
-# refinement strategy for each cycle:
-# global: one global refinement
-# percentage: fixed percentage gets refined using kelly
-# fix dofs: tries to achieve 2^initial_refinement*300 dofs after cycle 1 (only
-# use 2 cycles!). Changes the coarse mesh!
set refinement strategy = global
-
-# obstacle file to read, leave empty to use a sphere or 'obstacle_file.pbm'
-set obstacle filename =
-
-# directory to put output files (graphical output and benchmark statistics,
-# leave empty to put into current directory
-set output directory = p1global
+set obstacle = sphere
+set output directory = p1_global
-# Listing of Parameters
-# ---------------------
-
-# polynomial degree of the FE_Q finite element space, typically 1 or 2
set polynomial degree = 2
-
-# number of initial global refinements before the first computation
set number of initial refinements = 3
-
-# number of adaptive cycles to run
set number of cycles = 6
-
-# refinement strategy for each cycle:
-# global: one global refinement
-# percentage: fixed percentage gets refined using kelly
-# fix dofs: tries to achieve 2^initial_refinement*300 dofs after cycle 1 (only
-# use 2 cycles!). Changes the coarse mesh!
set refinement strategy = global
-
-# obstacle file to read, leave empty to use a sphere or 'obstacle_file.pbm'
-set obstacle filename =
-
-# directory to put output files (graphical output and benchmark statistics,
-# leave empty to put into current directory
-set output directory = p2global
+set obstacle = sphere
+set output directory = p2_global
ny(0)
{
std::ifstream f(name.c_str());
+ AssertThrow (f, ExcMessage (std::string("Can't read from file <") +
+ name + ">!"));
std::string temp;
f >> temp >> nx >> ny;
prm.declare_entry("number of cycles", "5",
Patterns::Integer(),
"Number of adaptive mesh refinement cycles to run.");
- prm.declare_entry("obstacle filename", "",
- Patterns::Anything(),
- "Obstacle file to read, use 'obstacle_file.pbm' or leave empty to use a sphere.");
+ prm.declare_entry("obstacle", "sphere",
+ Patterns::Selection("sphere|read from file"),
+ "The name of the obstacle to use. This may either be 'sphere' if we should "
+ "use a spherical obstacle, or 'read from file' in which case the obstacle "
+ "will be read from a file named 'obstacle.pbm' that is supposed to be in "
+ "ASCII PBM format.");
prm.declare_entry("output directory", "",
Patterns::Anything(),
"Directory for output files (graphical output and benchmark "
gamma),
base_mesh (prm.get("base mesh")),
- obstacle (prm.get("obstacle filename") != ""
+ obstacle (prm.get("obstacle") == "read from file"
?
static_cast<const Function<dim>*>
- (new EquationData::ChineseObstacle<dim>(prm.get("obstacle filename"), (base_mesh == "box" ? 1.0 : 0.5)))
+ (new EquationData::ChineseObstacle<dim>("obstacle.pbm", (base_mesh == "box" ? 1.0 : 0.5)))
:
static_cast<const Function<dim>*>
(new EquationData::SphereObstacle<dim>(base_mesh == "box" ? 1.0 : 0.5))),