Fix the jacobian scaling bug.
If the norm of a column in the jacobian is near zero.
The jacobian scaling could in trying to avoid division
by zero actually make things much worse. It made it
appear that the column actually had mass when in fact
it did not.
This leads to inflated values for the parameters for
that column when we get some numerical garbage back
from the linear solver.
This should also address the case where users are setting
some columns to zero to hold some parameter constant.
The fix is a bit delicate, and frankly I am not
completely sure that it fixes the issue. But right now
I am quite certain that the current implementation is
better than what we had earlier. Whether this is the
best fix is not entirely certain.
To test the fix, I converted Arnaud Gelas' original
code which triggered this bug into a test case.
Change-Id: Idbbd8177269bdc06338e0f54410f93ddc127c8ca
2 files changed