-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Section 7.2.4. of the Kinsol documentation describes how to introduce scaling factors in the solution of nonlinear systems. From the documentation is clear that the weights are used in the definition of all the norms used, e.g., for iteration termination criteria, as well as for the calculations of the perturbations used to compute numerical Jacobians by finite differences.
However, it is not clear to myself and @linuslangenkamp if those weights are also actually used to scale the unknowns, the residuals, and the Jacobian when computing Newton iterations, in order to avoid the bad effects of large condition numbers of the Jacobian in case the system is badly scaled. We couldn't find any part of the solver's source code that actually performs such operations.
This is crucial for use in Modelica modelling and simulation tools, since the models are written in SI units, which is great for clarity of documentation and consistency, but often not-so-great as far as scaling is concerned.
Could you please clarify this to us, and in case point out where in the KINSOL code does the unknown, residual and jacobian scaling take place?
Thank you!