//*********************************************************************************** /** Class to return rhs of differential equations.
* To be subclassed by specific functions, which must provide: * * Optional parameters are: */ //*********************************************************************************** public class OdesFunction { /** number of parameters */ int nParameters; /** number of map variables */ int nVariables; /** array giving map paramters */ double[] a; /** array giving default values of map parameters */ double[] aDefault; public boolean wrapX=false; public double wrapXValue; public boolean wrapY=false; public double wrapYValue; public boolean wrapZ=false; public double wrapZValue; /** the default value of the initial value of x */ double[] x0; double dt=0.1; double trans=10.; double ghostTime=10.; double poincareSection=1.; /** the name of the function to use as a graph title */ String title = "Function"; OdesFunction(int n) { nVariables=n; } //*********************************************************************************** /** Sets the map paramters * @param paramters the array of input paramters */ //*********************************************************************************** public void setParameters(double[] parameters) { if(parameters.length < nParameters) System.out.println("Incorrect number of parameters"); for(int i=0; i