+ try to make the SQP solver in the Sketcher more robust
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5148 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
ee8242d22d
commit
aaea1b933c
|
@ -984,11 +984,15 @@ int System::solve(SubSystem *subsysA, SubSystem *subsysB, bool isFine)
|
|||
break;
|
||||
}
|
||||
alpha = tau * alpha;
|
||||
if (alpha < 1e-8) // let the linesearch fail
|
||||
alpha = 0.;
|
||||
x = x0 + alpha * xdir;
|
||||
subsysA->setParams(plist,x);
|
||||
subsysB->setParams(plist,x);
|
||||
subsysA->calcResidual(resA);
|
||||
f = subsysB->error() + mu * resA.lpNorm<1>();
|
||||
if (alpha < 1e-8) // let the linesearch fail
|
||||
break;
|
||||
}
|
||||
lambda = lambda0 + alpha * lambdadir;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user