From: wolf Date: Thu, 15 Apr 2004 23:21:05 +0000 (+0000) Subject: Go on with life. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5c1c273adeb13bba29f6a3163ad9eb1147d05f6;p=dealii-svn.git Go on with life. git-svn-id: https://svn.dealii.org/trunk@9024 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index c63a5a387b..d43e517157 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -778,7 +778,14 @@ MinimizationProblem::line_search (const Vector &update) const - + // The next function is again a rather boring + // one: it does one nonlinear step, by + // calling the function that assembles the + // linear system, then solving it, computing + // a step length, and finally updating the + // solution vector. This should all be mostly + // self-explanatory, given that we have shown + // the solution of a linear system before. template void MinimizationProblem::do_step () { @@ -799,11 +806,17 @@ void MinimizationProblem::do_step () hanging_node_constraints.distribute (update); } - present_solution.add (line_search (update), update); + const double step_length = line_search (update); + present_solution.add (step_length, update); } + // The same holds for the function that + // outputs the solution in gnuplot format + // into a file with a name that includes the + // number of the run we are presently + // performing. template void MinimizationProblem::output_results () const @@ -965,7 +978,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, { double energy = 0.; - QGauss3 quadrature_formula; + QGauss4 quadrature_formula; FEValues fe_values (dof_handler.get_fe(), quadrature_formula, UpdateFlags(update_values | update_gradients |