From 1045d0fbda2613d521d2c57ee2103dca87f291d0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 15 Apr 2004 23:21:05 +0000 Subject: [PATCH] Go on with life. git-svn-id: https://svn.dealii.org/trunk@9024 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-15/step-15.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 | -- 2.39.5