1 /* Siconos is a program dedicated to modeling, simulation and control
2  * of non smooth dynamical systems.
3  *
4  * Copyright 2021 INRIA.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17 */
18 /*! \file
19  Non-Smooth Events
20 */
21 #ifndef NONSMOOTHEVENT_H
22 #define NONSMOOTHEVENT_H
23 
24 /** Events due to non smooth behavior (contact occurence...)
25  *
26  * Those events are detected during Simulation process (integration of the smooth part with a roots-finding algorithm)
27  * and scheduled into the EventsManager.
28  *
29  */
30 
31 #include "Event.hpp"
32 
33 class NonSmoothEvent : public Event
34 {
35 
36 private:
37   /** serialization hooks
38   */
39   ACCEPT_SERIALIZATION(NonSmoothEvent);
40 
41 
42   /** Default constructor */
43   NonSmoothEvent();
44 
45 public:
46 
47   /** constructor with time value as a parameter
48   *  \param time the time of the first event (a double)
49   *  \param notUsed unused parameter (an int)
50   */
51   NonSmoothEvent(double time, int notUsed);
52 
53   /** destructor
54   */
55   ~NonSmoothEvent();
56 
57   /** OSNS solving and IndexSets updating
58   *  \param simulation the simulation that owns this Event (through the EventsManager)
59   */
60   void process(Simulation& simulation);
61 };
62 
63 #endif // NonSmoothEvent_H
64