mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
2s.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_2S_H_
21#define _FLEXIBLE_BODY_2S_H_
22
23#include "mbsimFlexibleBody/flexible_body.h"
24#include <openmbvcppinterface/spineextrusion.h>
25
26namespace MBSim {
27 class ContourFrame;
28}
29
30namespace MBSimFlexibleBody {
31
32 class Frame2s;
33
38 class FlexibleBody2s : public FlexibleBodyContinuum<fmatvec::Vec2> {
39 public:
44 FlexibleBody2s(const std::string &name) : FlexibleBodyContinuum<fmatvec::Vec2>(name) { } //, L(0), openStructure(openStructure_) { }
45
46 void init(InitStage stage, const MBSim::InitConfigSet &config) override;
47 void plot() override;
48
49// void setLength(double L_) { L = L_; }
50// double getLength(){ return L; }
51
52 void addFrame(Frame2s *frame);
53 using FlexibleBodyContinuum<fmatvec::Vec2>::addFrame;
54
55 virtual void updatePositions(Frame2s* frame);
56 virtual void updateVelocities(Frame2s* frame);
57 virtual void updateAccelerations(Frame2s* frame);
58 virtual void updateJacobians(Frame2s* frame, int j=0);
59 virtual void updateGyroscopicAccelerations(Frame2s* frame);
60
61 void setOpenMBVSpineExtrusion(const std::shared_ptr<OpenMBV::SpineExtrusion> &body) { openMBVBody=body; }
62
63 protected:
64// /**
65// * \brief length of beam
66// */
67// double L;
68//
69// /**
70// * \brief flag for open (cantilever beam) or closed (rings) structures
71// */
72// bool openStructure;
73 };
74
75}
76
77#endif
tbd
Definition: 2s.h:38
FlexibleBody2s(const std::string &name)
constructor:
Definition: 2s.h:44
flexible body entirely described within MBSim holding all informations about continuum approximations
Definition: flexible_body.h:227
Definition: frame_2s.h:27
std::vector< Frame * > frame
std::string name