de.grogra.numeric
Interface Monitor


public interface Monitor

This class represents a set of monitor functions. Each monitor function gi(t,y) calculates a single value for a node (t,y). Multiple monitor functions are calculated by a single function g(t,y) at once. When the return value of one of the gi changes its sign, rootfinding methods are used to determine the exact time t of the first event (when gi(t,y) is 0). Then, for each event i that triggered, the function handleEvent(i,t,y) is called. The event handler will return true if integration should stop. Multiple events triggered, integration will stop if at least one of the gi returned true.

Author:
Reinhard Hemmerling

Method Summary
 void g(double[] out, double t, double[] y)
          Evaluate all monitor functions at once.
 boolean handleEvent(int i, double t, double[] y)
          Event handler must return true if integration should stop.
 

Method Detail

g

void g(double[] out,
       double t,
       double[] y)
Evaluate all monitor functions at once.

Parameters:
out -
t - time
y - state

handleEvent

boolean handleEvent(int i,
                    double t,
                    double[] y)
Event handler must return true if integration should stop.

Parameters:
i -
t - time
y - state
Returns:
true if integration should stop