1dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond/* 2dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * Licensed to the Apache Software Foundation (ASF) under one or more 3dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * contributor license agreements. See the NOTICE file distributed with 4dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * this work for additional information regarding copyright ownership. 5dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * The ASF licenses this file to You under the Apache License, Version 2.0 6dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * (the "License"); you may not use this file except in compliance with 7dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * the License. You may obtain a copy of the License at 8dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * 9dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * http://www.apache.org/licenses/LICENSE-2.0 10dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * 11dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * Unless required by applicable law or agreed to in writing, software 12dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * distributed under the License is distributed on an "AS IS" BASIS, 13dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * See the License for the specific language governing permissions and 15dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * limitations under the License. 16dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond */ 17dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 18dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondpackage org.apache.commons.math.ode; 19dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 20dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 21dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond/** This interface represents a first order integrator for 22dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * differential equations. 23dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 24dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>The classes which are devoted to solve first order differential 25dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * equations should implement this interface. The problems which can 26dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * be handled should implement the {@link 27dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * FirstOrderDifferentialEquations} interface.</p> 28dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * 29dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @see FirstOrderDifferentialEquations 30dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @see org.apache.commons.math.ode.sampling.StepHandler 31dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @see org.apache.commons.math.ode.events.EventHandler 32dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @version $Revision: 1073158 $ $Date: 2011-02-21 22:46:52 +0100 (lun. 21 févr. 2011) $ 33dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @since 1.2 34dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond */ 35dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 36dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondpublic interface FirstOrderIntegrator extends ODEIntegrator { 37dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 38dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond /** Integrate the differential equations up to the given time. 39dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>This method solves an Initial Value Problem (IVP).</p> 40dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>Since this method stores some internal state variables made 41dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * available in its public interface during integration ({@link 42dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * #getCurrentSignedStepsize()}), it is <em>not</em> thread-safe.</p> 43dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @param equations differential equations to integrate 44dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @param t0 initial time 45dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @param y0 initial value of the state vector at t0 46dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @param t target time for the integration 47dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * (can be set to a value smaller than <code>t0</code> for backward integration) 48dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @param y placeholder where to put the state vector at each successful 49dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * step (and hence at the end of integration), can be the same object as y0 50dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @return stop time, will be the same as target time if integration reached its 51dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * target, but may be different if some {@link 52dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * org.apache.commons.math.ode.events.EventHandler} stops it at some point. 53dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @throws DerivativeException this exception is propagated to the caller if 54dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * the underlying user function triggers one 55dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @throws IntegratorException if the integrator cannot perform integration 56dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond */ 57dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond double integrate (FirstOrderDifferentialEquations equations, 58dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond double t0, double[] y0, 59dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond double t, double[] y) throws DerivativeException, IntegratorException; 60dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond 61dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond} 62