All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
flexible_body_1s.h
1 /* Copyright (C) 2004-2015 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef _FLEXIBLE_BODY_1S_H_
21 #define _FLEXIBLE_BODY_1S_H_
22 
23 #include "mbsimFlexibleBody/flexible_body.h"
24 #include "mbsimFlexibleBody/frames/frame_1s.h"
25 #include <openmbvcppinterface/spineextrusion.h>
26 
27 namespace MBSimFlexibleBody {
28 
33  class FlexibleBody1s : public FlexibleBodyContinuum<double> {
34  public:
39  FlexibleBody1s(const std::string &name, bool openStructure);
40 
41  virtual void init(InitStage stage);
42  virtual void plot();
43 
44  void setLength(double L_) { L = L_; }
45  double getLength() const { return L; }
46 
47  bool getOpenStructure() const { return openStructure; }
48 
49  void addFrame(Frame1s *frame);
51 
52  virtual void updatePositions(Frame1s* frame);
53  virtual void updateVelocities(Frame1s* frame);
54  virtual void updateAccelerations(Frame1s* frame);
55  virtual void updateJacobians(Frame1s* frame, int j=0);
56  virtual void updateGyroscopicAccelerations(Frame1s* frame);
57 
58  virtual fmatvec::Vec3 getPosition(double s);
59  virtual fmatvec::SqrMat3 getOrientation(double s);
60  virtual fmatvec::Vec3 getAngles(double s) { return fmatvec::Vec3(); }
61 
62  void setOpenMBVSpineExtrusion(const std::shared_ptr<OpenMBV::SpineExtrusion> &body) { openMBVBody=body; }
63 
64  protected:
68  double L;
69 
74 
75  Frame1s P;
76  };
77 
78 }
79 
80 #endif
tbd
Definition: flexible_body_1s.h:33
Definition: frame_1s.h:27
FlexibleBody1s(const std::string &name, bool openStructure)
constructor:
Definition: flexible_body_1s.cc:32
bool openStructure
flag for open (cantilever beam) or closed (rings) structures
Definition: flexible_body_1s.h:73
flexible body entirely described within MBSim holding all informations about continuum approximations...
Definition: flexible_body.h:240
std::vector< Frame * > frame
double L
length of beam
Definition: flexible_body_1s.h:68

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML