From f06a37ffb29e63e3eebb89d0aa5684d670cf5be3 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Mon, 27 Jun 2011 16:26:18 +0000 Subject: [PATCH] newton method: make messages more precise git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6077 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/nonlinear/newtonmethod.hh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dumux/nonlinear/newtonmethod.hh b/dumux/nonlinear/newtonmethod.hh index 848f00b3a1..addc994a30 100644 --- a/dumux/nonlinear/newtonmethod.hh +++ b/dumux/nonlinear/newtonmethod.hh @@ -138,7 +138,7 @@ protected: uLastIter = uCurrentIter; if (ctl.verbose()) { - std::cout << "Assembling global jacobian"; + std::cout << "Assemble: r(x^k) = dS/dt + div F - q; M = grad r"; std::cout.flush(); } @@ -155,14 +155,22 @@ protected: // linear solve /////////////// + // Clear the current line using an ansi escape + // sequence. for an explanation see + // http://en.wikipedia.org/wiki/ANSI_escape_code + const char clearRemainingLine[] = { 0x1b, '[', 'K', 0 }; + + if (ctl.verbose()) { + std::cout << "\rSolve: M deltax^k = r"; + std::cout << clearRemainingLine; + std::cout.flush(); + } + // solve the resulting linear equation system solveTimer.start(); + if (ctl.verbose()) { - std::cout << "\rSolve Mx = r"; - // Clear the current line using an ansi escape - // sequence. for an explanation see - // http://en.wikipedia.org/wiki/ANSI_escape_code - const char clearRemainingLine[] = { 0x1b, '[', 'K', 0 }; + std::cout << "\rUpdate: x^(k+1) = x^k - deltax^k"; std::cout << clearRemainingLine; std::cout.flush(); } -- GitLab