1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package org.apache.commons.math.ode; 19 20 /** 21 * This interface represents a handler that should be called after 22 * each successful fixed step. 23 24 * <p>This interface should be implemented by anyone who is interested 25 * in getting the solution of an ordinary differential equation at 26 * fixed time steps. Objects implementing this interface should be 27 * wrapped within an instance of {@link StepNormalizer} that itself 28 * is used as the general {@link StepHandler} by the integrator. The 29 * {@link StepNormalizer} object is called according to the integrator 30 * internal algorithms and it calls objects implementing this 31 * interface as necessary at fixed time steps.</p> 32 * 33 * @see StepHandler 34 * @see StepNormalizer 35 * @version $Revision: 620312 $ $Date: 2008-02-10 12:28:59 -0700 (Sun, 10 Feb 2008) $ 36 * @since 1.2 37 */ 38 39 public interface FixedStepHandler { 40 41 /** 42 * Handle the last accepted step 43 * @param t time of the current step 44 45 * @param y state vector at t. For efficiency purposes, the {@link 46 * StepNormalizer} class reuse the same array on each call, so if 47 * the instance wants to keep it across all calls (for example to 48 * provide at the end of the integration a complete array of all 49 * steps), it should build a local copy store this copy. 50 51 * @param isLast true if the step is the last one 52 */ 53 public void handleStep(double t, double[] y, boolean isLast); 54 55 }