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
25 namespace 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 void initializeUsingXML(xercesc::DOMElement *element) override;
180
181 void setThickness(double thickness_) { thickness = thickness_; }
182 double getThickness() const { return thickness; }
183
184 virtual bool isZetaOutside(const fmatvec::Vec2 &zeta) { return false; }
185
186 void createPlotGroup() override;
187
188 protected:
192 int hSize[2], hInd[2];
193
194 std::vector<double> etaNodes;
195 std::vector<double> xiNodes;
196
200 double thickness;
201
202 static fmatvec::Vec3 zero3;
203 static fmatvec::Vec3 ex;
204 static fmatvec::Vec3 ey;
205 static fmatvec::Vec3 ez;
206 };
207
208 }
209
210 #endif /* _CONTOUR_H_ */
MBSim::Contour::evalWv
virtual fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:52
MBSim::Contour::hSize
int hSize[2]
size and index of right hand side for frame JACOBIAN settings
Definition: contour.h:192
MBSim::Contour::evalWu
virtual fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:47
MBSim::Contour::evalParDer2Wu
virtual fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:73
MBSim::Contour::evalParDer2Wv
virtual fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:81
MBSim::Contour
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
MBSim::Element
basic class of MBSim mainly for plotting
Definition: element.h:56
MBSim::Contour::evalWt
virtual fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta)
Definition: contour.cc:89
MBSim::Contour::Contour
Contour(const std::string &name)
constructor
Definition: contour.cc:36
MBSim::ContourFrame
Definition: contour_frame.h:27
MBSim::Contour::evalParDer1Wv
virtual fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:77
MBSim::Contour::evalWn
virtual fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:56
MBSim::Element::name
std::string name
name of element
Definition: element.h:260
MBSim::Contour::evalWs
virtual fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta)
Definition: contour.cc:85
MBSim::Contour::thickness
double thickness
thickness of contour
Definition: contour.h:200
MBSim::Contour::evalParDer1Wu
virtual fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:69
MBSim::Contour::findContactPairingWith
virtual ContactKinematics * findContactPairingWith(const std::type_info &type0, const std::type_info &type1)=0
find contact kinematics
MBSim::ContactKinematics
basic class for contact kinematical calculations
Definition: contact_kinematics.h:41
MBSim::Contour::createPlotGroup
void createPlotGroup() override
creates the plotGroup for H5-output
Definition: contour.cc:158
MBSim::Contour::~Contour
~Contour() override=default
destructor
MBSim::Contour::evalParDer1Wn
virtual fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:61
MBSim::Contour::evalParDer2Wn
virtual fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:65
MBSim::Contour::evalPosition
virtual fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta)
Definition: contour.cc:43
MBSim
namespace MBSim
Definition: bilateral_constraint.cc:30