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
018package org.apache.commons.math3.ode.events;
019
020/** Enumerate for actions to be performed when an event occurs during ODE integration.
021 * @since 3.6
022 */
023public enum Action {
024
025    /** Stop indicator.
026     * <p>This value should be used as the return value of the {@code
027     * eventOccurred} method when the integration should be
028     * stopped after the event ending the current step.</p>
029     */
030    STOP,
031
032    /** Reset state indicator.
033     * <p>This value should be used as the return value of the {@code
034     * eventOccurred}} method when the integration should
035     * go on after the event ending the current step, with a new state
036     * vector (which will be retrieved thanks to the {@code resetState}
037     * method).</p>
038     */
039    RESET_STATE,
040
041    /** Reset derivatives indicator.
042     * <p>This value should be used as the return value of the {@code
043     * eventOccurred} method when the integration should
044     * go on after the event ending the current step, with a new derivatives
045     * vector.</p>
046     */
047    RESET_DERIVATIVES,
048
049    /** Continue indicator.
050     * <p>This value should be used as the return value of the {@code
051     * eventOccurred} method when the integration should go
052     * on after the event ending the current step.</p>
053     */
054    CONTINUE;
055
056}