OMSimulator
OMSimulator copied to clipboard
Check of algebraic loop tolerance is wrong
Description
When using KINSol to solver algebraic loops, the check for the achieved tolerance is wrong and is practically never triggered, even if the tolerance value is not in fact achieved.
The error is in oms::KinsolSolver::kinsolSolve(), which uses the expression fNormValue = N_VWL2Norm(fTmp, fTmp) to calculate the norm. The second argument is a set of weights. In its current form it returns a square root of the sum of fourth powers of the elements instead of the L2 norm.
Version and OS
Affected branches:
- master
- maintenance/v2.1
- om_maintenance/v1.21