23 #include "mbsim/element.h"
26 #include "mbsim/mbsim_event.h"
68 virtual void updateg(
double t) = 0;
69 virtual void updategd(
double t) = 0;
70 virtual void updatewb(
double t,
int i=0) {};
71 virtual void updateW(
double t,
int i=0) {};
72 virtual void updateV(
double t,
int i=0) {};
73 virtual void updateh(
double t,
int i=0) {};
74 virtual void updateStopVector(
double t) {}
75 virtual void updateLinkStatus(
double t) {}
76 virtual void updateLinkStatusReg(
double t) {}
77 virtual void updateJacobians(
double t,
int j=0) {}
78 virtual void updateb(
double t) {};
82 virtual void updatedx(
double t,
double dt) {}
83 virtual void updatexd(
double t) {}
84 virtual void calcxSize() {
xSize = 0; }
85 virtual const fmatvec::Vec& getx()
const {
return x; }
86 virtual fmatvec::Vec& getx() {
return x; }
87 virtual void setxInd(
int xInd_) { xInd = xInd_; };
88 virtual int getxSize()
const {
return xSize; }
89 virtual void updatexRef(
const fmatvec::Vec& ref);
90 virtual void updatexdRef(
const fmatvec::Vec& ref);
91 virtual void updatebRef(
const fmatvec::Mat &hRef);
96 virtual void setbInd(
int bInd_) { bInd = bInd_; };
99 std::string
getType()
const {
return "Link"; }
100 virtual void plot(
double t,
double dt = 1);
108 virtual void updateWRef(
const fmatvec::Mat& ref,
int i=0) = 0;
113 virtual void updateVRef(
const fmatvec::Mat& ref,
int i=0) = 0;
118 virtual void updatehRef(
const fmatvec::Vec &hRef,
int i=0) = 0;
123 virtual void updaterRef(
const fmatvec::Vec &ref,
int i=0) = 0;
148 virtual void updategRef(
const fmatvec::Vec& ref);
173 virtual void updatejsvRef(
const fmatvec::Vector<int> &jsvParent);
312 virtual void setlaTol(
double tol) { laTol = tol; }
313 virtual void setLaTol(
double tol) { LaTol = tol; }
314 virtual void setgTol(
double tol) {
gTol = tol; }
315 virtual void setgdTol(
double tol) { gdTol = tol; }
316 virtual void setgddTol(
double tol) { gddTol = tol; }
317 virtual void setrMax(
double rMax_) {
rMax = rMax_; }
321 const std::vector<fmatvec::Mat>& getW(
int i=0)
const {
return W[i]; }
322 const std::vector<fmatvec::Mat>& getV(
int i=0)
const {
return V[i]; }
323 const std::vector<fmatvec::Vec>& geth(
int i=0)
const {
return h[i]; }
325 void setx(
const fmatvec::Vec &x_) {
x = x_; }
326 const fmatvec::Vec& getxd()
const {
return xd; }
328 void setsvInd(
int svInd_) { svInd = svInd_; };
329 int getsvSize()
const {
return svSize; }
331 void setLinkStatusInd(
int LinkStatusInd_) { LinkStatusInd = LinkStatusInd_; };
334 void setLinkStatusRegInd(
int LinkStatusRegInd_) { LinkStatusRegInd = LinkStatusRegInd_; };
337 const fmatvec::Vec& getla()
const {
return la; }
338 fmatvec::Vec& getla() {
return la; }
339 void setlaInd(
int laInd_) { laInd = laInd_;Ila=fmatvec::Index(laInd,laInd+
laSize-1); }
340 int getlaInd()
const {
return laInd; }
341 int getlaSize()
const {
return laSize; }
342 int getbSize()
const {
return bSize; }
343 const fmatvec::Index& getlaIndex()
const {
return Ila; }
345 const fmatvec::Vec& getg()
const {
return g; }
346 fmatvec::Vec& getg() {
return g; }
347 void setgInd(
int gInd_) { gInd = gInd_;
Ig=fmatvec::Index(gInd,gInd+
gSize-1); }
348 const fmatvec::Vec& getgd()
const {
return gd; }
349 fmatvec::Vec& getgd() {
return gd; }
350 void setgdInd(
int gdInd_) { gdInd = gdInd_; }
351 int getgdInd()
const {
return gdInd; }
352 int getgSize()
const {
return gSize; }
353 int getgdSize()
const {
return gdSize; }
354 const fmatvec::Index& getgIndex()
const {
return Ig; }
356 void setrFactorInd(
int rFactorInd_) { rFactorInd = rFactorInd_; }
359 const fmatvec::Vector<int>& getrFactorUnsure()
const {
return rFactorUnsure; }
364 void savela(
double dt=1.0);
369 void initla(
double dt=1.0);
389 virtual void LinearImpactEstimation(fmatvec::Vec &gInActive_,fmatvec::Vec &gdInActive_,
int *IndInActive_,fmatvec::Vec &gAct_,
int *IndActive_){};
396 virtual void updatecorr(
int j) { corr.init(0); }
397 virtual void updatecorrRef(
const fmatvec::Vec &ref);
398 virtual void calccorrSize(
int j) { corrSize = 0; }
399 void setcorrInd(
int corrInd_) { corrInd = corrInd_; }
400 int getcorrSize()
const {
return corrSize; }
401 virtual void checkRoot() {};
464 fmatvec::Vec
g, gd, la;
489 fmatvec::Index
Ig, Ila;
494 double gTol, gdTol, gddTol, laTol, LaTol;
529 std::vector<fmatvec::Mat>
W[2];
534 std::vector<fmatvec::Mat>
V[2];
539 std::vector<fmatvec::Vec>
h[2];
544 std::vector<fmatvec::Mat>
dhdq;
545 std::vector<fmatvec::Mat> dhdu;
546 std::vector<fmatvec::Vec> dhdt;
551 std::vector<fmatvec::Vec>
r[2];
563 int corrSize, corrInd;