public static void main(String[] args) throws Exception {
runCoupledFokkerPlank(System.out);
}
public static void runCoupledFokkerPlank(PrintStream out) throws FileNotFoundException, IOException {
final ExtendedCoupledFiniteDifference solver = new ExtendedCoupledFiniteDifference(0.5);
final int tNodes = 50;
final int xNodes = 150;
final MeshingFunction timeMesh = new ExponentialMeshing(0, T, tNodes, 5.0);
final MeshingFunction spaceMesh = new HyperbolicMeshing(LOWER.getLevel(), UPPER.getLevel(), SPOT, xNodes, 0.01);
final double[] timeGrid = new double[tNodes];
for (int n = 0; n < tNodes; n++) {
timeGrid[n] = timeMesh.evaluate(n);
}
final double[] spaceGrid = new double[xNodes];
for (int i = 0; i < xNodes; i++) {
spaceGrid[i] = spaceMesh.evaluate(i);
}
final PDEGrid1D grid = new PDEGrid1D(timeGrid, spaceGrid);
final PDEResults1D[] res = solver.solve(DATA1, DATA2, grid, LOWER, UPPER, LOWER, UPPER, null);
final PDEFullResults1D res1 = (PDEFullResults1D) res[0];
final PDEFullResults1D res2 = (PDEFullResults1D) res[1];
JSONObject json = new JSONObject();