Program listing for file kernel/src/simulationTools/MoreauJeanDirectProjectionOSI.hpp#
Return to documentation for this file
1#ifndef MOREAUPROJECTONCONSTRAINTSOSI_H
2#define MOREAUPROJECTONCONSTRAINTSOSI_H
3
4#include "MoreauJeanOSI.hpp"
5#include "OneStepIntegrator.hpp"
6#include "SimpleMatrix.hpp"
7
8const unsigned int MOREAUPROJECTONCONSTRAINTSOSISTEPSINMEMORY = 1;
9
10
11class MoreauJeanDirectProjectionOSI : public MoreauJeanOSI {
12protected:
13 ACCEPT_SERIALIZATION(MoreauJeanDirectProjectionOSI);
14
15
16 MoreauJeanDirectProjectionOSI(){};
17
18 double _deactivateYPosThreshold;
19 double _deactivateYVelThreshold;
20 double _activateYPosThreshold;
21 double _activateYVelThreshold;
22
23public:
24
25 explicit MoreauJeanDirectProjectionOSI(double theta);
26
27
28 explicit MoreauJeanDirectProjectionOSI(double theta, double gamma);
29
30
31 virtual ~MoreauJeanDirectProjectionOSI(){};
32
33
34
35
36
37 inline double deactivateYPosThreshold() { return _deactivateYPosThreshold; };
38
39 inline void setDeactivateYPosThreshold(double newValue)
40 {
41 _deactivateYPosThreshold = newValue;
42 };
43
44 inline double deactivateYVelThreshold() { return _deactivateYVelThreshold; };
45
46 inline void setDeactivateYVelThreshold(double newValue)
47 {
48 _deactivateYVelThreshold = newValue;
49 };
50
51 inline double activateYPosThreshold() { return _activateYPosThreshold; };
52
53 inline void setActivateYPosThreshold(double newValue) { _activateYPosThreshold = newValue; };
54
55 inline double activateYVelThreshold() { return _activateYVelThreshold; };
56
57 inline void setActivateYVelThreshold(double newValue) { _activateYVelThreshold = newValue; };
58
59
60 void initializeWorkVectorsForDS(double t, SP::DynamicalSystem ds) override;
61
62
63 void initializeWorkVectorsForInteraction(Interaction &inter,
64 InteractionProperties &interProp,
65 DynamicalSystemsGraph &DSG) override;
66
67
68 unsigned int numberOfIndexSets() const override { return 2; };
69
70
71 bool addInteractionInIndexSet(SP::Interaction inter, unsigned int i) override;
72
73
74 bool removeInteractionFromIndexSet(SP::Interaction inter, unsigned int i) override;
75
76
77 void computeFreeState() override;
78
79 ACCEPT_STD_VISITORS();
80};
81
82#endif