Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Costa-Dyakiw/src/jat/examples/ThreeBodyExample/ThreeBodyAPL.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
47 lines (40 sloc)
1.03 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jat.examples.ThreeBodyExample; | |
import org.apache.commons.math3.ode.FirstOrderDifferentialEquations; | |
import jat.coreNOSA.cm.ThreeBody; | |
import jat.coreNOSA.math.MatrixVector.data.VectorN; | |
public class ThreeBodyAPL extends ThreeBody implements FirstOrderDifferentialEquations{ | |
public ThreeBodyAPL(double G, double m1, double m2, double m3) { | |
super(G, m1, m2, m3); | |
} | |
@Override | |
public void computeDerivatives(double arg0, double[] arg1, double[] arg2) { | |
// TODO Auto-generated method stub | |
} | |
@Override | |
public int getDimension() { | |
// returns a dimension of 6 | |
return 6; | |
} | |
public double[] randv() { | |
double[] randv = new double[18]; | |
randv[0] = 2.0; | |
randv[1] = 6.0; | |
randv[2] = 7.0; | |
randv[3] = 4.0; | |
randv[4] = 8.0; | |
randv[5] = 7.0; | |
randv[6] = 5.0; | |
randv[7] = 8.0; | |
randv[8] = 3.0; | |
randv[9] = 6.0; | |
randv[10] = 8.0; | |
randv[11] = 9.0; | |
randv[12] = 0.0; | |
randv[13] = 7.0; | |
randv[14] = 4.0; | |
randv[15] = 5.0; | |
randv[16] = 7.0; | |
randv[17] = 8.0; | |
return randv; | |
} | |
} |