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 package org.apache.commons.math.ode; 018 019 020 /** This interface represents a first order differential equations set 021 * with a main set of equations and an extension set. 022 * 023 * <p> 024 * This interface is a simple extension on the {@link 025 * FirstOrderDifferentialEquations} that allows to identify which part 026 * of a complete set of differential equations correspond to the main 027 * set and which part correspond to the extension set. 028 * </p> 029 * <p> 030 * One typical use case is the computation of Jacobians. The main 031 * set of equations correspond to the raw ode, and we add to this set 032 * another bunch of equations which represent the jacobians of the 033 * main set. In that case, we want the integrator to use <em>only</em> 034 * the main set to estimate the errors and hence the step sizes. It should 035 * <em>not</em> use the additional equations in this computation. If the 036 * complete ode implements this interface, the {@link FirstOrderIntegrator 037 * integrator} will be able to know where the main set ends and where the 038 * extended set begins. 039 * </p> 040 * <p> 041 * We consider that the main set always corresponds to the first equations 042 * and the extended set to the last equations. 043 * </p> 044 * 045 * @see FirstOrderDifferentialEquations 046 * 047 * @version $Revision: 980981 $ $Date: 2010-07-31 00:03:04 +0200 (sam. 31 juil. 2010) $ 048 * @since 2.2 049 */ 050 051 public interface ExtendedFirstOrderDifferentialEquations extends FirstOrderDifferentialEquations { 052 053 /** Return the dimension of the main set of equations. 054 * <p> 055 * The main set of equations represent the first part of an ODE state. 056 * The error estimations and adaptive step size computation should be 057 * done on this first part only, not on the final part of the state 058 * which represent an extension set of equations which are considered 059 * secondary. 060 * </p> 061 * @return dimension of the main set of equations, must be lesser than or 062 * equal to the {@link #getDimension() total dimension} 063 */ 064 int getMainSetDimension(); 065 066 }