All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
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  virtual ~Contour() { }
52 
53  /* INHERITED INTERFACE OF ELEMENT */
54  virtual std::string getType() const { return "Contour"; }
55  /***************************************************/
56 
62  virtual ContactKinematics * findContactPairingWith(std::string type0, std::string type1) = 0;
63 
64  virtual ContourFrame* createContourFrame(const std::string &name="P") { return NULL; }
65 
66  const std::vector<double>& getEtaNodes() const { return etaNodes; }
67  const std::vector<double>& getXiNodes() const { return xiNodes; }
68 
69  void setEtaNodes(const std::vector<double> &etaNodes_) { etaNodes = etaNodes_; }
70  void setXiNodes(const std::vector<double> &xiNodes_) { xiNodes = xiNodes_; }
71 
72  virtual int gethSize(int i=0) const { return hSize[i]; }
73  virtual int gethInd(int i=0) const { return hInd[i]; }
74  virtual void sethSize(int size, int i=0) { hSize[i] = size; }
75  virtual void sethInd(int ind, int i=0) { hInd[i] = ind; }
76 
77  virtual fmatvec::Vec3 evalKrPS(const fmatvec::Vec2 &zeta);
78  virtual fmatvec::Vec3 evalKs(const fmatvec::Vec2 &zeta);
79  virtual fmatvec::Vec3 evalKt(const fmatvec::Vec2 &zeta);
80  virtual fmatvec::Vec3 evalParDer1Ks(const fmatvec::Vec2 &zeta);
81  virtual fmatvec::Vec3 evalParDer2Ks(const fmatvec::Vec2 &zeta);
82  virtual fmatvec::Vec3 evalParDer1Kt(const fmatvec::Vec2 &zeta);
83  virtual fmatvec::Vec3 evalParDer2Kt(const fmatvec::Vec2 &zeta);
84 
89  virtual fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta);
90 
91  virtual fmatvec::Vec3 evalKu(const fmatvec::Vec2 &zeta);
92  virtual fmatvec::Vec3 evalKv(const fmatvec::Vec2 &zeta);
93  virtual fmatvec::Vec3 evalKn(const fmatvec::Vec2 &zeta);
94 
100  virtual fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta);
101 
106  virtual fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta);
107 
112  virtual fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta);
113 
114  virtual fmatvec::Vec3 evalParDer1Kn(const fmatvec::Vec2 &zeta);
115 
116  virtual fmatvec::Vec3 evalParDer2Kn(const fmatvec::Vec2 &zeta);
117 
123  virtual fmatvec::Vec3 evalParDer1Ku(const fmatvec::Vec2 &zeta);
124 
131  virtual fmatvec::Vec3 evalParDer2Ku(const fmatvec::Vec2 &zeta);
137  virtual fmatvec::Vec3 evalParDer1Kv(const fmatvec::Vec2 &zeta);
138 
144  virtual fmatvec::Vec3 evalParDer2Kv(const fmatvec::Vec2 &zeta);
145 
151  virtual fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta);
152 
158  virtual fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta);
159 
165  virtual fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta);
166 
172  virtual fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta);
173 
179  virtual fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta);
180 
186  virtual fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta);
187 
193  virtual fmatvec::Vec3 evalWrPS(const fmatvec::Vec2 &zeta);
194 
200  virtual fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta);
201 
207  virtual fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta);
208 
209  virtual fmatvec::Mat3x2 evalWN(const fmatvec::Vec2 &zeta);
210 
211  virtual fmatvec::Mat3x2 evalWR(const fmatvec::Vec2 &zeta);
212 
213  virtual fmatvec::Mat3x2 evalWU(const fmatvec::Vec2 &zeta);
214 
215  virtual fmatvec::Mat3x2 evalWV(const fmatvec::Vec2 &zeta);
216 
217  virtual fmatvec::Vec2 evalZeta(const fmatvec::Vec3 &WrPS);
218 
219  virtual void updatePositions(ContourFrame *frame);
220  virtual void updateVelocities(ContourFrame *frame);
221  virtual void updateAccelerations(ContourFrame *frame);
222  virtual void updateJacobians(ContourFrame *frame, int j=0);
223  virtual void updateGyroscopicAccelerations(ContourFrame *frame);
224 
225  virtual void initializeUsingXML(xercesc::DOMElement *element);
226 
227  void setThickness(double thickness_) { thickness = thickness_; }
228  double getThickness() const { return thickness; }
229 
230  virtual bool isZetaOutside(const fmatvec::Vec2 &zeta) { return false; }
231 
232  protected:
236  int hSize[2], hInd[2];
237 
238  std::vector<double> etaNodes;
239  std::vector<double> xiNodes;
240 
244  double thickness;
245  };
246 
247 }
248 
249 #endif /* _CONTOUR_H_ */
virtual fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:95
int hSize[2]
size and index of right hand side for frame JACOBIAN settings
Definition: contour.h:236
virtual fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:90
virtual fmatvec::Vec3 evalParDer2Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:151
virtual fmatvec::Vec3 evalParDer2Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:161
virtual fmatvec::Vec3 evalParDer2Ku(const fmatvec::Vec2 &zeta)
Definition: contour.cc:110
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
basic class of MBSim mainly for plotting
Definition: element.h:58
virtual fmatvec::Vec3 evalParDer1Kv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:116
virtual fmatvec::Vec3 evalParDer1Ku(const fmatvec::Vec2 &zeta)
Definition: contour.cc:104
virtual std::string getType() const
Definition: contour.h:54
virtual fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta)
Definition: contour.cc:176
virtual fmatvec::Vec3 evalParDer2Kv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:120
Contour(const std::string &name)
constructor
Definition: contour.cc:30
Definition: contour_frame.h:27
virtual fmatvec::Vec3 evalParDer1Wv(const fmatvec::Vec2 &zeta)
Definition: contour.cc:156
virtual fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:99
std::string name
name of element
Definition: element.h:298
virtual fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta)
Definition: contour.cc:171
double thickness
thickness of contour
Definition: contour.h:244
virtual ~Contour()
destructor
Definition: contour.h:51
virtual fmatvec::Vec3 evalParDer1Wu(const fmatvec::Vec2 &zeta)
Definition: contour.cc:146
virtual fmatvec::Vec3 evalWrPS(const fmatvec::Vec2 &zeta)
Definition: contour.cc:166
basic class for contact kinematical calculations
Definition: contact_kinematics.h:39
virtual fmatvec::Vec3 evalParDer1Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:136
virtual ContactKinematics * findContactPairingWith(std::string type0, std::string type1)=0
find contact kinematics
virtual fmatvec::Vec3 evalParDer2Wn(const fmatvec::Vec2 &zeta)
Definition: contour.cc:141
virtual fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta)
Definition: contour.cc:37

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML