001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package org.apache.commons.math3.ode;
019
020
021 /** This interface represents a second order differential equations set.
022
023 * <p>This interface should be implemented by all real second order
024 * differential equation problems before they can be handled by the
025 * integrators {@link SecondOrderIntegrator#integrate} method.</p>
026 *
027 * <p>A second order differential equations problem, as seen by an
028 * integrator is the second time derivative <code>d2Y/dt^2</code> of a
029 * state vector <code>Y</code>, both being one dimensional
030 * arrays. From the integrator point of view, this derivative depends
031 * only on the current time <code>t</code>, on the state vector
032 * <code>Y</code> and on the first time derivative of the state
033 * vector.</p>
034 *
035 * <p>For real problems, the derivative depends also on parameters
036 * that do not belong to the state vector (dynamical model constants
037 * for example). These constants are completely outside of the scope
038 * of this interface, the classes that implement it are allowed to
039 * handle them as they want.</p>
040 *
041 * @see SecondOrderIntegrator
042 * @see FirstOrderConverter
043 * @see FirstOrderDifferentialEquations
044 * @version $Id: SecondOrderDifferentialEquations.java 1416643 2012-12-03 19:37:14Z tn $
045 * @since 1.2
046 */
047
048 public interface SecondOrderDifferentialEquations {
049
050 /** Get the dimension of the problem.
051 * @return dimension of the problem
052 */
053 int getDimension();
054
055 /** Get the current time derivative of the state vector.
056 * @param t current value of the independent <I>time</I> variable
057 * @param y array containing the current value of the state vector
058 * @param yDot array containing the current value of the first derivative
059 * of the state vector
060 * @param yDDot placeholder array where to put the second time derivative
061 * of the state vector
062 */
063 void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot);
064
065 }