All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
nurbs_curve_1s.h
1 /* Copyright (C) 2004-2012 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: thorsten.schindler@mytum.de
18  */
19 
20 #ifndef NurbsCurve1s_H_
21 #define NurbsCurve1s_H_
22 
23 #include "mbsimFlexibleBody/contours/contour1s.h"
24 #include "mbsim/numerics/nurbs/nurbs_curve.h"
25 
26 namespace MBSimFlexibleBody {
27 
37  class NurbsCurve1s : public Contour1s {
38  public:
43  NurbsCurve1s(const std::string &name) : Contour1s(name), Elements(0), openStructure(false), L(0.), degU(0), curveTranslations(), curveVelocities(), curveAngularVelocities(), normalRotationGrid() { }
44 
48  virtual ~NurbsCurve1s() { }
49 
50  /* INHERITED INTERFACE OF ELEMENT */
51  virtual std::string getType() const { return "NurbsCurve1s"; }
52  /***************************************************/
53 
54  /* INHERITED INTERFACE OF CONTOURCONTINUUM */
55  virtual void computeRootFunctionPosition(MBSim::ContourFrame *frame);
56  virtual void computeRootFunctionFirstTangent(MBSim::ContourFrame *frame);
57  virtual void computeRootFunctionNormal(MBSim::ContourFrame *frame);
58  virtual void computeRootFunctionSecondTangent(MBSim::ContourFrame *frame);
59  /***************************************************/
60 
61  /* INHERITED INTERFACE OF CONTOUR */
62  virtual MBSim::ContactKinematics *findContactPairingWith(std::string type0, std::string type1);
63  /***************************************************/
64 
65  /* GETTER / SETTER */
66  void setNormalRotationGrid(fmatvec::Vec normal_) { normalRotationGrid = normal_(0,2); }
67  /***************************************************/
68 
73  void initContourFromBody(InitStage stage);
74 
78  void computeCurveTranslations(bool update = false);
79 
83  void computeCurveVelocities(bool update = false);
84 
88  void computeCurveAngularVelocities(bool update = false);
89 
95  void computeCurveJacobians(bool trans = true, bool rot = true, bool update = false);
96 
97  protected:
101  int Elements;
102 
106  int qSize;
107 
112 
116  double L;
117 
121  int degU;
122 
127 
132 
137 
141  fmatvec::Vec3 normalRotationGrid;
142 
146  std::vector<MBSim::NurbsCurve> CurveJacobiansOfTranslation; // size = number of generalized coordinates
147 
151  std::vector<MBSim::NurbsCurve> CurveJacobiansOfRotation; // size = number of generalized coordinates
152 
153  };
154 
155 }
156 
157 #endif /* NurbsCurve1s_H_ */
MBSim::NurbsCurve curveAngularVelocities
interpolated angular velocities of the contour
Definition: nurbs_curve_1s.h:136
void initContourFromBody(InitStage stage)
initialize NURBS curve
Definition: nurbs_curve_1s.cc:31
void computeCurveTranslations(bool update=false)
interpolates the translations with node-data from body
Definition: nurbs_curve_1s.cc:63
MBSim::NurbsCurve curveTranslations
interpolated translations of the contour
Definition: nurbs_curve_1s.h:126
basic class for contours described by one contour parameter
Definition: contour1s.h:35
int Elements
number of elements
Definition: nurbs_curve_1s.h:101
double L
length of entire curve
Definition: nurbs_curve_1s.h:116
virtual ~NurbsCurve1s()
destructor
Definition: nurbs_curve_1s.h:48
fmatvec::Vec3 normalRotationGrid
closest normal on rotation grid to update direction of normal of nurbs-curve and to avoid jumping ...
Definition: nurbs_curve_1s.h:141
void computeCurveJacobians(bool trans=true, bool rot=true, bool update=false)
interpolates the Jacobians of translation with the node-data from the body
Definition: nurbs_curve_1s.cc:133
contour 1s flexible with NURBS parametrization
Definition: nurbs_curve_1s.h:37
int qSize
number of DOFs
Definition: nurbs_curve_1s.h:106
int degU
interpolation degree
Definition: nurbs_curve_1s.h:121
NurbsCurve1s(const std::string &name)
constructor
Definition: nurbs_curve_1s.h:43
bool openStructure
open or closed beam structure
Definition: nurbs_curve_1s.h:111
void computeCurveVelocities(bool update=false)
interpolates the velocities with the node-data from the body
Definition: nurbs_curve_1s.cc:87
std::vector< MBSim::NurbsCurve > CurveJacobiansOfTranslation
interpolated Jacobians of Translation of the contour
Definition: nurbs_curve_1s.h:146
void computeCurveAngularVelocities(bool update=false)
interpolates the angular velocities with the node-data from the body
Definition: nurbs_curve_1s.cc:110
std::vector< MBSim::NurbsCurve > CurveJacobiansOfRotation
interpolated Jacobians of Rotation on the contour
Definition: nurbs_curve_1s.h:151
MBSim::NurbsCurve curveVelocities
interpolated velocities of the contour
Definition: nurbs_curve_1s.h:131

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML