mbsimflexiblebody 4.0.0 MBSim Flexible Body Module

2s_neutral_linear_external_FFR.h
1 /*
2 * contour_2s_neutral_linear_external_FFR.h
3 *
4 * Created on: 25.10.2013
5 * Author: zwang
6 */
7
8 #ifndef CONTOUR_2S_NEUTRAL_LINEAR_EXTERNAL_FFR_H_
9 #define CONTOUR_2S_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_2s_neutral_factory.h>
14 #include "ncc/nurbs_velocity_2s.h"
15 #include "ncc/nurbs_position_2s.h"
16 #include "ncc/nurbs_local_position_2s.h"
17
18 namespace MBSimFlexibleBody {
19
20 class Contour2sNeutralLinearExternalFFR : public MBSimFlexibleBody::Contour2sNeutralFactory {
21 public:
25 Contour2sNeutralLinearExternalFFR(const std::string &name_) : Contour2sNeutralFactory(name_), transNodes(), nodeOffset(0.), degU(3), degV(3), openStructure(false), NP(nullptr), NLP(nullptr), NV(nullptr), qSize(0) { }
26
30 ~Contour2sNeutralLinearExternalFFR() override;
31
32 /*INHERITED INTERFACE */
33 void init(InitStage stage, const MBSim::InitConfigSet &config) override;
34
35 /* GETTER / SETTER*/
36 int getNumberOfTransNodesU();
37 int getNumberOfTransNodesV();
38
44 void setTransNodes(const fmatvec::MatVI & transNodes);
45
52 void readTransNodes(const std::string& file);
53
54 fmatvec::Vec3 evalPosition(const fmatvec::Vec2 &zeta) override;
55 fmatvec::Vec3 evalWs(const fmatvec::Vec2 &zeta) override;
56 fmatvec::Vec3 evalWt(const fmatvec::Vec2 &zeta) override;
57 fmatvec::Vec3 evalWu(const fmatvec::Vec2 &zeta) override { return evalWs(zeta); }
58 fmatvec::Vec3 evalWv(const fmatvec::Vec2 &zeta) override { return evalWt(zeta); }
59 fmatvec::Vec3 evalWn(const fmatvec::Vec2 &zeta) override;
60
61 void updatePositions(MBSim::Frame *frame) override;
62 void updateVelocities(MBSim::Frame *frame) override;
63 void updateJacobians(MBSim::Frame *frame, int j=0) override;
64
68 fmatvec::MatVI getTransNodes();
69
70
74 void setdegU(int deg);
75
79 void setdegV(int deg);
80
84 void setOpenStructure(bool openstructure);
85
89 bool getOpenStructure();
90
91 void resetUpToDate() override;
92
93 protected:
94 virtual NeutralNurbsVelocity2s* createNeutralVelocity();
95 virtual NeutralNurbsPosition2s* createNeutralPosition();
96 virtual NeutralNurbsLocalPosition2s* createNeutralLocalPosition();
97 virtual void createNeutralModeShape();
98
105 fmatvec::MatVI transNodes;
106
110 double nodeOffset;
111
112 fmatvec::VecV uk;
113 fmatvec::VecV vl;
114 int degU;
115 int degV;
116 bool openStructure;
117
118 NeutralNurbsPosition2s* NP;
119 NeutralNurbsLocalPosition2s* NLP;
120 NeutralNurbsVelocity2s* NV;
121
122 int qSize;
123
124 std::vector<MBSim::NurbsSurface> surfaceModeShape; // size = number of elastic coordinates
125
126 };
127
128 } /* namespace MBSimFlexibleBody */
129 #endif
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::Contour2sNeutralLinearExternalFFR
Contour2sNeutralLinearExternalFFR(const std::string &name_)
standard constructor
Definition: 2s_neutral_linear_external_FFR.h:25
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::readTransNodes
void readTransNodes(const std::string &file)
read data from a file that consists of sorted lists for nodes that should be interpolated Every line ...
Definition: 2s_neutral_linear_external_FFR.cc:188
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::nodeOffset
double nodeOffset
offset between translation and rotational nodes
Definition: 2s_neutral_linear_external_FFR.h:110
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::setdegU
void setdegU(int deg)
set interpolation degree in U-direction
Definition: 2s_neutral_linear_external_FFR.cc:172
MBSimFlexibleBody::Contour2sNeutralFactory
Definition: contour_2s_neutral_factory.h:16
MBSimFlexibleBody::NeutralNurbsLocalPosition2s
Definition: nurbs_local_position_2s.h:15
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::~Contour2sNeutralLinearExternalFFR
~Contour2sNeutralLinearExternalFFR() override
destructor
Definition: 2s_neutral_linear_external_FFR.cc:20
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::transNodes
fmatvec::MatVI transNodes
Matrix of all node numbers that are interpolated.
Definition: 2s_neutral_linear_external_FFR.h:105
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::setTransNodes
void setTransNodes(const fmatvec::MatVI &transNodes)
function to set the indices of the nodes for the interpolation The function expects index for the fir...
Definition: 2s_neutral_linear_external_FFR.cc:163
MBSim::Element::InitStage
InitStage
MBSimFlexibleBody::NeutralNurbsVelocity2s
Definition: nurbs_velocity_2s.h:15
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::getTransNodes
fmatvec::MatVI getTransNodes()
returns the nodes for interpolation
Definition: 2s_neutral_linear_external_FFR.cc:168
MBSimFlexibleBody::NeutralNurbsPosition2s
Definition: nurbs_position_2s.h:15
MBSim::Frame
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR
Definition: 2s_neutral_linear_external_FFR.h:20
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::getOpenStructure
bool getOpenStructure()
get open or closed structure
Definition: 2s_neutral_linear_external_FFR.cc:184
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::setdegV
void setdegV(int deg)
set interpolation degree in V-direction
Definition: 2s_neutral_linear_external_FFR.cc:176
MBSimFlexibleBody::Contour2sNeutralLinearExternalFFR::setOpenStructure
void setOpenStructure(bool openstructure)
set open or closed structure
Definition: 2s_neutral_linear_external_FFR.cc:180