From b182323d0e2bb412de77f035c04af0280f935102 Mon Sep 17 00:00:00 2001 From: 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