]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Go on with life.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 15 Apr 2004 23:21:05 +0000 (23:21 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 15 Apr 2004 23:21:05 +0000 (23:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@9024 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-15/step-15.cc

index c63a5a387bcaa8257e795e3382d8c4d31443a7eb..d43e5171578a6e2791ff5186d213bd4956cb14df 100644 (file)
@@ -778,7 +778,14 @@ MinimizationProblem<dim>::line_search (const Vector<double> &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 <int dim>
 void MinimizationProblem<dim>::do_step ()
 {          
@@ -799,11 +806,17 @@ void MinimizationProblem<dim>::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 <int dim>
 void
 MinimizationProblem<dim>::output_results () const
@@ -965,7 +978,7 @@ MinimizationProblem<dim>::energy (const DoFHandler<dim> &dof_handler,
 {
   double energy = 0.;
 
-  QGauss3<dim>  quadrature_formula;
+  QGauss4<dim>  quadrature_formula;
   FEValues<dim> fe_values (dof_handler.get_fe(), quadrature_formula, 
                           UpdateFlags(update_values    |
                                       update_gradients |

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.