mbsim 4.0.0 MBSim Kernel

fixed_contour_frame.h
1 /* Copyright (C) 2004-2014 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 _FIXED_CONTOUR_FRAME_H__
21 #define _FIXED_CONTOUR_FRAME_H__
22
23 #include "mbsim/frames/contour_frame.h"
24
25 namespace MBSim {
26
27 class Contour;
28
29 class FixedContourFrame : public ContourFrame {
30
31 public:
32 FixedContourFrame(const std::string &name = "dummy", const fmatvec::Vec2 &zeta = fmatvec::Vec2(), Contour *contour_=nullptr) : ContourFrame(name,zeta), contour(contour_) { }
33
34 const fmatvec::Vec2& evalZeta() override { return zeta; }
35 const fmatvec::Vec2& getZeta(bool check=true) override { return zeta; }
36 double evalEta() override { return zeta(0); }
37 double evalXi() override { return zeta(1); }
38 double getEta(bool check=true) override { return zeta(0); }
39 double getXi(bool check=true) override { return zeta(1); }
40
41 void updatePositions() override;
42 void updateVelocities() override;
43 void updateAccelerations() override;
44 void updateJacobians(int j=0) override;
45 void updateGyroscopicAccelerations() override;
46
47 void setContourOfReference(Contour *contour_) { contour = contour_; }
48
49 protected:
50 Contour *contour;
51 };
52
53 }
54
55 #endif
MBSim::Contour
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
MBSim::ContourFrame
Definition: contour_frame.h:27
MBSim::Element::name
std::string name
name of element
Definition: element.h:260
MBSim::FixedContourFrame
Definition: fixed_contour_frame.h:29
MBSim::ContourFrame::zeta
fmatvec::Vec2 zeta
contour parameters of the frame
Definition: contour_frame.h:48
MBSim
namespace MBSim
Definition: bilateral_constraint.cc:30