From 3ad4d92bc8fef4bb7679dc0eea2b1d0d2fb1b165 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Fri, 4 Jul 2014 22:56:36 +0000 Subject: [PATCH] write a debug file with the first residual even if we converge in one step git-svn-id: https://svn.dealii.org/trunk@33110 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/algorithms/newton.templates.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deal.II/include/deal.II/algorithms/newton.templates.h b/deal.II/include/deal.II/algorithms/newton.templates.h index 9e3d62466d..745bea98e7 100644 --- a/deal.II/include/deal.II/algorithms/newton.templates.h +++ b/deal.II/include/deal.II/algorithms/newton.templates.h @@ -139,6 +139,19 @@ namespace Algorithms double resnorm = res->l2_norm(); double old_residual = resnorm / assemble_threshold + 1; + if (debug_vectors) + { + NamedData 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) -- 2.39.5