Action.java

  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.  *      https://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.  * This is not the original file distributed by the Apache Software Foundation
  19.  * It has been modified by the Hipparchus project
  20.  */

  21. package org.hipparchus.ode.events;

  22. /** Enumerate for actions to be performed when an event occurs during ODE integration.
  23.  */
  24. public enum Action {

  25.     /** Stop indicator.
  26.      * <p>This value should be used as the return value of the {@code
  27.      * eventOccurred} method when the integration should be
  28.      * stopped after the event ending the current step.</p>
  29.      */
  30.     STOP,

  31.     /** Reset state indicator.
  32.      * <p>This value should be used as the return value of the {@code
  33.      * eventOccurred}} method when the integration should
  34.      * go on after the event ending the current step, with a new state
  35.      * vector (which will be retrieved thanks to the {@code resetState}
  36.      * method).</p>
  37.      */
  38.     RESET_STATE,

  39.     /** Reset derivatives indicator.
  40.      * <p>This value should be used as the return value of the {@code
  41.      * eventOccurred} method when the integration should
  42.      * go on after the event ending the current step, with a new derivatives
  43.      * vector.</p>
  44.      */
  45.     RESET_DERIVATIVES,

  46.     /** Continue indicator.
  47.      * <p>This value should be used as the return value of the {@code
  48.      * eventOccurred} method when the integration should go
  49.      * on after the event ending the current step.</p>
  50.      */
  51.     CONTINUE,

  52.     /**
  53.      * Reset events indicator.
  54.      *
  55.      * <p> This value should be used as the return value of the {@code eventOccurred}
  56.      * method when the integration should go on, but first recheck all event detectors for
  57.      * occurring events. Use when the {@link ODEEventHandler#eventOccurred(org.hipparchus.ode.ODEStateAndDerivative,
  58.      * ODEEventDetector, boolean)} method of this handler has a side effect that changes
  59.      * the {@link ODEEventDetector#g(org.hipparchus.ode.ODEStateAndDerivative)}
  60.      * function of another event handler.
  61.      */
  62.     RESET_EVENTS

  63. }