20 #ifndef NURBSDISK2S_H_
21 #define NURBSDISK2S_H_
24 #include "mbsim/mbsim_event.h"
25 #include "mbsim/contours/contour2s.h"
26 #include "mbsimFlexibleBody/utils/contact_utils.h"
29 #define MY_PACKAGE_BUGREPORT PACKAGE_BUGREPORT
30 #define MY_PACKAGE_NAME PACKAGE_NAME
31 #define MY_PACKAGE_VERSION PACKAGE_VERSION
32 #define MY_PACKAGE_TARNAME PACKAGE_TARNAME
33 #define MY_PACKAGE_STRING PACKAGE_STRING
34 #undef PACKAGE_BUGREPORT
36 #undef PACKAGE_VERSION
37 #undef PACKAGE_TARNAME
40 #undef PACKAGE_BUGREPORT
42 #undef PACKAGE_VERSION
43 #undef PACKAGE_TARNAME
46 #undef PACKAGE_BUGREPORT
48 #undef PACKAGE_VERSION
49 #undef PACKAGE_TARNAME
52 #define PACKAGE_BUGREPORT MY_PACKAGE_BUGREPORT
53 #define PACKAGE_NAME MY_PACKAGE_NAME
54 #define PACKAGE_VERSION MY_PACKAGE_VERSION
55 #define PACKAGE_TARNAME MY_PACKAGE_TARNAME
56 #define PACKAGE_STRING MY_PACKAGE_STRING
59 namespace MBSimFlexibleBody {
80 NurbsDisk2s(
const std::string &name) : MBSim::Contour2s(name),
nj(0), nr(0),
degU(0), degV(0),
Ri(0.), Ra(0.) {
82 throw MBSim::MBSimError(
"ERROR(NurbsDisk2s::NurbsDisk2s): External NURBS library not implemented!");
92 virtual std::string getType()
const {
return "NurbsDisk2s"; }
96 virtual void computeRootFunctionPosition(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsDisk2s::computeRootFunctionPosition): Not implemented!"); }
97 virtual void computeRootFunctionFirstTangent(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsDisk2s::computeRootFunctionFirstTangent): Not implemented!"); }
98 virtual void computeRootFunctionNormal(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsDisk2s::computeRootFunctionNormal): Not implemented!"); }
99 virtual void computeRootFunctionSecondTangent(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsDisk2s::computeRootFunctionSecondTangent): Not implemented!"); }
103 virtual void updateKinematicsForFrame(MBSim::ContourPointData &cp, MBSim::FrameFeature ff);
104 virtual void updateJacobiansForFrame(MBSim::ContourPointData &cp,
int j = 0);
105 virtual MBSim::ContactKinematics * findContactPairingWith(std::string type0, std::string type1) {
106 return findContactPairingFlexible(type0.c_str(), type1.c_str());
115 void initContourFromBody(MBSim::InitStage stage);
123 fmatvec::Vec
transformCW(
const fmatvec::Vec& WrPoint);
132 fmatvec::Mat computeDirectionalDerivatives(
const double &radius,
const double &phi,
const int °);
141 fmatvec::Mat computeCurvatures(
const double &radius,
const double &phi);
149 void computeUVector(
const int NbPts);
157 void computeVVector(
const int NbPts);
164 void computeSurface();
171 void computeSurfaceVelocities();
178 void computeSurfaceJacobians();
187 fmatvec::Vec getControlPoints(
const int u,
const int v);
194 fmatvec::Vec getUVector();
201 fmatvec::Vec getVVector();
215 double computeError(
const fmatvec::Vec &Vec1,
const fmatvec::Vec &Vec2);
242 std::vector<MBSim::ContourPointData> jacobians;
247 PlNurbsSurfaced *Surface;
252 PlNurbsSurfaced *SurfaceVelocities;
257 std::vector<PlNurbsSurfaced> SurfaceJacobiansOfTranslation;
262 std::vector<PlNurbsSurfaced> SurfaceJacobiansOfRotation;
267 PLib::Vector<double> *uvec;
268 PLib::Vector<double> *uVec;
269 PLib::Vector<double> *vvec;
270 PLib::Vector<double> *vVec;