integration
Class BS

java.lang.Object
  extended by integration.BS
All Implemented Interfaces:
Integrator, org.apache.commons.math.ode.FirstOrderDifferentialEquations

public class BS
extends java.lang.Object
implements Integrator, org.apache.commons.math.ode.FirstOrderDifferentialEquations


Field Summary
static double precision
           
 double[][] xyz
           
 
Constructor Summary
BS(int nbodies)
           
 
Method Summary
 double advance(double[][] xyzParam, double timeInterval, double tstep)
          Advances the system by the specified time, using xyzParam as initial (r, v).
 void computeDerivatives(double t, double[] y, double[] ydot)
           
 java.lang.String getAuthor()
          Returns the author's name.
 boolean getCloseEncounter()
           
 java.lang.String getDesc()
          Returns a description of the integrator.
 int getDimension()
           
 java.lang.Object getProperty(int property)
          Reserved for future use.
 java.lang.String getVersion()
          Returns the version of the integrator.
 boolean hasCloseEncounter()
          Specifies if a close encounter happened during the last advance().
 void setProperty(int property, java.lang.Object value)
          Reserved for future use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xyz

public double[][] xyz

precision

public static double precision
Constructor Detail

BS

public BS(int nbodies)
Method Detail

getCloseEncounter

public boolean getCloseEncounter()

advance

public double advance(double[][] xyzParam,
                      double timeInterval,
                      double tstep)
Description copied from interface: Integrator
Advances the system by the specified time, using xyzParam as initial (r, v). xyzParam is a pointer to the xyzParam field in StellarSystem, so before finishing xyzParam should be set to the new (r, v).

Specified by:
advance in interface Integrator
Parameters:
xyzParam - Input / output coordinates
timeInterval - Amount of time to evolve for.
tstep - Timestep hint.
Returns:
Last timestep used.

hasCloseEncounter

public boolean hasCloseEncounter()
Description copied from interface: Integrator
Specifies if a close encounter happened during the last advance().

Specified by:
hasCloseEncounter in interface Integrator
Returns:
True if a close encounter happened.

getProperty

public java.lang.Object getProperty(int property)
Description copied from interface: Integrator
Reserved for future use.

Specified by:
getProperty in interface Integrator
Parameters:
property - Specifies which property to return.
Returns:
Value of the requested property.

setProperty

public void setProperty(int property,
                        java.lang.Object value)
Description copied from interface: Integrator
Reserved for future use.

Specified by:
setProperty in interface Integrator
Parameters:
property - Which property to set.
value - Value of the property.

getAuthor

public java.lang.String getAuthor()
Description copied from interface: Integrator
Returns the author's name.

Specified by:
getAuthor in interface Integrator
Returns:
Author's name.

getVersion

public java.lang.String getVersion()
Description copied from interface: Integrator
Returns the version of the integrator.

Specified by:
getVersion in interface Integrator
Returns:
Version

getDesc

public java.lang.String getDesc()
Description copied from interface: Integrator
Returns a description of the integrator.

Specified by:
getDesc in interface Integrator
Returns:
Description.

getDimension

public int getDimension()
Specified by:
getDimension in interface org.apache.commons.math.ode.FirstOrderDifferentialEquations

computeDerivatives

public final void computeDerivatives(double t,
                                     double[] y,
                                     double[] ydot)
                              throws org.apache.commons.math.ode.DerivativeException
Specified by:
computeDerivatives in interface org.apache.commons.math.ode.FirstOrderDifferentialEquations
Throws:
org.apache.commons.math.ode.DerivativeException