mbsimflexiblebody 4.0.0 MBSim Flexible Body Module

1s_neutral_linear_external_FFR.h
1 /*
2 * contour_1s_neutral_linear_external_FFR.h
3 *
4 * Created on: 25.10.2013
5 * Author: zwang
6 */
7
8 #ifndef CONTOUR_1S_NEUTRAL_LINEAR_EXTERNAL_FFR_H_
9 #define CONTOUR_1S_NEUTRAL_LINEAR_EXTERNAL_FFR_H_
10
11 #include <mbsimFlexibleBody/flexible_body/linear_external_ffr.h>
12 #include "mbsimFlexibleBody/pointer.h"
13 #include <mbsimFlexibleBody/contours/contour_1s_neutral_factory.h>
14 #include "ncc/nurbs_velocity_1s.h"
15 #include "ncc/nurbs_position_1s.h"
16 #include "ncc/nurbs_local_position_1s.h"
17
18 namespace MBSimFlexibleBody {
19
20 class Contour1sNeutralLinearExternalFFR : public Contour1sNeutralFactory {
21 public:
22 Contour1sNeutralLinearExternalFFR(const std::string &name_) : Contour1sNeutralFactory(name_), transNodes(0), NP(nullptr), NLP(nullptr), NV(nullptr), qSize(0) { }
23
24 ~Contour1sNeutralLinearExternalFFR() override;
25 void init(InitStage stage, const MBSim::InitConfigSet &config) override;
26 virtual NeutralNurbsVelocity1s* createNeutralVelocity();
27 virtual NeutralNurbsPosition1s* createNeutralPosition();
28 virtual NeutralNurbsLocalPosition1s* createNeutralLocalPosition();
29 virtual void createNeutralModeShape();
30
34 void readTransNodes(const std::string& file);
35
36 fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta) override;
37 fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta) override;
38 fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta) override;
39 fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta) override { return evalWs(zeta); }
40 fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta) override { return evalWt(zeta); }
41
42 void updatePositions(MBSim::Frame *frame) override;
43 void updateVelocities(MBSim::Frame *frame) override;
44 void updateJacobians(MBSim::Frame *frame, int j=0) override;
45
46 /* GETTER / SETTER*/
47 fmatvec::VecInt getTransNodes();
48
49 void setFrameOfReference(MBSim::Frame *frame) { R = frame; }
50
51 void resetUpToDate() override;
52
53 protected:
54
60 fmatvec::VecInt transNodes;
61
62 NeutralNurbsPosition1s* NP;
63 NeutralNurbsLocalPosition1s* NLP;
64 NeutralNurbsVelocity1s* NV;
65
66 int qSize;
67
68 std::vector<MBSim::NurbsCurve> curveModeShape; // size = number of elastic coordinates
69
70 MBSim::Frame *R;
71
72 };
73
74 } /* namespace MBSimFlexibleBody */
75 #endif
MBSimFlexibleBody::NeutralNurbsLocalPosition1s
Definition: nurbs_local_position_1s.h:15
MBSimFlexibleBody::NeutralNurbsVelocity1s
Definition: nurbs_velocity_1s.h:15
MBSimFlexibleBody::NeutralNurbsPosition1s
Definition: nurbs_position_1s.h:15
MBSim::Element::InitStage
InitStage
MBSimFlexibleBody::Contour1sNeutralLinearExternalFFR
Definition: 1s_neutral_linear_external_FFR.h:20
MBSim::Frame
MBSimFlexibleBody::Contour1sNeutralFactory
Definition: contour_1s_neutral_factory.h:20
MBSimFlexibleBody::Contour1sNeutralLinearExternalFFR::readTransNodes
void readTransNodes(const std::string &file)
read the node numbers from a file
Definition: 1s_neutral_linear_external_FFR.cc:30
MBSimFlexibleBody::Contour1sNeutralLinearExternalFFR::transNodes
fmatvec::VecInt transNodes
list of nodes to be interpolated
Definition: 1s_neutral_linear_external_FFR.h:60