system_matrix.reinit (sparsity_pattern);
}
+
// @sect4{Step6::assemble_system}
// Next, we have to assemble the matrix again. There are two code changes
// Finally, transfer the contributions from @p cell_matrix and
// @p cell_rhs into the global objects.
cell->get_dof_indices (local_dof_indices);
- constraints.distribute_local_to_global(cell_matrix,
- cell_rhs,
- local_dof_indices,
- system_matrix, system_rhs);
+ constraints.distribute_local_to_global (cell_matrix,
+ cell_rhs,
+ local_dof_indices,
+ system_matrix,
+ system_rhs);
}
// Now we are done assembling the linear system. The constrained nodes are
// still in the linear system (there is a one on the diagonal of the matrix
}
-
// @sect4{Step6::solve}
// We continue with gradual improvements. The function that solves the linear
template <int dim>
void Step6<dim>::solve ()
{
- SolverControl solver_control (1000, 1e-12);
- SolverCG<> solver (solver_control);
+ SolverControl solver_control (1000, 1e-12);
+ SolverCG<> solver (solver_control);
PreconditionSSOR<> preconditioner;
preconditioner.initialize(system_matrix, 1.2);
}
-
// @sect4{Step6::run}
// The final function before <code>main()</code> is again the main driver of