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

java.lang.Object
  extended by org.opensourcephysics.numerics.dde_solvers.rk.irk.IRKSimplifiedNewtonStep
All Implemented Interfaces:
AlgebraicEquationSimpleSolver
Direct Known Subclasses:
IRKSimplifiedNewton

public class IRKSimplifiedNewtonStep
extends java.lang.Object
implements AlgebraicEquationSimpleSolver

Core of the simplified Newton iteration solver. IRKSimplifiedNewtonStep can be used as simplest algebraic equation systems solver in cases when error is of no importance or as base for the solvers with error control. Current version of the dolver is purposed only for a systems of algebraic equation that can be fitted into IRKAlgebraicEquation with the A marix having an 1 real eigenvalue and 1 complex pair of eigenvalues.
The 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

Constructor Summary
IRKSimplifiedNewtonStep(IRKAlgebraicEquation eqn)
          Constructs the simplest simplified Newton solver for a system of algebraic equation equations
IRKSimplifiedNewtonStep(IRKAlgebraicEquation eqn, LAESolverLU laeSolver)
          Constructs the simplest simplified Newton solver for a system of algebraic equation equations.
 
Method Summary
 double resolve()
          Adjusts the current approximation vertor considering the one iteration of simplified Newton iterations method.
 void restart(boolean _bestConvergenceRequired)
          Performs restarting of the solver for the cases when source system of algebgraic equation had been changed by user.
 double singleStep()
          Calculates the increment to the current approximation vertor, but does not adjust it.
 void updateInitialValue()
          Synchronize the change of approximation vertor and updated by user the approximation vector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRKSimplifiedNewtonStep

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

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

IRKSimplifiedNewtonStep

public IRKSimplifiedNewtonStep(IRKAlgebraicEquation eqn,
                               LAESolverLU laeSolver)
Constructs the simplest 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

updateInitialValue

public void updateInitialValue()
Synchronize the change of approximation vertor and updated by user the approximation vector.

Specified by:
updateInitialValue in interface AlgebraicEquationSimpleSolver

restart

public void restart(boolean _bestConvergenceRequired)
Performs restarting of the solver for the cases when source system of algebgraic equation had been changed by user.

Specified by:
restart in interface AlgebraicEquationSimpleSolver
Parameters:
_bestConvergenceRequired - best convergence required. true value is the command to refresh the Jacobian, otherwise Jacobian matrix will stay as is.

singleStep

public double singleStep()
Calculates the increment to the current approximation vertor, but does not adjust it.

Returns:
the current convergence rate

resolve

public double resolve()
Adjusts the current approximation vertor considering the one iteration of simplified Newton iterations method.

Specified by:
resolve in interface AlgebraicEquationSimpleSolver
Returns:
the current convergence rate