Next: Stopping criteria
Up: A generalised Newton iteration scheme
Previous: Evaluating the Jacobian matrix analytically
The majority of computational time in Newton's method is spent on LU decomposition and updating of the Jacobian matrix at each iteration. If the matrix is not updated at each iteration quadratic convergence is lost, but similar convergence properties are still retained in the neighbourhood of the solution.
Convergence of the iteration scheme can be controlled by:
For more information about the linear solution routines used in our example, see [1]. These are a set of machine independent codes in the public domain [23] for linear algebra known as LAPACK.3 The file linsolv.f contains the LAPACK general linear solver and LU decomposition routine which does not utilise property 3 above. Special purpose routines are available for other matrix structures. LAPACK uses Basic Linear Algebra Subprograms (BLAS) with machine specific implementations, thus providing near optimal efficiency for each platform. The necessary BLAS are given as FORTRAN code in the file linsolv.f and should be removed if machine specific versions are available.
The file linsolv.f should be linked with newton.f (the file which results from the application of Splice to newton.mf) at compile time. When the system of equations becomes large (typically greater than 50x50) iterative refinement of the solution may become necessary. It is straightforward to implement iterative refinement using the LAPACK routine dgerfs.f.
Jorge Romao