mbsim  4.0.0
MBSim Kernel
dynamic_system.h
1 /* Copyright (C) 2004-2014 MBSim Development Team
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * Contact: martin.o.foerg@googlemail.com
17  */
18 
19 #ifndef _DYNAMIC_SYSTEM_H_
20 #define _DYNAMIC_SYSTEM_H_
21 
22 #include "mbsim/element.h"
23 #include "mbsim/mbsim_event.h"
24 
25 namespace H5 {
26  class Group;
27 }
28 
29 namespace MBSim {
30  class Frame;
31  class FixedRelativeFrame;
32  class Contour;
33  class RigidContour;
34  class Object;
35  class Link;
36  class Constraint;
37  class ModellingInterface;
38  class Contact;
39  class Observer;
40 
58  class DynamicSystem : public Element {
59  public:
63  DynamicSystem(const std::string &name);
64 
68  ~DynamicSystem() override;
69 
70  /* INTERFACE FOR DERIVED CLASSES */
71  virtual void updateT();
72  virtual void updateh(int k=0);
73  virtual void updateM();
74  virtual void updateLLM();
75  virtual void updatedq();
76  virtual void updatedu();
77  virtual void updatedx();
78  virtual void updatezd();
79  virtual void updatewb();
80  virtual void updateW(int j=0);
81  virtual void updateV(int j=0);
82  virtual void updateg();
83  virtual void updategd();
84  virtual void updateStopVector();
85  virtual void updateStopVectorParameters();
86  virtual void updateLinkStatus();
87  virtual void updateLinkStatusReg();
88  virtual void updateWInverseKinetics();
89  virtual void updatebInverseKinetics();
90  virtual void sethSize(int hSize_, int j=0);
91  virtual int gethSize(int i=0) const { return hSize[i]; }
92  virtual int getqSize() const { return qSize; }
93  virtual int getuSize(int i=0) const { return uSize[i]; }
94  virtual void calcqSize();
95  virtual void calcuSize(int j=0);
96  virtual int getuInd(int i=0) { return uInd[i]; }
97  virtual void setqInd(int qInd_);
98  virtual void setuInd(int uInd_, int j=0);
99  virtual void sethInd(int hInd_, int j=0);
100  virtual void setxInd(int xInd_);
101  virtual const fmatvec::Vec& getq() const { return q; };
102  virtual fmatvec::Vec& getq() { return q; };
103  virtual const fmatvec::Vec& getu() const { return u; };
104  virtual fmatvec::Vec& getu() { return u; };
105  void setq(const fmatvec::Vec& q_) { q = q_;}
106  void setu(const fmatvec::Vec& u_) { u = u_;}
107  void setx(const fmatvec::Vec& x_) { x = x_; }
108  void setjsv(const fmatvec::VecInt& jsv_) { jsv = jsv_;}
109  virtual H5::GroupBase *getPlotGroup() { return plotGroup; }
110  std::shared_ptr<OpenMBV::Group> getOpenMBVGrp() override;
111 
112  virtual void calcxSize();
113  const fmatvec::Vec& getx() const { return x; };
114  fmatvec::Vec& getx() { return x; };
115  int getxSize() const { return xSize; }
116  void updatexRef(fmatvec::Vec &xParent);
117  void updatexdRef(fmatvec::Vec &xdParent);
118  void updatedxRef(fmatvec::Vec &dxParent);
119  void init(InitStage stage, const InitConfigSet &config) override;
120  virtual void initz();
121  virtual void writez(H5::GroupBase *parent);
122  virtual void readz0(H5::GroupBase *parent);
123  /*****************************************************/
124 
125  /* INHERITED INTERFACE OF ELEMENT */
127  void setDynamicSystemSolver(DynamicSystemSolver* sys) override;
128  void plot() override;
129  void plotAtSpecialEvent() override;
130  /*****************************************************/
131 
136  virtual int solveConstraintsFixpointSingle();
137 
143  virtual int solveImpactsFixpointSingle();
144 
149  virtual int solveConstraintsGaussSeidel();
150 
156  virtual int solveImpactsGaussSeidel();
157 
162  virtual int solveConstraintsRootFinding();
163 
169  virtual int solveImpactsRootFinding();
170 
174  virtual int jacobianConstraints();
175 
179  virtual int jacobianImpacts();
180 
184  virtual void checkConstraintsForTermination();
185 
189  virtual void checkImpactsForTermination();
190 
194  virtual void updaterFactors();
195 
201  virtual Frame* getFrame(const std::string &name, bool check=true) const;
202 
208  virtual Contour* getContour(const std::string &name, bool check=true) const;
209  /*****************************************************/
210 
211  /* GETTER / SETTER */
212  void setFrameOfReference(Frame *frame) { R = frame; };
213  const Frame* getFrameOfReference() const { return R; };
214 
215  const fmatvec::Mat& getT(bool check=true) const;
216  const fmatvec::Vec& geth(int i=0, bool check=true) const;
217  const fmatvec::SymMat& getM(bool check=true) const;
218  const fmatvec::SymMat& getLLM(bool check=true) const;
219  const fmatvec::Vec& getdq(bool check=true) const;
220  const fmatvec::Vec& getdu(bool check=true) const;
221  const fmatvec::Vec& getdx(bool check=true) const;
222  const fmatvec::Mat& getW(int i=0, bool check=true) const;
223  const fmatvec::Mat& getV(int i=0, bool check=true) const;
224  const fmatvec::Vec& getla(bool check=true) const;
225  const fmatvec::Vec& getLa(bool check=true) const;
226  const fmatvec::Vec& getg(bool check=true) const;
227  const fmatvec::Vec& getgd(bool check=true) const;
228  fmatvec::Vec& getla(bool check=true);
229  fmatvec::Vec& getLa(bool check=true);
230  void setla(const fmatvec::Vec &la_) { la = la_; }
231  void setLa(const fmatvec::Vec &La_) { La = La_; }
232  fmatvec::VecInt& getjsv() { return jsv; }
233  const fmatvec::VecInt& getjsv() const { return jsv; }
234  fmatvec::Mat& getW(int i=0, bool check=true);
235  fmatvec::SymMat& getLLM(bool check=true);
236  fmatvec::Vec& getdq(bool check=true);
237  fmatvec::Vec& getdu(bool check=true);
238  fmatvec::Vec& getdx(bool check=true);
239 
240  fmatvec::VecInt& getLinkStatus() { return LinkStatus; }
241  fmatvec::VecInt& getLinkStatusReg() { return LinkStatusReg; }
242  const fmatvec::VecInt& getLinkStatus() const { return LinkStatus; }
243  const fmatvec::VecInt& getLinkStatusReg() const { return LinkStatusReg; }
244 
245  const fmatvec::Mat& evalT();
246  const fmatvec::Vec& evalh(int i=0);
247  const fmatvec::SymMat& evalM();
248  const fmatvec::SymMat& evalLLM();
249  const fmatvec::Mat& evalW(int i=0);
250  const fmatvec::Mat& evalV(int i=0);
251  const fmatvec::Vec& evalwb();
252  const fmatvec::Vec& evalr(int i=0);
253  const fmatvec::Vec& evalrdt();
254  const fmatvec::Vec& evalg();
255  const fmatvec::Vec& evalgd();
256  const fmatvec::Mat& evalWInverseKinetics();
257  const fmatvec::Mat& evalbInverseKinetics();
258 
259  void setqd(const fmatvec::Vec& qd_) { qd = qd_; }
260  void setud(const fmatvec::Vec& ud_) { ud = ud_; }
261  void setxd(const fmatvec::Vec& xd_) { xd = xd_; }
262 
263  int getxInd() { return xInd; }
264  int getlaInd() const { return laInd; }
265 
266  int gethInd(int i=0) { return hInd[i]; }
267  void setlaInd(int ind) { laInd = ind; }
268  void setgInd(int ind) { gInd = ind; }
269  void setgdInd(int ind) { gdInd = ind; }
270  void setrFactorInd(int ind) { rFactorInd = ind; }
271  virtual void setsvInd(int svInd_);
272  void setLinkStatusInd(int LinkStatusInd_) {LinkStatusInd = LinkStatusInd_;};
273  void setLinkStatusRegInd(int LinkStatusRegInd_) {LinkStatusRegInd = LinkStatusRegInd_;};
274 
275  void setqSize(int qSize_) { qSize = qSize_; }
276  void setuSize(int uSize_, int i=0) { uSize[i] = uSize_; }
277  void setxSize(int xSize_) { xSize = xSize_; }
278 
279  int getlaSize() const { return laSize; }
280  int getgSize() const { return gSize; }
281  int getgdSize() const { return gdSize; }
282  int getrFactorSize() const { return rFactorSize; }
283  int getsvSize() const { return svSize; }
284  int getLinkStatusSize() const { return LinkStatusSize; }
285  int getLinkStatusRegSize() const { return LinkStatusRegSize; }
286  /*****************************************************/
287 
288  const std::vector<Object*>& getObjects() const { return object; }
289  const std::vector<Link*>& getLinks() const { return link; }
290  const std::vector<DynamicSystem*>& getDynamicSystems() const { return dynamicsystem; }
291  const std::vector<Frame*>& getFrames() const { return frame; }
292  const std::vector<Contour*>& getContours() const { return contour; }
293  const std::vector<Link*>& getSetValuedLinks() const { return linkSetValued; }
294 
299  void updateqRef(fmatvec::Vec &qParent);
300 
305  void updateqdRef(fmatvec::Vec &qdParent);
306 
307  void updatedqRef(fmatvec::Vec &dqParent);
308 
313  void updateuRef(fmatvec::Vec &uParent);
314 
319  void updateuallRef(fmatvec::Vec &uParent);
320 
325  void updateudRef(fmatvec::Vec &udParent);
326 
327  void updateduRef(fmatvec::Vec &duParent);
328 
333  void updateudallRef(fmatvec::Vec &udParent);
334 
342  void updatehRef(fmatvec::Vec &hParent, int j=0);
343 
348  void updaterRef(fmatvec::Vec &rParent, int j=0);
349 
354  void updaterdtRef(fmatvec::Vec &rdtParent);
355 
360  void updateTRef(fmatvec::Mat &TParent);
361 
367  void updateMRef(fmatvec::SymMat &MParent);
368 
374  void updateLLMRef(fmatvec::SymMat &LLMParent);
375 
380  virtual void updategRef(fmatvec::Vec &gParent);
381 
386  virtual void updategdRef(fmatvec::Vec &gdParent);
387 
392  void updatelaRef(fmatvec::Vec &laParent);
393 
398  void updateLaRef(fmatvec::Vec &LaParent);
399 
400  void updatelaInverseKineticsRef(fmatvec::Vec &laParent);
401  void updatebInverseKineticsRef(fmatvec::Mat &bParent);
402 
407  virtual void updatewbRef(fmatvec::Vec &wbParent);
408 
414  virtual void updateWRef(fmatvec::Mat &WParent, int j=0);
415 
422 
428  virtual void updateVRef(fmatvec::Mat &VParent, int j=0);
429 
434  void updatesvRef(fmatvec::Vec& svParent);
435 
440  void updatejsvRef(fmatvec::VecInt &jsvParent);
441 
446  void updateLinkStatusRef(fmatvec::VecInt &LinkStatusParent);
447 
452  void updateLinkStatusRegRef(fmatvec::VecInt &LinkStatusRegParent);
453 
458  void updateresRef(fmatvec::Vec &resParent);
459 
464  void updaterFactorRef(fmatvec::Vec &rFactorParent);
465 
466  void clearElementLists();
467 
472  void buildListOfDynamicSystems(std::vector<DynamicSystem*> &sys);
473 
478  void buildListOfObjects(std::vector<Object*> &obj);
479 
484  void buildListOfLinks(std::vector<Link*> &lnk);
485 
490  void buildListOfConstraints(std::vector<Constraint*> &crt);
491 
496  void buildListOfFrames(std::vector<Frame*> &frm);
497 
502  void buildListOfContours(std::vector<Contour*> &cnt);
503 
508  void buildListOfModels(std::vector<ModellingInterface*> &modelList);
509 
514  void buildListOfInverseKineticsLinks(std::vector<Link*> &iklnk);
515 
520  void buildListOfObservers(std::vector<Observer*> &obsrv);
521 
525  void setUpInverseKinetics();
526 
530  void setUpLinks();
531 
535  bool gActiveChanged();
536 
540  bool gActiveChangedReg();
541 
545  bool detectImpact();
546 
550  void calcsvSize();
551 
555  void calclaSize(int j);
556 
560  void calcLinkStatusSize();
561 
565  void calcLinkStatusRegSize();
566 
571 
576 
580  void calcgSize(int j);
581 
592  void calcgdSize(int j);
593 
597  void calcrFactorSize(int j);
598 
603 
607  void setUpActiveLinks();
608 
623  void checkActive(int j);
624 
628  void checkActiveReg(int j);
629 
633  virtual void setGeneralizedRelativePositionTolerance(double tol);
634 
638  virtual void setGeneralizedRelativeVelocityTolerance(double tol);
639 
643  virtual void setGeneralizedRelativeAccelerationTolerance(double tol);
644 
648  virtual void setGeneralizedForceTolerance(double tol);
649 
653  virtual void setGeneralizedImpulseTolerance(double tol);
654 
657  virtual void setGeneralizedRelativePositionCorrectionValue(double corr);
658 
662  virtual void setGeneralizedRelativeVelocityCorrectionValue(double corr);
663 
667  void setrMax(double rMax);
668 
673  int frameIndex(const Frame *frame_) const;
674 
675  void addFrame(FixedRelativeFrame *frame);
676 
677  void addContour(RigidContour *contour);
678 
682  void addGroup(DynamicSystem *sys);
683 
689  DynamicSystem* getGroup(const std::string &name,bool check=true) const;
690 
694  void addObject(Object *obj);
695 
701  Object* getObject(const std::string &name,bool check=true) const;
702 
706  void addLink(Link *lnk);
707 
711  void addConstraint(Constraint *crt);
712 
716  void addInverseKineticsLink(Link *lnk);
717 
718  Observer* getObserver(const std::string &name,bool check=true) const;
719  void addObserver(Observer *ele);
720 
726  Link* getLink(const std::string &name,bool check=true) const;
727 
733  Constraint* getConstraint(const std::string &name,bool check=true) const;
734 
738  void addModel(ModellingInterface *model_);
739 
745  ModellingInterface* getModel(const std::string &name, bool check=true) const;
746 
748  Frame *getFrameI() { return I; }
749 
750  Element *getChildByContainerAndName(const std::string &container, const std::string &name) const override;
751 
752  virtual void updatecorr(int j);
753  void updatecorrRef(fmatvec::Vec &ref);
754  void calccorrSize(int j);
755 
756  void checkRoot();
757 
758  void resetUpToDate() override;
759 
760  void updateStateTable();
761 
762  private:
763  friend class DynamicSystemSolver;
764  void addFrame(Frame *frame_);
765 
766  void addContour(Contour *contour_);
767  protected:
768 
773 
777  std::vector<Object*> object;
778  std::vector<Object*> objectWithNonConstantMassMatrix;
779  std::vector<Link*> link;
780  std::vector<Link*> linkSingleValued;
781  std::vector<Link*> linkSetValued;
782  std::vector<Link*> linkSetValuedActive;
783  std::vector<ModellingInterface*> model;
784  std::vector<DynamicSystem*> dynamicsystem;
785  std::vector<Link*> inverseKineticsLink;
786  std::vector<Observer*> observer;
787  std::vector<Constraint*> constraint;
788 
793 
798 
803 
807  fmatvec::Vec q, qd, dq;
808 
812  fmatvec::Vec u, ud, du;
813 
817  fmatvec::Vec x, xd, dx;
818 
822  fmatvec::Vec h[2], r[2], rdt;
823 
827  fmatvec::Mat W[2], V[2];
828 
833 
838 
843 
848 
853 
858 
862  fmatvec::VecInt jsv;
863 
867  fmatvec::VecInt LinkStatus;
868 
872  fmatvec::VecInt LinkStatusReg;
873 
877  int qSize, qInd;
878 
882  int uSize[2], uInd[2];
883 
887  int xSize, xInd;
888 
892  int hSize[2], hInd[2];
893 
897  int gSize, gInd;
898 
902  int gdSize, gdInd;
903 
907  int laSize, laInd;
908 
912  int rFactorSize, rFactorInd;
913 
917  int svSize, svInd;
918 
922  int LinkStatusSize, LinkStatusInd;
923 
927  int LinkStatusRegSize, LinkStatusRegInd;
928 
932  std::vector<Frame*> frame;
933  std::vector<Contour*> contour;
934 
935  std::shared_ptr<OpenMBV::Group> openMBVGrp;
936  std::shared_ptr<H5::File> hdf5File;
937 
940 
944  int laInverseKineticsSize, bInverseKineticsSize;
945 
946  fmatvec::Mat WInverseKinetics, bInverseKinetics;
947  fmatvec::Vec laInverseKinetics;
948 
949  int corrSize, corrInd;
950  fmatvec::Vec corr;
951 
952  std::string saved_frameOfReference;
953  };
954 }
955 
956 #endif
957 
int rFactorSize
size and local start index of rfactors relative to parent
Definition: dynamic_system.h:912
void addConstraint(Constraint *crt)
Definition: dynamic_system.cc:1363
void setDynamicSystemSolver(DynamicSystemSolver *sys) override
Definition: dynamic_system.cc:309
bool gActiveChangedReg()
Definition: dynamic_system.cc:1045
virtual void setGeneralizedRelativeAccelerationTolerance(double tol)
Definition: dynamic_system.cc:1249
void updateLaRef(fmatvec::Vec &LaParent)
references to contact impulses of dynamic system parent
Definition: dynamic_system.cc:768
fmatvec::Vec q
positions, differentiated positions, initial positions
Definition: dynamic_system.h:807
virtual int jacobianConstraints()
compute JACOBIAN of contact equations
Definition: dynamic_system.cc:507
basic class for rigid contours
Definition: rigid_contour.h:37
int laInverseKineticsSize
size of contact force parameters of special links relative to parent
Definition: dynamic_system.h:944
int laSize
size and local start index of contact force parameters relative to parent
Definition: dynamic_system.h:907
solver interface for modelling and simulation of dynamic systems
Definition: dynamic_system_solver.h:56
virtual void updateVRef(fmatvec::Mat &VParent, int j=0)
references to condensed contact force direction matrix of dynamic system parent
Definition: dynamic_system.cc:810
void updateWInverseKineticsRef(fmatvec::Mat &WParent)
references to contact force direction matrix of dynamic system parent
Definition: dynamic_system.cc:796
void setUpObjectsWithNonConstantMassMatrix()
rearrange vector of active setvalued links
Definition: dynamic_system.cc:1206
Link * getLink(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:1378
virtual int solveImpactsRootFinding()
solve impact equations with Newton scheme on velocity level
Definition: dynamic_system.cc:499
Frame * getFrameI()
Definition: dynamic_system.h:748
void buildListOfObjects(std::vector< Object * > &obj)
build flat list of objects
Definition: dynamic_system.cc:934
fmatvec::SymMat LLM
Cholesky decomposition of mass matrix.
Definition: dynamic_system.h:802
Object * getObject(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:1339
void updateuRef(fmatvec::Vec &uParent)
references to velocities of dynamic system parent
Definition: dynamic_system.cc:599
void buildListOfContours(std::vector< Contour * > &cnt)
build flat list of contours
Definition: dynamic_system.cc:970
fmatvec::Mat T
linear relation matrix of position and velocity parameters
Definition: dynamic_system.h:792
void updateLinkStatusRegRef(fmatvec::VecInt &LinkStatusRegParent)
references to status vector of single valued links
Definition: dynamic_system.cc:861
fmatvec::VecInt LinkStatus
status of set-valued links
Definition: dynamic_system.h:867
void setUpLinks()
distribute links to set- and single valued container
Definition: dynamic_system.cc:1017
fmatvec::Vec u
velocities, differentiated velocities, initial velocities
Definition: dynamic_system.h:812
virtual void updaterFactors()
update relaxation factors for contact equations
Definition: dynamic_system.cc:535
int uSize[2]
size and local start index of velocities relative to parent
Definition: dynamic_system.h:882
fmatvec::Vec x
order one parameters, differentiated order one parameters, initial order one parameters
Definition: dynamic_system.h:817
cartesian frame on rigid bodies
Definition: fixed_relative_frame.h:31
virtual void checkImpactsForTermination()
validate force laws concerning given tolerances on velocity level
Definition: dynamic_system.cc:529
bool detectImpact()
Definition: dynamic_system.cc:1055
virtual void updatewbRef(fmatvec::Vec &wbParent)
references to TODO of dynamic system parent
Definition: dynamic_system.cc:782
virtual void setGeneralizedForceTolerance(double tol)
Definition: dynamic_system.cc:1256
virtual int solveConstraintsRootFinding()
solve contact equations with Newton scheme
Definition: dynamic_system.cc:491
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: dynamic_system.cc:374
void buildListOfInverseKineticsLinks(std::vector< Link * > &iklnk)
build flat list of inverse kinetics links
Definition: dynamic_system.cc:988
virtual Contour * getContour(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:555
void updateresRef(fmatvec::Vec &resParent)
references to residuum of contact equations of dynamic system parent
Definition: dynamic_system.cc:837
virtual void setGeneralizedRelativePositionCorrectionValue(double corr)
Definition: dynamic_system.cc:1270
int LinkStatusSize
size and local start index of set-valued link status vector relative to parent
Definition: dynamic_system.h:922
Element * getChildByContainerAndName(const std::string &container, const std::string &name) const override
Get the Element named name in the container named container.
Definition: dynamic_system.cc:1447
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
basic class of MBSim mainly for plotting
Definition: element.h:56
void updaterFactorRef(fmatvec::Vec &rFactorParent)
references to relaxation factors for contact equations of dynamic system parent
Definition: dynamic_system.cc:844
void addObject(Object *obj)
Definition: dynamic_system.cc:1438
int gSize
size and local start index of relative distances relative to parent
Definition: dynamic_system.h:897
void addInverseKineticsLink(Link *lnk)
Definition: dynamic_system.cc:1373
void buildListOfConstraints(std::vector< Constraint * > &crt)
build flat list of all constraints
Definition: dynamic_system.cc:952
int gdSize
size and local start index of relative velocities relative to parent
Definition: dynamic_system.h:902
virtual void updateWRef(fmatvec::Mat &WParent, int j=0)
references to contact force direction matrix of dynamic system parent
Definition: dynamic_system.cc:789
void plotAtSpecialEvent() override
plots time dependent data at special events
Definition: dynamic_system.cc:355
fmatvec::Vec h[2]
smooth, smooth with respect to objects, smooth with respect to links and nonsmooth
Definition: dynamic_system.h:822
void calcrFactorSize(int j)
calculates size of relaxation factors for contact equations
Definition: dynamic_system.cc:1196
void calcbInverseKineticsSize()
calculates size of contact force parameters
Definition: dynamic_system.cc:1166
virtual void setGeneralizedImpulseTolerance(double tol)
Definition: dynamic_system.cc:1263
std::vector< Frame * > frame
vector of frames and contours
Definition: dynamic_system.h:932
void updaterRef(fmatvec::Vec &rParent, int j=0)
references to nonsmooth right hand side of dynamic system parent
Definition: dynamic_system.cc:697
fmatvec::Vec res
residuum of nonlinear contact equations for Newton scheme
Definition: dynamic_system.h:847
void updatelaRef(fmatvec::Vec &laParent)
references to contact forces of dynamic system parent
Definition: dynamic_system.cc:761
void updateLLMRef(fmatvec::SymMat &LLMParent)
references to Cholesky decomposition of dynamic system parent
Definition: dynamic_system.cc:737
virtual void setGeneralizedRelativePositionTolerance(double tol)
Definition: dynamic_system.cc:1235
void buildListOfFrames(std::vector< Frame * > &frm)
build flat list of frames
Definition: dynamic_system.cc:961
dynamic system as topmost hierarchical level
Definition: dynamic_system.h:58
void buildListOfObservers(std::vector< Observer * > &obsrv)
build flat list of observers
Definition: dynamic_system.cc:997
Frame * I
Definition: dynamic_system.h:939
Frame * R
parent frame
Definition: dynamic_system.h:772
void calclaInverseKineticsSize()
calculates size of contact force parameters
Definition: dynamic_system.cc:1156
void calcLinkStatusSize()
calculates size of set-valued link status vector
Definition: dynamic_system.cc:1103
virtual int solveImpactsGaussSeidel()
solve impact equations with Gauss-Seidel scheme on velocity level
Definition: dynamic_system.cc:483
void plot() override
plots time dependent data
Definition: dynamic_system.cc:336
fmatvec::VecInt LinkStatusReg
status of single-valued links
Definition: dynamic_system.h:872
void checkActive(int j)
check if set-valued contacts are active and set corresponding attributes
Definition: dynamic_system.cc:1224
InitStage
The stages of the initialization.
Definition: element.h:62
void updatejsvRef(fmatvec::VecInt &jsvParent)
references to boolean evaluation of stopvector concerning roots of dynamic system parent
Definition: dynamic_system.cc:827
int qSize
size and local start index of positions relative to parent
Definition: dynamic_system.h:877
virtual int solveConstraintsGaussSeidel()
solve contact equations with Gauss-Seidel scheme
Definition: dynamic_system.cc:475
DynamicSystem(const std::string &name)
constructor
Definition: dynamic_system.cc:45
ModellingInterface * getModel(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:1415
void setUpActiveLinks()
rearrange vector of active setvalued links
Definition: dynamic_system.cc:1214
void addModel(ModellingInterface *model_)
Definition: dynamic_system.cc:1406
void buildListOfModels(std::vector< ModellingInterface * > &modelList)
build flat list of models
Definition: dynamic_system.cc:979
DynamicSystem * getGroup(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:1325
void buildListOfLinks(std::vector< Link * > &lnk)
build flat list of links
Definition: dynamic_system.cc:943
void updateuallRef(fmatvec::Vec &uParent)
references to velocities of dynamic system parent
Definition: dynamic_system.cc:609
void setrMax(double rMax)
Definition: dynamic_system.cc:1284
std::string name
name of element
Definition: element.h:235
void updateqdRef(fmatvec::Vec &qdParent)
references to differentiated positions of dynamic system parent
Definition: dynamic_system.cc:579
void updatehRef(fmatvec::Vec &hParent, int j=0)
references to smooth right hand side of dynamic system parent
Definition: dynamic_system.cc:684
void updatesvRef(fmatvec::Vec &svParent)
references to stopvector (rootfunction for event driven integrator) of dynamic system parent
Definition: dynamic_system.cc:817
int LinkStatusRegSize
size and local start index of single-valued link status vector relative to parent
Definition: dynamic_system.h:927
void calcgdSize(int j)
calculates size of gap velocities
Definition: dynamic_system.cc:1186
fmatvec::Vec wb
TODO.
Definition: dynamic_system.h:842
Class for constraints between generalized coordinates of objects.
Definition: constraint.h:30
virtual Frame * getFrame(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:541
virtual void checkConstraintsForTermination()
validate force laws concerning given tolerances
Definition: dynamic_system.cc:523
int svSize
size and local start index of stop vector relative to parent
Definition: dynamic_system.h:917
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
Interface for models of arbitrary domains, e.g. electrical components.
Definition: modelling_interface.h:35
fmatvec::Vec rFactor
rfactors for relaxation nonlinear contact equations
Definition: dynamic_system.h:852
Constraint * getConstraint(const std::string &name, bool check=true) const
Definition: dynamic_system.cc:1392
void calcgSize(int j)
calculates size of relative distances
Definition: dynamic_system.cc:1176
fmatvec::Vec sv
stop vector (root functions for event driven integration
Definition: dynamic_system.h:857
void updateudRef(fmatvec::Vec &udParent)
references to differentiated velocities of dynamic system parent
Definition: dynamic_system.cc:617
virtual int solveImpactsFixpointSingle()
solve impact equations with single step fixed point scheme on velocity level
Definition: dynamic_system.cc:467
void updateTRef(fmatvec::Mat &TParent)
references to linear transformation matrix between differentiated positions and velocities of dynamic...
Definition: dynamic_system.cc:717
fmatvec::Vec g
relative distances and velocities
Definition: dynamic_system.h:837
void calcLinkStatusRegSize()
calculates size of single-valued link status vector
Definition: dynamic_system.cc:1118
bool gActiveChanged()
Definition: dynamic_system.cc:1035
virtual void setGeneralizedRelativeVelocityCorrectionValue(double corr)
Definition: dynamic_system.cc:1277
void updateqRef(fmatvec::Vec &qParent)
references to positions of dynamic system parent
Definition: dynamic_system.cc:569
virtual void updategRef(fmatvec::Vec &gParent)
references to relative distances of dynamic system parent
Definition: dynamic_system.cc:747
H5::GroupBase * plotGroup
associated plot group
Definition: element.h:272
void calcsvSize()
calculates size of stop vector
Definition: dynamic_system.cc:1133
void checkActiveReg(int j)
check if single-valued contacts are active
Definition: dynamic_system.cc:1230
virtual void setGeneralizedRelativeVelocityTolerance(double tol)
Definition: dynamic_system.cc:1242
~DynamicSystem() override
destructor
Definition: dynamic_system.cc:61
std::vector< Object * > object
container for possible ingredients
Definition: dynamic_system.h:777
fmatvec::Vec la
contact force parameters
Definition: dynamic_system.h:832
void updateLinkStatusRef(fmatvec::VecInt &LinkStatusParent)
references to status vector of set valued links with piecewise link equations (which piece is valid)
Definition: dynamic_system.cc:851
Definition: observer.h:26
void updateMRef(fmatvec::SymMat &MParent)
references to mass matrix of dynamic system parent
Definition: dynamic_system.cc:727
void setUpInverseKinetics()
analyse constraints of dynamic systems for usage in inverse kinetics
Definition: dynamic_system.cc:1006
int frameIndex(const Frame *frame_) const
Definition: dynamic_system.cc:1317
int hSize[2]
size and local start index of order smooth right hand side relative to parent
Definition: dynamic_system.h:892
void updaterdtRef(fmatvec::Vec &rdtParent)
references to nonsmooth right hand side of dynamic system parent
Definition: dynamic_system.cc:707
int xSize
size and local start index of order one parameters relative to parent
Definition: dynamic_system.h:887
void calclaSize(int j)
calculates size of contact force parameters
Definition: dynamic_system.cc:1146
fmatvec::VecInt jsv
boolean evaluation of stop vector concerning roots
Definition: dynamic_system.h:862
virtual int solveConstraintsFixpointSingle()
solve contact equations with single step fixed point scheme
Definition: dynamic_system.cc:459
virtual int jacobianImpacts()
compute JACOBIAN of contact equations on velocity level
Definition: dynamic_system.cc:515
void addLink(Link *lnk)
Definition: dynamic_system.cc:1353
fmatvec::SymMat M
mass matrix
Definition: dynamic_system.h:797
void buildListOfDynamicSystems(std::vector< DynamicSystem * > &sys)
build flat list of dynamic systems
Definition: dynamic_system.cc:925
void updateudallRef(fmatvec::Vec &udParent)
references to velocities of dynamic system parent
Definition: dynamic_system.cc:637
void addGroup(DynamicSystem *sys)
Definition: dynamic_system.cc:1429
virtual void updategdRef(fmatvec::Vec &gdParent)
references to relative velocities of dynamic system parent
Definition: dynamic_system.cc:754
class for all objects having own dynamics and mass
Definition: object.h:43
namespace MBSim
Definition: eigenanalyzer.cc:47