idaholab/moose — pull request #4401 by dasmy (2014-12-15 21:15:45+00:00)
Title: Include scalar variables in TopResidualDebugOutput

Without this fix, TopResidualDebugOutput simply ignored scalar variables, which can be nasty since for example as Lagrange multipliers they can contribute the largest part of the total residual (see example below).
This PR includes scalar variables into the list of top residuals. To this end, after visiting all nodes to find the element-resolved residual contribution of all non-scalar variables, it loops over all scalar variables and adds their residual contribution to the list that is sorted and printed to the output afterwards.
Finally, the output reads

Time Step 1, time = 0.1
dt = 0.1
[DBG][0] Max 5 residuals
[DBG][0] 2.05196549453295 'hydrostatic_pressure' (SCALAR)
[DBG][0] 8.41950749570775e-19 'dispx' at node 425
[DBG][0] -7.86046575051991e-19 'dispz' at node 442
[DBG][0] 7.6232965252887e-19 'dispy' at node 825
[DBG][0] 7.58941520739853e-19 'dispz' at node 537
0 Nonlinear |R| = 2.051965e+00

Appropriate regression tests are included.
This is my first `moose`-PR :blush: - Please let me know if anything is missing or inappropriate. :smiley: