org.apache.commons.math3.ode.events
Class OverlappingEventsTest

java.lang.Object
  extended by org.apache.commons.math3.ode.events.OverlappingEventsTest
All Implemented Interfaces:
FirstOrderDifferentialEquations

public class OverlappingEventsTest
extends Object
implements FirstOrderDifferentialEquations

Tests for overlapping state events. Also tests an event function that does not converge to zero, but does have values of opposite sign around its root.


Constructor Summary
OverlappingEventsTest()
           
 
Method Summary
 void computeDerivatives(double t, double[] y, double[] yDot)
          
 int getDimension()
          
 void test(int eventType)
          Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead.
 void testOverlappingEvents0()
          Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead.
 void testOverlappingEvents1()
          Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlappingEventsTest

public OverlappingEventsTest()
Method Detail

testOverlappingEvents0

public void testOverlappingEvents0()
                            throws DimensionMismatchException,
                                   NumberIsTooSmallException,
                                   MaxCountExceededException,
                                   NoBracketingException
Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead. Uses event type 0. See EventHandler.g(double, double[]).

Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testOverlappingEvents1

public void testOverlappingEvents1()
                            throws DimensionMismatchException,
                                   NumberIsTooSmallException,
                                   MaxCountExceededException,
                                   NoBracketingException
Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead. Uses event type 1. See EventHandler.g(double, double[]).

Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

test

public void test(int eventType)
          throws DimensionMismatchException,
                 NumberIsTooSmallException,
                 MaxCountExceededException,
                 NoBracketingException
Test for events that occur at the exact same time, but due to numerical calculations occur very close together instead.

Parameters:
eventType - the type of events to use. See EventHandler.g(double, double[]).
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

getDimension

public int getDimension()

Specified by:
getDimension in interface FirstOrderDifferentialEquations

computeDerivatives

public void computeDerivatives(double t,
                               double[] y,
                               double[] yDot)

Specified by:
computeDerivatives in interface FirstOrderDifferentialEquations


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.