mbsim  4.0.0
MBSim Kernel
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 _CONTOUR_H_
21#define _CONTOUR_H_
22
23#include "mbsim/element.h"
24
25namespace MBSim {
26
27 class ContourFrame;
28 class ContactKinematics;
29
40 class Contour : public Element {
41 public:
46 Contour(const std::string &name);
47
51 ~Contour() override = default;
52
53 /* INHERITED INTERFACE OF ELEMENT */
54 /***************************************************/
55
61 virtual ContactKinematics * findContactPairingWith(const std::type_info &type0, const std::type_info &type1) = 0;
62
63 virtual ContourFrame* createContourFrame(const std::string &name="P") { return nullptr; }
64
65 const std::vector<double>& getEtaNodes() const { return etaNodes; }
66 const std::vector<double>& getXiNodes() const { return xiNodes; }
67
68 void setEtaNodes(const std::vector<double> &etaNodes_) { etaNodes = etaNodes_; }
69 void setXiNodes(const std::vector<double> &xiNodes_) { xiNodes = xiNodes_; }
70
71 virtual int gethSize(int i=0) const { return hSize[i]; }
72 virtual int gethInd(int i=0) const { return hInd[i]; }
73 virtual void sethSize(int size, int i=0) { hSize[i] = size; }
74 virtual void sethInd(int ind, int i=0) { hInd[i] = ind; }
75
80 virtual fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta);
81
87 virtual fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta);
88
93 virtual fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta);
94
99 virtual fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta);
100
106 virtual fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta);
107
113 virtual fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta);
114
120 virtual fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta);
121
127 virtual fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta);
128
134 virtual fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta);
135
141 virtual fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta);
142
148 virtual fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta);
149
155 virtual fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta);
156
157 virtual fmatvec::Mat3x2 evalWN(const fmatvec::Vec2 &zeta);
158
159 virtual fmatvec::Mat3x2 evalWR(const fmatvec::Vec2 &zeta);
160
161 virtual fmatvec::Mat3x2 evalWU(const fmatvec::Vec2 &zeta);
162
163 virtual fmatvec::Mat3x2 evalWV(const fmatvec::Vec2 &zeta);
164
165 virtual fmatvec::Vec3 evalParWvCParEta(const fmatvec::Vec2 &zeta);
166
167 virtual fmatvec::Vec3 evalParWvCParXi(const fmatvec::Vec2 &zeta);
168
169 virtual fmatvec::Mat3x2 evalParWvCParZeta(const fmatvec::Vec2 &zeta);
170
171 virtual fmatvec::Vec3 evalParWnPart(const fmatvec::Vec2 &zeta);
172
173 virtual fmatvec::Vec3 evalParWuPart(const fmatvec::Vec2 &zeta);
174
175 virtual fmatvec::Vec3 evalParWvPart(const fmatvec::Vec2 &zeta);
176
177 virtual fmatvec::Vec2 evalZeta(const fmatvec::Vec3 &WrPS);
178
179 virtual fmatvec::Vec2 evalCurvatures(const fmatvec::Vec2 &zeta);
180
181 void initializeUsingXML(xercesc::DOMElement *element) override;
182
183 void setThickness(double thickness_) { thickness = thickness_; }
184 double getThickness() const { return thickness; }
185
186 virtual bool isZetaOutside(const fmatvec::Vec2 &zeta) { return false; }
187
188 void createPlotGroup() override;
189
190 protected:
194 int hSize[2], hInd[2];
195
196 std::vector<double> etaNodes;
197 std::vector<double> xiNodes;
198
202 double thickness;
203
204 static fmatvec::Vec3 zero3;
205 static fmatvec::Vec3 ex;
206 static fmatvec::Vec3 ey;
207 static fmatvec::Vec3 ez;
208 };
209
210}
211
212#endif /* _CONTOUR_H_ */
basic class for contact kinematical calculations
Definition: contact_kinematics.h:41
Definition: contour_frame.h:27
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
double thickness
thickness of contour
Definition: contour.h:202
virtual fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta)
Definition: contour.cc:89
int hSize[2]
size and index of right hand side for frame JACOBIAN settings
Definition: contour.h:194
void createPlotGroup() override
creates the plotGroup for H5-output
Definition: contour.cc:162
virtual fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:73
virtual fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:52
~Contour() override=default
destructor
virtual fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta)
Definition: contour.cc:85
virtual fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:56
Contour(const std::string &name)
constructor
Definition: contour.cc:36
virtual fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:77
virtual fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:61
virtual fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:69
virtual fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:65
virtual fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta)
Definition: contour.cc:43
virtual fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:47
virtual fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:81
virtual ContactKinematics * findContactPairingWith(const std::type_info &type0, const std::type_info &type1)=0
find contact kinematics
basic class of MBSim mainly for plotting
Definition: element.h:56
std::string name
name of element
Definition: element.h:260
namespace MBSim
Definition: bilateral_constraint.cc:30