import java.util.*; //*********************************************************************************** //* Class for Duffing Equation */ //*********************************************************************************** public class DuffingFunction extends OdesFunction { private static final double Pi2=2*Math.PI; /** the default value of the initial value of x */ DuffingFunction(int n) { super(n); x0=new double[n]; x0[0]=0.; x0[1]=1.0; x0[2]=2.0; x0[3]=1.5; dt=0.2; trans=100.; ghostTime=100.; poincareSection=3.14; title="Duffing Oscillator"; nParameters=3; aDefault=new double[nParameters]; aDefault[0]=0.3; aDefault[1]=0.25; aDefault[2]=1.0; a=new double[nParameters]; wrapZ=true; wrapZValue=Pi2; } //*********************************************************************************** /** Sets the equation paramters * @param paramters the array of input paramters */ //*********************************************************************************** public void setParameters(double[] parameters) { for(int i=0; i