]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
write a debug file with the first residual even if we converge in one step
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Jul 2014 22:56:36 +0000 (22:56 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Jul 2014 22:56:36 +0000 (22:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@33110 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/algorithms/newton.templates.h

index 9e3d62466d316f11cf9775a4ef082fdd2309948a..745bea98e7a8da971717bfdd03f5380b5e486110 100644 (file)
@@ -139,6 +139,19 @@ namespace Algorithms
     double resnorm = res->l2_norm();
     double old_residual = resnorm / assemble_threshold + 1;
 
+    if (debug_vectors)
+      {
+       NamedData<VECTOR *> out;
+       VECTOR *p = &u;
+       out.add(p, "solution");
+       p = Du;
+       out.add(p, "update");
+       p = res;
+       out.add(p, "residual");
+       *data_out << step;
+       *data_out << out;
+      }
+
     while (control.check(step++, resnorm) == SolverControl::iterate)
       {
         // assemble (Df(u), v)

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.