This commit is contained in:
Thomas Capricelli 2009-08-25 23:26:36 +02:00
parent baec4f39ab
commit a2abb4afb6

View File

@ -426,8 +426,6 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiff(
diag.resize(n); diag.resize(n);
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'"); assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
int msum;
/* Function Body */ /* Function Body */
nfev = 0; nfev = 0;
@ -449,12 +447,6 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiff(
return UserAksed; return UserAksed;
fnorm = fvec.stableNorm(); fnorm = fvec.stableNorm();
/* determine the number of calls to fcn needed to compute */
/* the jacobian matrix. */
/* Computing MIN */
msum = std::min(nb_of_subdiagonals + nb_of_superdiagonals + 1, n);
/* initialize iteration counter and monitors. */ /* initialize iteration counter and monitors. */
iter = 1; iter = 1;
@ -473,7 +465,7 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiff(
if (ei_fdjac1(functor, x, fvec, fjac, nb_of_subdiagonals, nb_of_superdiagonals, epsfcn) <0) if (ei_fdjac1(functor, x, fvec, fjac, nb_of_subdiagonals, nb_of_superdiagonals, epsfcn) <0)
return UserAksed; return UserAksed;
nfev += msum; nfev += std::min(nb_of_subdiagonals + nb_of_superdiagonals + 1, n);
/* compute the qr factorization of the jacobian. */ /* compute the qr factorization of the jacobian. */