package org.spaceroots.mantissa.ode;

/**
 * This class implements a second order Runge-Kutta integrator for
 * Ordinary Differential Equations.

 * 

This method is an explicit Runge-Kutta method, its Butcher-array * is the following one : *

 *    0  |  0    0
 *   1/2 | 1/2   0
 *       |----------
 *       |  0    1
 * 
*

* @see EulerIntegrator * @see ClassicalRungeKuttaIntegrator * @see GillIntegrator * @version $Id: MidpointIntegrator.java 1709 2006-12-03 21:16:50Z luc $ * @author L. Maisonobe */ public class MidpointIntegrator extends RungeKuttaIntegrator { private static final String methodName = "midpoint"; private static final double[] c = { 1.0 / 2.0 }; private static final double[][] a = { { 1.0 / 2.0 } }; private static final double[] b = { 0.0, 1.0 }; /** Simple constructor. * Build a midpoint integrator with the given step. * @param step integration step */ public MidpointIntegrator(double step) { super(false, c, a, b, new MidpointStepInterpolator(), step); } /** Get the name of the method. * @return name of the method */ public String getName() { return methodName; } }

Ads help maintain this website.