Program listing for file kernel/src/simulationTools/TimeSteppingCombinedProjection.hpp#
Return to documentation for this file
1#ifndef TIMESTEPPINGCOMBINEDPROJECTION_H
2#define TIMESTEPPINGCOMBINEDPROJECTION_H
3
4#include "TimeStepping.hpp"
5
6
7class TimeSteppingCombinedProjection : public TimeStepping {
8protected:
9
10 ACCEPT_SERIALIZATION(TimeSteppingCombinedProjection);
11
12
13 unsigned int _indexSetLevelForProjection;
14
15
16 unsigned int _cumulatedNewtonNbIterations;
17
18
19 unsigned int _nbProjectionIteration;
20
21
22 unsigned int _nbCumulatedProjectionIteration;
23
24
25 unsigned int _nbIndexSetsIteration;
26
27
28 double _constraintTol;
29
30
31 double _constraintTolUnilateral;
32
33
34 double _maxViolationUnilateral;
35
36
37 double _maxViolationEquality;
38
39
40 unsigned int _projectionMaxIteration;
41
42
43 unsigned int _kIndexSetMax;
44
45
46 bool _doCombinedProj;
47
48
49 bool _doCombinedProjOnEquality;
50
51
52 bool _isIndexSetsStable;
53
54
55 void updateIndexSet(unsigned int level) override;
56
57 struct _SimulationEffectOnOSNSP;
58 friend struct _SimulationEffectOnOSNSP;
59
60public:
61 void initializeOneStepNSProblem() override;
62
63
64 TimeSteppingCombinedProjection(SP::NonSmoothDynamicalSystem nsds,
65 SP::TimeDiscretisation td,
66 SP::OneStepIntegrator osi,
67 SP::OneStepNSProblem osnspb_velo,
68 SP::OneStepNSProblem osnspb_pos,
69 unsigned int _level = 2);
70
71
72 TimeSteppingCombinedProjection(){};
73
74 virtual ~TimeSteppingCombinedProjection();
75
76 void updateWorldFromDS() override { ; }
77
78 inline unsigned int nbProjectionIteration() { return _nbProjectionIteration; }
79
80 inline unsigned int nbCumulatedProjectionIteration()
81 {
82 return _nbCumulatedProjectionIteration;
83 }
84
85
86 inline unsigned int cumulatedNewtonNbIterations()
87 {
88 return _cumulatedNewtonNbIterations;
89 }
90
91
92 inline unsigned int nbIndexSetsIteration() { return _nbIndexSetsIteration; }
93
94 inline void setConstraintTol(double v) { _constraintTol = v; }
95
96 inline void setConstraintTolUnilateral(double v)
97 {
98 _constraintTolUnilateral = v;
99 }
100
101 inline double maxViolationUnilateral() { return _maxViolationUnilateral; }
102 inline double maxViolationEquality() { return _maxViolationEquality; }
103
104 inline void setProjectionMaxIteration(unsigned int v)
105 {
106 _projectionMaxIteration = v;
107 }
108
109 inline void setDoCombinedProj(unsigned int v) { _doCombinedProj = v; }
110
111 inline bool doCombinedProjOnEquality() { return _doCombinedProjOnEquality; }
112
113 void advanceToEvent() override;
114
115 void advanceToEventOLD();
116
117 void computeCriteria(bool *runningProjection);
118
119 ACCEPT_STD_VISITORS();
120};
121
122DEFINE_SPTR(TimeSteppingCombinedProjection)
123
124#endif