org.opensourcephysics.numerics.dde_solvers.rk.irk
Class IRKSimplifiedNewton

java.lang.Object
  extended by org.opensourcephysics.numerics.dde_solvers.rk.irk.IRKSimplifiedNewtonStep
      extended by org.opensourcephysics.numerics.dde_solvers.rk.irk.IRKSimplifiedNewton
All Implemented Interfaces:
AlgebraicEquationSimpleSolver, AlgebraicEquationSolver

public class IRKSimplifiedNewton
extends IRKSimplifiedNewtonStep
implements AlgebraicEquationSolver

Simplified Newton interation algebraic equations system solver. Purposed for numerical solution of algebraic equations systems that can be fitted into IRKAlgebraicEquation.
This code is transferred from the Fortran sources. authors of original Fortran code: E. Hairer and G. Wanner Universite de Geneve, Dept. De Mathematiques ch-1211 Geneve 24, Switzerland e-mail: rnst.hairer@math.unige.ch gerhard.wanner@math.unige.ch
original Fortran code is part of the book: E. Hairer and G. Wanner, Solving ordinary differential equations II. Stiff and differential-algebraic problems. Springer series in computational mathematics 14, Springer-Verlag 1991, second edition 1996.

Author:
Andrei Goussev
See Also:
IRKAlgebraicEquation

Constructor Summary
IRKSimplifiedNewton(IRKAlgebraicEquation eqn)
          Constructs the simplified Newton solver for a system of algebraic equation equations
IRKSimplifiedNewton(IRKAlgebraicEquation eqn, LAESolverLU laeSolver)
          Constructs the simplified Newton solver for a system of algebraic equation equations.
 
Method Summary
 double getTolerance(int index)
          Gets the tolerance of the any approximation component of the algebraic equation solver.
 double resolve()
          Controls the invokes to SimplifiedNewtonStep solver to ensure the error level.
 void setTolerance(int index, double tolerance)
          Sets the tolerance to each aproximation component of the algebraic equation solver.
 
Methods inherited from class org.opensourcephysics.numerics.dde_solvers.rk.irk.IRKSimplifiedNewtonStep
restart, singleStep, updateInitialValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.numerics.dde_solvers.rk.irk.AlgebraicEquationSimpleSolver
restart, updateInitialValue
 

Constructor Detail

IRKSimplifiedNewton

public IRKSimplifiedNewton(IRKAlgebraicEquation eqn)
Constructs the simplified Newton solver for a system of algebraic equation equations

Parameters:
eqn - system of algebraic equation equations in a form of IRKAlgebraicEquation

IRKSimplifiedNewton

public IRKSimplifiedNewton(IRKAlgebraicEquation eqn,
                           LAESolverLU laeSolver)
Constructs the simplified Newton solver for a system of algebraic equation equations. Inner Newton solver's linear algebraic equations system will be solved by assigned instance of solver.

Parameters:
eqn - the system of algebraic equation equations in a form of IRKAlgebraicEquation
laeSolver - the solver of the systems of linear algebraic equations, instanced outside the Newton solver.
See Also:
LAESolverLU
Method Detail

resolve

public double resolve()
               throws org.opensourcephysics.numerics.dde_solvers.rk.irk.NewtonLostOfConvergence,
                      org.opensourcephysics.numerics.dde_solvers.rk.irk.NewtonLastIterationErrorIsTooLarge
Controls the invokes to SimplifiedNewtonStep solver to ensure the error level. (SimplifiedNewtonStep solver adjusts current approximation but does not guarantee the error).

Specified by:
resolve in interface AlgebraicEquationSimpleSolver
Overrides:
resolve in class IRKSimplifiedNewtonStep
Returns:
the convergence rate
Throws:
org.opensourcephysics.numerics.dde_solvers.rk.irk.NewtonLostOfConvergence - the lost of convergence error
org.opensourcephysics.numerics.dde_solvers.rk.irk.NewtonLastIterationErrorIsTooLarge - the predicted error on last interation exceeds the tolerance.

getTolerance

public double getTolerance(int index)
Description copied from interface: AlgebraicEquationSolver
Gets the tolerance of the any approximation component of the algebraic equation solver.

Specified by:
getTolerance in interface AlgebraicEquationSolver
Returns:
the components tolerance

setTolerance

public void setTolerance(int index,
                         double tolerance)
Description copied from interface: AlgebraicEquationSolver
Sets the tolerance to each aproximation component of the algebraic equation solver.

Specified by:
setTolerance in interface AlgebraicEquationSolver
Parameters:
index - the numer of a component
tolerance - the value of desired tolerance