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 /*
19 * This is not the original file distributed by the Apache Software Foundation
20 * It has been modified by the Hipparchus project
21 */
22
23 package org.hipparchus.ode.events;
24
25 /** Enumerate for actions to be performed when an event occurs during ODE integration.
26 */
27 public enum Action {
28
29 /** Stop indicator.
30 * <p>This value should be used as the return value of the {@code
31 * eventOccurred} method when the integration should be
32 * stopped after the event ending the current step.</p>
33 */
34 STOP,
35
36 /** Reset state indicator.
37 * <p>This value should be used as the return value of the {@code
38 * eventOccurred}} method when the integration should
39 * go on after the event ending the current step, with a new state
40 * vector (which will be retrieved thanks to the {@code resetState}
41 * method).</p>
42 */
43 RESET_STATE,
44
45 /** Reset derivatives indicator.
46 * <p>This value should be used as the return value of the {@code
47 * eventOccurred} method when the integration should
48 * go on after the event ending the current step, with a new derivatives
49 * vector.</p>
50 */
51 RESET_DERIVATIVES,
52
53 /** Continue indicator.
54 * <p>This value should be used as the return value of the {@code
55 * eventOccurred} method when the integration should go
56 * on after the event ending the current step.</p>
57 */
58 CONTINUE,
59
60 /**
61 * Reset events indicator.
62 *
63 * <p> This value should be used as the return value of the {@code eventOccurred}
64 * method when the integration should go on, but first recheck all event detectors for
65 * occurring events. Use when the {@link ODEEventHandler#eventOccurred(org.hipparchus.ode.ODEStateAndDerivative,
66 * ODEEventDetector, boolean)} method of this handler has a side effect that changes
67 * the {@link ODEEventDetector#g(org.hipparchus.ode.ODEStateAndDerivative)}
68 * function of another event handler.
69 */
70 RESET_EVENTS
71
72 }