diff --git a/src/system.cpp b/src/system.cpp index ae82cf0..154d269 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -446,6 +446,11 @@ int System::Solve(Group *g, int *dof, List *bad, return System::TOO_MANY_UNKNOWNS; } + // And do the leftovers as one big system + if(!NewtonSolve(0)) { + goto didnt_converge; + } + EvalJacobian(); int rank; rank = CalculateRank(); @@ -460,11 +465,6 @@ int System::Solve(Group *g, int *dof, List *bad, // on the number of DOF. if(dof) *dof = mat.n - mat.m; - // And do the leftovers as one big system - if(!NewtonSolve(0)) { - goto didnt_converge; - } - // If requested, find all the free (unbound) variables. This might be // more than the number of degrees of freedom. Don't always do this, // because the display would get annoying and it's slow.