org.apache.commons.math3.ode

## Interface SecondaryEquations

-     public interface SecondaryEquations

  This interface allows users to add secondary differential equations to a primary set of differential equations.

  In some cases users may need to integrate some problem-specific equations along with a primary set of differential equations. One example is optimal control where adjoined parameters linked to the minimized hamiltonian must be integrated.

  This interface allows users to add such equations to a primary set of `first order differential equations` thanks to the `ExpandableStatefulODE.addSecondaryEquations(SecondaryEquations)` method.

  Since:
    3.0
  Version:
    $Id: SecondaryEquations.java 1244107 2012-02-14 16:17:55Z erans $
  See Also:
    `ExpandableStatefulODE`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `computeDerivatives(double t, double[] primary, double[] primaryDot, double[] secondary, double[] secondaryDot)` Compute the derivatives related to the secondary state parameters.
    `int` | `getDimension()` Get the dimension of the secondary state parameters.

- - ### Method Detail

    - #### getDimension

          int getDimension()

      Get the dimension of the secondary state parameters.
      Returns:
        dimension of the secondary state parameters

    - #### computeDerivatives

          void computeDerivatives(double t,
                                double[] primary,
                                double[] primaryDot,
                                double[] secondary,
                                double[] secondaryDot)

      Compute the derivatives related to the secondary state parameters.
      Parameters:
        `t` - current value of the independent time variable
        `primary` - array containing the current value of the primary state vector
        `primaryDot` - array containing the derivative of the primary state vector
        `secondary` - array containing the current value of the secondary state vector
        `secondaryDot` - placeholder array where to put the derivative of the secondary state vector

Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.