mbsim 4.0.0 MBSim Kernel

rigid_contour.h
1 /* Copyright (C) 2004-2009 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 _RIGID_CONTOUR_H_
21 #define _RIGID_CONTOUR_H_
22
23 #include "mbsim/contours/contour.h"
24
25 namespace OpenMBV {
26 class RigidBody;
27 }
28
29 namespace MBSim {
30
37 class RigidContour : public Contour {
38 public:
43 RigidContour(const std::string &name, Frame *R_=nullptr) : Contour(name), R(R_) {}
44
45 ~RigidContour() override = default;
46
47 ContourFrame* createContourFrame(const std::string &name="P") override;
48
49 Frame* getFrame() { return R; }
50 Frame* getFrameOfReference() { return R; }
51 void setFrameOfReference(Frame *frame) { R = frame; }
52 void setFrameOfReference(const std::string &frame) { saved_frameOfReference = frame; }
53
54 /* INHERITED INTERFACE OF ELEMENT */
55 void plot() override;
56 void init(InitStage stage, const InitConfigSet &config) override;
57 /***************************************************/
58
59 virtual fmatvec::Vec3 evalKrPS(const fmatvec::Vec2 &zeta);
60 virtual fmatvec::Vec3 evalKs(const fmatvec::Vec2 &zeta);
61 virtual fmatvec::Vec3 evalKt(const fmatvec::Vec2 &zeta);
62 virtual fmatvec::Vec3 evalKu(const fmatvec::Vec2 &zeta);
63 virtual fmatvec::Vec3 evalKv(const fmatvec::Vec2 &zeta);
64 virtual fmatvec::Vec3 evalKn(const fmatvec::Vec2 &zeta);
65 virtual fmatvec::Vec3 evalParDer1Ks(const fmatvec::Vec2 &zeta);
66 virtual fmatvec::Vec3 evalParDer2Ks(const fmatvec::Vec2 &zeta);
67 virtual fmatvec::Vec3 evalParDer1Kt(const fmatvec::Vec2 &zeta);
68 virtual fmatvec::Vec3 evalParDer2Kt(const fmatvec::Vec2 &zeta);
69 virtual fmatvec::Vec3 evalParDer1Kn(const fmatvec::Vec2 &zeta);
70 virtual fmatvec::Vec3 evalParDer2Kn(const fmatvec::Vec2 &zeta);
71
77 virtual fmatvec::Vec3 evalParDer1Ku(const fmatvec::Vec2 &zeta);
78
85 virtual fmatvec::Vec3 evalParDer2Ku(const fmatvec::Vec2 &zeta);
91 virtual fmatvec::Vec3 evalParDer1Kv(const fmatvec::Vec2 &zeta);
92
98 virtual fmatvec::Vec3 evalParDer2Kv(const fmatvec::Vec2 &zeta);
99
100 fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta) override;
101 fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta) override;
102 fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta) override;
103 fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta) override;
104 fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta) override;
105 fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta) override;
106 fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta) override;
107 fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta) override;
108 fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta) override;
109 fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta) override;
110 fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta) override;
111 fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta) override;
112 fmatvec::Vec3 evalParWvCParEta(const fmatvec::Vec2 &zeta) override;
113 fmatvec::Vec3 evalParWvCParXi(const fmatvec::Vec2 &zeta) override;
114 fmatvec::Vec3 evalParWnPart(const fmatvec::Vec2 &zeta) override;
115 fmatvec::Vec3 evalParWuPart(const fmatvec::Vec2 &zeta) override;
116 fmatvec::Vec3 evalParWvPart(const fmatvec::Vec2 &zeta) override;
117
123 ContactKinematics * findContactPairingWith(const std::type_info &type0, const std::type_info &type1) override;
124
125 void initializeUsingXML(xercesc::DOMElement *element) override;
126
127 std::shared_ptr<OpenMBV::RigidBody>& getOpenMBVRigidBody() { return openMBVRigidBody; }
128
129 protected:
133 Frame *R;
134
135 std::shared_ptr<OpenMBV::RigidBody> openMBVRigidBody;
136
137 private:
138 std::string saved_frameOfReference;
139 };
140
141 }
142
143 #endif
MBSim::RigidContour::evalParDer2Ku
virtual fmatvec::Vec3 evalParDer2Ku(const fmatvec::Vec2 &zeta)
Definition: rigid_contour.cc:104
MBSim::RigidContour
basic class for rigid contours
Definition: rigid_contour.h:37
MBSim::RigidContour::evalParDer1Wu
fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:154
MBSim::RigidContour::evalParDer2Wu
fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:158
MBSim::RigidContour::evalParDer2Wn
fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:150
MBSim::RigidContour::RigidContour
RigidContour(const std::string &name, Frame *R_=nullptr)
constructor
Definition: rigid_contour.h:43
MBSim::RigidContour::evalParDer2Wv
fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:166
MBSim::RigidContour::init
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: rigid_contour.cc:36
MBSim::RigidContour::evalWn
fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:142
MBSim::Contour
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
MBSim::RigidContour::evalWu
fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:134
MBSim::RigidContour::evalWv
fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:138
MBSim::RigidContour::findContactPairingWith
ContactKinematics * findContactPairingWith(const std::type_info &type0, const std::type_info &type1) override
contact search for RigidContours
Definition: rigid_contour.cc:215
MBSim::RigidContour::evalParDer1Ku
virtual fmatvec::Vec3 evalParDer1Ku(const fmatvec::Vec2 &zeta)
Definition: rigid_contour.cc:98
MBSim::RigidContour::evalParDer1Wv
fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:162
MBSim::RigidContour::evalWs
fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:170
MBSim::RigidContour::evalParDer2Kv
virtual fmatvec::Vec3 evalParDer2Kv(const fmatvec::Vec2 &zeta)
Definition: rigid_contour.cc:114
MBSim::Element::InitStage
InitStage
The stages of the initialization.
Definition: element.h:62
MBSim::ContourFrame
Definition: contour_frame.h:27
MBSim::Element::name
std::string name
name of element
Definition: element.h:260
MBSim::RigidContour::plot
void plot() override
plots time dependent data
Definition: rigid_contour.cc:198
MBSim::Frame
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
MBSim::RigidContour::evalParDer1Kv
virtual fmatvec::Vec3 evalParDer1Kv(const fmatvec::Vec2 &zeta)
Definition: rigid_contour.cc:110
MBSim::RigidContour::evalPosition
fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:130
MBSim::RigidContour::R
Frame * R
coordinate system of contour
Definition: rigid_contour.h:133
MBSim::RigidContour::evalParDer1Wn
fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:146
MBSim::RigidContour::evalWt
fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta) override
Definition: rigid_contour.cc:174
MBSim
namespace MBSim
Definition: bilateral_constraint.cc:30