org.simulator.math.odes
Class FirstOrderSolver

java.lang.Object
  extended by org.simulator.math.odes.AbstractDESSolver
      extended by org.simulator.math.odes.AdaptiveStepsizeIntegrator
          extended by org.simulator.math.odes.FirstOrderSolver
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.math.ode.events.EventHandler, DelayValueHolder, DESSolver
Direct Known Subclasses:
AdamsBashforthSolver, AdamsMoultonSolver, DormandPrince54Solver, DormandPrince853Solver, GraggBulirschStoerSolver, HighamHall54Solver

public abstract class FirstOrderSolver
extends AdaptiveStepsizeIntegrator

This class is the superclass of the wrapper classes for the solvers of the Apache Math library.

Since:
0.9
Version:
$Rev: 146 $
Author:
Roland Keller
See Also:
Serialized Form

Field Summary
protected  org.apache.commons.math.ode.AbstractIntegrator integrator
          The integrator used.
 
Fields inherited from class org.simulator.math.odes.AdaptiveStepsizeIntegrator
absTol, relTol
 
Fields inherited from class org.simulator.math.odes.AbstractDESSolver
listenerList
 
Fields inherited from interface org.apache.commons.math.ode.events.EventHandler
CONTINUE, RESET_DERIVATIVES, RESET_STATE, STOP
 
Constructor Summary
FirstOrderSolver()
          default constructor
FirstOrderSolver(double stepSize)
           
FirstOrderSolver(double stepSize, boolean nonnegative)
           
FirstOrderSolver(FirstOrderSolver firstOrderSolver)
          clone constructor
 
Method Summary
abstract  FirstOrderSolver clone()
           
 double[] computeChange(DESystem DES, double[] y, double t, double stepSize, double[] change, boolean steadyState)
          Computes the change for a given system at the current time with the current setting for the integration step size.
protected abstract  void createIntegrator()
          initialization function of the integrator
 org.apache.commons.math.ode.AbstractIntegrator getIntegrator()
           
protected  boolean hasSolverEventProcessing()
           
 void setStepSize(double stepSize)
          Set the integration step size.
 
Methods inherited from class org.simulator.math.odes.AdaptiveStepsizeIntegrator
getAbsTol, getRelTol, setAbsTol, setRelTol
 
Methods inherited from class org.simulator.math.odes.AbstractDESSolver
additionalResults, addPropertyChangeListener, checkSolution, checkSolution, computeDelayedValue, computeNextState, eventOccurred, firePropertyChange, g, getName, getSerialversionuid, getStepSize, inBetweenSteps, initResultMatrix, initResultMatrix, initResultMatrix, isIncludeIntermediates, isNonnegative, isUnstable, numSteps, processEvents, processEventsAndRules, processRules, removePropertyChangeListener, reset, resetState, setIncludeIntermediates, setNonnegative, setUnstableFlag, solve, solve, solve, solve
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

integrator

protected org.apache.commons.math.ode.AbstractIntegrator integrator
The integrator used.

Constructor Detail

FirstOrderSolver

public FirstOrderSolver()
default constructor


FirstOrderSolver

public FirstOrderSolver(double stepSize)
Parameters:
stepSize -

FirstOrderSolver

public FirstOrderSolver(double stepSize,
                        boolean nonnegative)
Parameters:
stepSize -
the - nonnegative flag of the super class @see org.sbml.simulator.math.odes.AbstractDESSolver

FirstOrderSolver

public FirstOrderSolver(FirstOrderSolver firstOrderSolver)
clone constructor

Parameters:
firstOrderSolver -
Method Detail

setStepSize

public void setStepSize(double stepSize)
Description copied from interface: DESSolver
Set the integration step size.

Specified by:
setStepSize in interface DESSolver
Overrides:
setStepSize in class AbstractDESSolver

clone

public abstract FirstOrderSolver clone()
Specified by:
clone in interface DESSolver
Specified by:
clone in class AbstractDESSolver
Returns:
the cloned solver

computeChange

public double[] computeChange(DESystem DES,
                              double[] y,
                              double t,
                              double stepSize,
                              double[] change,
                              boolean steadyState)
                       throws org.apache.commons.math.ode.DerivativeException
Description copied from class: AbstractDESSolver
Computes the change for a given system at the current time with the current setting for the integration step size.

Specified by:
computeChange in class AbstractDESSolver
Parameters:
DES - The system to be simulated.
y - The current state of the system.
t - The current simulation time.
change - The vector for the resulting change of the system.
Returns:
The change.
Throws:
org.apache.commons.math.ode.DerivativeException

createIntegrator

protected abstract void createIntegrator()
initialization function of the integrator


getIntegrator

public org.apache.commons.math.ode.AbstractIntegrator getIntegrator()
Returns:
integrator

hasSolverEventProcessing

protected boolean hasSolverEventProcessing()
Specified by:
hasSolverEventProcessing in class AbstractDESSolver
Returns:
Does the solver do the event processing itself?