21 #ifndef _TIME_STEPPING_SSC_INTEGRATOR_H_
22 #define _TIME_STEPPING_SSC_INTEGRATOR_H_
25 #include "integrator.h"
26 #include "mbsim/utils/stopwatch.h"
73 double dt, dtOld, dte;
75 double dt_SSC_vorGapControl;
76 bool driftCompensation;
78 int qSize, xSize, uSize, zSize;
79 fmatvec::Vec ze, zi, zT1, zT2, zT3, z1d, z2d, z2dRE, z3d, z4d, z6d, z2b, z3b, z4b, z6b, zStern;
80 fmatvec::Vector<int> LS, LSe, LStmp_T1, LStmp_T2, LStmp_T3, LSA, LSB1, LSB2, LSC1, LSC2, LSC3, LSC4, LSD1, LSD2, LSD3, LSD4, LSD5, LSD6;
81 fmatvec::Vec la, lae, la1d, la2b;
82 fmatvec::Vector<int> laSizes, laeSizes, la1dSizes, la2bSizes;
83 fmatvec::Vec qT1, qT2, qT3;
84 fmatvec::Vec uT1, uT2, uT3;
85 fmatvec::Vec xT1, xT2, xT3;
86 fmatvec::Vec gInActive, gdInActive;
87 std::vector<MBSim::Link*> SetValuedLinkListT1;
88 std::vector<MBSim::Link*> SetValuedLinkListT2;
89 std::vector<MBSim::Link*> SetValuedLinkListT3;
91 int StepsWithUnchangedConstraints;
148 int iter, iterA, iterB1, iterB2, iterC1, iterC2, iterC3, iterC4, iterB2RE, maxIterUsed, maxIter, sumIter;
149 int integrationSteps, integrationStepswithChange, refusedSteps, refusedStepsWithImpact;
150 int wrongAlertGapControl, stepsOkAfterGapControl, stepsRefusedAfterGapControl, statusGapControl;
151 int singleStepsT1, singleStepsT2, singleStepsT3;
152 double dtRelGapControl, qUncertaintyByExtrapolation;
153 int indexLSException;
154 fmatvec::Vec gUniActive;
155 double Penetration, PenetrationCounter, PenetrationLog, PenetrationMin, PenetrationMax;
156 double maxdtUsed, mindtUsed;
157 bool ChangeByGapControl;
159 bool IterConvergence;
160 bool ConstraintsChanged, ConstraintsChangedBlock1, ConstraintsChangedBlock2;
161 int integrationStepsOrder1;
162 int integrationStepsOrder2;
165 int AnzahlAktiverKontakte;
166 double gNDurchschnittprostep;
206 void deactivateSSC(
bool flag=
false) {
FlagSSC=flag;}
214 void integrate(DynamicSystemSolver& system_);
216 void integrate(DynamicSystemSolver& systemT1_, DynamicSystemSolver& systemT2_, DynamicSystemSolver& systemT3_,
int Threads=0);
218 void setAbsoluteTolerance(
const fmatvec::Vec &aTol_) {
aTol.resize() = aTol_;}
219 void setAbsoluteTolerance(
double aTol_) {
aTol.resize() = fmatvec::Vec(1,fmatvec::INIT,aTol_);}
220 void setRelativeTolerance(
const fmatvec::Vec &rTol_) {
rTol.resize() = rTol_;}
221 void setRelativeTolerance(
double rTol_) {
rTol.resize() = fmatvec::Vec(1,fmatvec::INIT,rTol_);}
222 void setgapTolerance(
double gTol) {
gapTol = gTol;}
227 void subIntegrate(DynamicSystemSolver&
system,
double tStop);
228 void postIntegrate(DynamicSystemSolver&
system);
229 void preIntegrate(DynamicSystemSolver& systemT1_, DynamicSystemSolver& systemT2_, DynamicSystemSolver& systemT3_);
232 void getAllSetValuedla(fmatvec::Vec& la_,fmatvec::Vector<int>& la_Sizes,std::vector<MBSim::Link*> &SetValuedLinkList);
233 void setAllSetValuedla(
const fmatvec::Vec& la_,
const fmatvec::Vector<int>& la_Sizes,std::vector<MBSim::Link*> &SetValuedLinkList);
234 void getDataForGapControl();
235 bool testTolerances();
236 bool GapControl(
double qUnsafe,
bool SSCTestOK);
237 bool changedLinkStatus(
const fmatvec::Vector<int> &L1,
const fmatvec::Vector<int> &L2,
int ex);
238 double calculatedtNewRel(
const fmatvec::Vec &ErrorLocal,
double H);