NLboolean nlSolve() { NLboolean result = NL_TRUE; __nlCheckState(__NL_STATE_SYSTEM_CONSTRUCTED); result = __nlSolve_SUPERLU(NL_TRUE); __nlVectorToVariables(); __nlTransition(__NL_STATE_SYSTEM_CONSTRUCTED, __NL_STATE_SOLVED); return result; return nlSolveAdvanced(NULL, NL_FALSE); }
NLboolean nlSolveAdvanced(NLint *permutation, NLboolean solveAgain) { NLboolean result = NL_TRUE; __nlCheckState(__NL_STATE_SYSTEM_CONSTRUCTED); if (!__nlCurrentContext->solve_again) result = __nlFactorize_SUPERLU(__nlCurrentContext, permutation); if (result) { result = __nlInvert_SUPERLU(__nlCurrentContext); if (result) { __nlVectorToVariables(); if (solveAgain) __nlCurrentContext->solve_again = NL_TRUE; __nlTransition(__NL_STATE_SYSTEM_CONSTRUCTED, __NL_STATE_SYSTEM_SOLVED); } } return result; }