template <int dim>
void LaplaceProblem<dim>::refine_grid ()
{
- Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate (dof_handler,
- QGauss<dim-1>(3),
- typename FunctionMap<dim>::type(),
- locally_relevant_solution,
- estimated_error_per_cell);
- parallel::distributed::GridRefinement::
- refine_and_coarsen_fixed_number (triangulation,
- estimated_error_per_cell,
- 0.3, 0.03);
- triangulation.execute_coarsening_and_refinement ();
+ triangulation.refine_global (1);
}
template <int dim>
void LaplaceProblem<dim>::run ()
{
- const unsigned int n_cycles = 3;
+ const unsigned int n_cycles = 2;
for (unsigned int cycle=0; cycle<n_cycles; ++cycle)
{
pcout << "Cycle " << cycle << ':' << std::endl;
Solved in 10 iterations.
Cycle 1:
- Number of active cells: 1948
- 196+195+195+194+194+194+194+195+195+196+
- Number of degrees of freedom: 8375
- 885+845+845+849+812+840+843+817+819+820+
-DEAL:mpi::Starting value 0.832002
+ Number of active cells: 4096
+ 408+412+408+412+408+408+412+408+412+408+
+ Number of degrees of freedom: 16641
+ 1729+1680+1664+1680+1632+1664+1680+1632+1648+1632+
+DEAL:mpi::Starting value 1.38018
DEAL:mpi::Convergence step 10 value 0
Solved in 10 iterations.
-Cycle 2:
- Number of active cells: 3664
- 366+366+367+366+367+366+367+367+366+366+
- Number of degrees of freedom: 16165
- 1665+1610+1622+1641+1594+1640+1642+1578+1611+1562+
-DEAL:mpi::Starting value 1.03315
-DEAL:mpi::Convergence step 11 value 0
- Solved in 11 iterations.
-
Solved in 10 iterations.
Cycle 1:
- Number of active cells: 1960
- 652+656+652+
- Number of degrees of freedom: 8421
- 2868+2803+2750+
-DEAL:mpi::Starting value 0.843064
+ Number of active cells: 4096
+ 1364+1368+1364+
+ Number of degrees of freedom: 16641
+ 5645+5540+5456+
+DEAL:mpi::Starting value 1.38638
DEAL:mpi::Convergence step 10 value 0
Solved in 10 iterations.
-Cycle 2:
- Number of active cells: 3652
- 1217+1218+1217+
- Number of degrees of freedom: 16095
- 5425+5378+5292+
-DEAL:mpi::Starting value 1.03054
-DEAL:mpi::Convergence step 11 value 0
- Solved in 11 iterations.
-
Solved in 10 iterations.
Cycle 1:
- Number of active cells: 1960
- 490+490+490+490+
- Number of degrees of freedom: 8421
- 2152+2107+2105+2057+
-DEAL:mpi::Starting value 0.835969
-DEAL:mpi::Convergence step 10 value 0
- Solved in 10 iterations.
-
-Cycle 2:
- Number of active cells: 3658
- 916+913+913+916+
- Number of degrees of freedom: 16109
- 4079+4025+4032+3973+
-DEAL:mpi::Starting value 1.04003
+ Number of active cells: 4096
+ 1024+1024+1024+1024+
+ Number of degrees of freedom: 16641
+ 4225+4160+4160+4096+
+DEAL:mpi::Starting value 1.39777
DEAL:mpi::Convergence step 10 value 0
Solved in 10 iterations.