21 #ifndef FINITE_ELEMENT_1S_REFERENCE_CURVE_H_
22 #define FINITE_ELEMENT_1S_REFERENCE_CURVE_H_
24 #include <mbsimFlexibleBody/flexible_body/flexible_body_1S_reference_curve.h>
26 #include <mbsimFlexibleBody/contours/neutral_contour/contour_1s_neutral_reference_curve.h>
28 #include <mbsim/discretization_interface.h>
30 #include <mbsim/functions/function.h>
32 namespace MBSimFlexibleBody {
56 virtual void init(MBSim::Element::InitStage stage);
112 virtual void setDofDir(fmatvec::VecInt dofDirElement_) {
116 virtual fmatvec::VecInt getDofDirs() {
138 const std::vector<int> getFreeDofs() {
142 const fmatvec::Vec2 getAlpha() {
146 int findLocalDof(
int globalDof) {
147 for (
size_t i = 0; i <
freeDoFs.size(); i++) {
167 fmatvec::Vec3
computer(
double xi,
int derXi = 0,
int derTheta = 0);
172 fmatvec::Vec3
computev(
double xi,
int derXi = 0);
177 fmatvec::Vec3
computedrdqk(
double xi,
int derXi,
int qIndLoc);
186 virtual double computeN(
int j,
double xiLoc,
int derXi);
197 fmatvec::Vec3
computeB(
int dofDirLocal,
double xiGlob,
int derXi,
int derTheta);
202 fmatvec::Vec3
computeBqf(
double xi,
int derXi,
int derTheta);
207 fmatvec::Vec3
computeBuf(
double xi,
int derXi,
int derTheta);
213 virtual fmatvec::Vec3
computeS(
int columnEle,
double xiGlob,
int derXi);
228 fmatvec::Mat3xV
computeP(
double xi,
int derXi);
233 fmatvec::Mat3xV
computedPdqk(
double xi,
int dofDirLocal);
268 double dWndqk(
double xiGlob,
int qInd);
323 std::vector<std::vector<std::vector<double> > >
coeffs;
419 double computeXiOfDOF(
int dofDirLocal);
virtual fmatvec::Vec3 computeS(int columnEle, double xiGlob, int derXi)
return the column of DOF with column i
Definition: finite_element_1S_reference_curve.cc:481
int nodeDirs
Degrees of freedom for one node (number of directions)
Definition: finite_element_1S_reference_curve.h:310
fmatvec::SymMatV integratePTP()
computes the integral needed for the mass matrix ( P^T P)
Definition: finite_element_1S_reference_curve.cc:782
fmatvec::Mat3xV computeP(double xi, int derXi)
compute the P matrix
Definition: finite_element_1S_reference_curve.cc:739
virtual double computeLegendre(int j, double xiLoc, int derXi)
compute Legendre Polynomial
Definition: finite_element_1S_reference_curve.cc:315
virtual double computeGravitationalEnergy(const fmatvec::Vec &q)
compute gravitational energy
Definition: finite_element_1S_reference_curve.h:90
double integrateForWb(int qIndLoc)
computes the integral for the second part of the h vector coming from the potential energy (intForWb)...
Definition: finite_element_1S_reference_curve.cc:860
virtual void computedhdz(const fmatvec::Vec &q, const fmatvec::Vec &u)
compute Jacobian for implicit integration
Definition: finite_element_1S_reference_curve.h:84
fmatvec::Vec3 computeBuf(double xi, int derXi, int derTheta)
compute the multiplication of the B matrix with uf
Definition: finite_element_1S_reference_curve.cc:436
std::vector< int > freeDoFs
number of free DoFs in the element
Definition: finite_element_1S_reference_curve.h:315
fmatvec::VecV hV1
first part of h-vector coming from the potential energy (elongation)
Definition: finite_element_1S_reference_curve.h:363
virtual double computeXiGlob(double xiLoc)
compute the global position
Definition: finite_element_1S_reference_curve.cc:253
virtual fmatvec::Vec3 computeAnodeTimesSTimeslocVec(double xiGlob, int derXi, int derTheta, const fmatvec::Vec &locVec)
compute A of the node times the respective shape functions times the given vector ...
Definition: finite_element_1S_reference_curve.cc:519
this function returns basically three values. As these share some values it makes sense to not comput...
Definition: finite_element_1S_reference_curve_functions.h:157
fmatvec::Vec h
the right hand side vector
Definition: finite_element_1S_reference_curve.h:343
double computedKappabdqk(double xiGlob, int qIndLocal)
compute derivative of kappab w.r.t. the given DoF
Definition: finite_element_1S_reference_curve.cc:1010
virtual int getNodesSize() const
get the number of Nodes
Definition: finite_element_1S_reference_curve.h:130
FlexibleBody1SReferenceCurve * parent
parent body
Definition: finite_element_1S_reference_curve.h:279
void updateIntegrationBorders(double t)
update the borders as
Definition: finite_element_1S_reference_curve.cc:1046
Definition: finite_element_1S_reference_curve_functions.h:118
virtual double computeN(int j, double xiLoc, int derXi)
compute the result of the ansatz function N of number j Here hierarchical basis is used...
Definition: finite_element_1S_reference_curve.cc:290
fmatvec::SqrMatV integratePTdPdqk(int qInd)
computes the integral for the third part of the h vector coming from the kinetic energy ( P^T * dPdqk...
Definition: finite_element_1S_reference_curve.cc:818
fmatvec::Vec3 computeB(int dofDirLocal, double xiGlob, int derXi, int derTheta)
compute the column i of the B matrix (the column that is connected to the localDOF) ...
Definition: finite_element_1S_reference_curve.cc:344
double integrateForWn(int qIndLoc)
computes the integral of the h vector coming from the potential energy (intForWn) ...
Definition: finite_element_1S_reference_curve.cc:846
std::vector< double > borders
borders for the integration
Definition: finite_element_1S_reference_curve.h:300
double computedepsdqk(int localDofDir, double xiGlob)
compute the derivative of the local elongation w.r.t. local Dof direction
Definition: finite_element_1S_reference_curve.cc:882
Definition: finite_element_1S_reference_curve_functions.h:78
fmatvec::VecV hT2
second part of h-vector coming from the kinetic energy
Definition: finite_element_1S_reference_curve.h:353
Definition: finite_element_1S_reference_curve_functions.h:216
fmatvec::VecV hV3
third part of the h-vector coming from the potential energy (binormal bending)
Definition: finite_element_1S_reference_curve.h:373
std::vector< double > getHermiteCoeffs(int nodeNo)
function that holds the coefficient for the hermite polynoms
Definition: finite_element_1S_reference_curve.cc:642
virtual const fmatvec::SqrMat & getdhdu() const
Definition: finite_element_1S_reference_curve.h:79
fmatvec::VecV hT3
second part of h-vector coming from the kinetic energy
Definition: finite_element_1S_reference_curve.h:358
virtual const fmatvec::Vec & geth() const
Definition: finite_element_1S_reference_curve.h:72
FlexibleBody1SReferenceCurveFE(FlexibleBody1SReferenceCurve *parent, int eleNo, Vec2 alpha, int order, int nodeDofs)
standard constructor
Definition: finite_element_1S_reference_curve.cc:37
virtual int getuSize() const
Definition: finite_element_1S_reference_curve.h:65
virtual const fmatvec::SqrMat & getdhdq() const
Definition: finite_element_1S_reference_curve.h:76
double dWndqk(double xiGlob, int qInd)
compute the change of bending energy in the t/n-plane at the position w.r.t the given DoF ...
Definition: finite_element_1S_reference_curve.cc:1039
double computeKappab(double xiGlob)
compute the bending in t/b-plane
Definition: finite_element_1S_reference_curve.cc:923
double integrateForWgamma(int qInd)
computes the integral for the first part of the h vector coming from the potential energy (intForWgam...
Definition: finite_element_1S_reference_curve.cc:832
fmatvec::SqrMatV integratePTdPdxi()
computes the integral for the first part of the h vector coming from the kinetic energy ( P^T * P') ...
Definition: finite_element_1S_reference_curve.cc:794
virtual double computeKineticEnergy(const fmatvec::Vec &q, const fmatvec::Vec &u)
compute kinetic energy
Definition: finite_element_1S_reference_curve.h:87
class that implements an one dimensional nonlinear beam that uses a reference curve for the nonlinear...
Definition: flexible_body_1S_reference_curve.h:66
virtual const fmatvec::SymMat & getM() const
Definition: finite_element_1S_reference_curve.h:69
std::vector< fmatvec::Vec > qElement
stl-vector of finite element wise positions
Definition: flexible_body.h:204
fmatvec::VecInt dofDirs
vector that connects local DOFs of an element to the global DOFs
Definition: finite_element_1S_reference_curve.h:290
Finite-Element class for the body FlexibleBody1SReferenceCurve.
Definition: finite_element_1S_reference_curve.h:37
double computedKappandqk(double xiGlob, int qIndLocal)
compute derivative of kappan w.r.t. the given DoF
Definition: finite_element_1S_reference_curve.cc:928
fmatvec::Vec3 computer(double xi, int derXi=0, int derTheta=0)
compute the position and/or its derivative w.r.t. xi and/or theta
Definition: finite_element_1S_reference_curve.cc:261
fmatvec::SymMat M
Mass matrix of the element.
Definition: finite_element_1S_reference_curve.h:338
int element
number of the element
Definition: finite_element_1S_reference_curve.h:284
virtual double computeElasticEnergy(const fmatvec::Vec &q)
compute elastic energy
Definition: finite_element_1S_reference_curve.h:93
fmatvec::Vec3 computeBqf(double xi, int derXi, int derTheta)
compute the multiplication of the B matrix with qf
Definition: finite_element_1S_reference_curve.cc:391
virtual fmatvec::Vec3 computeSTimeslocVec(double xiGlob, int derXi, const fmatvec::Vec &locVec)
compute S times the given vector
Definition: finite_element_1S_reference_curve.cc:498
virtual void computeh(const fmatvec::Vec &q, const fmatvec::Vec &u)
compute smooth right hand side
Definition: finite_element_1S_reference_curve.cc:159
fmatvec::SqrMatV integratePTdPdt()
computes the integral for the second part of the h vector coming from the kinetic energy ( P^T * dPdt...
Definition: finite_element_1S_reference_curve.cc:806
virtual int getqSize() const
Definition: finite_element_1S_reference_curve.h:57
fmatvec::Vec3 computev(double xi, int derXi=0)
compute the velocity and/or its derivative w.r.t. xi and/or theta
Definition: finite_element_1S_reference_curve.cc:268
int AVers
switch between different versions of the A-Matrix
Definition: finite_element_1S_reference_curve.h:424
fmatvec::VecV hV4
fourth part of the h-vector coming from the potential energy (torsion)
Definition: finite_element_1S_reference_curve.h:378
discretization interface for flexible systems
Definition: discretization_interface.h:36
Definition: finite_element_1S_reference_curve_functions.h:28
std::vector< std::vector< std::vector< double > > > coeffs
list of polynomial coefficients First index is the node Second index is the derivative third index is...
Definition: finite_element_1S_reference_curve.h:323
int order
degree of the element
Definition: finite_element_1S_reference_curve.h:305
double computeeps(double xiGlob)
compute the local elongation
Definition: finite_element_1S_reference_curve.cc:874
double computeKappan(double xiGlob)
compute the bending in t/n-plane
Definition: finite_element_1S_reference_curve.cc:915
std::vector< double > getLagrangeCoeffs(int nodeNo)
function that holds the coefficient for the lagrange polynoms
Definition: finite_element_1S_reference_curve.cc:547
virtual double computeXiLoc(double xiGlob)
compute the local position
Definition: finite_element_1S_reference_curve.cc:245
fmatvec::VecV hV2
second part of h-vector coming from the potential energy (normal bending)
Definition: finite_element_1S_reference_curve.h:368
Definition: finite_element_1S_reference_curve_functions.h:52
fmatvec::Mat3xV computedPdqk(double xi, int dofDirLocal)
compute the P matrix derived wrt the generalized position
Definition: finite_element_1S_reference_curve.cc:754
fmatvec::Vec3 computedrdqk(double xi, int derXi, int qIndLoc)
computes the derivative wrt the generalized position of the local element
Definition: finite_element_1S_reference_curve.cc:275
virtual int getAddDoFSizeMax() const
get the number of possible degrees of freedom (some may be locked, but this is not covered in the num...
Definition: finite_element_1S_reference_curve.h:123
fmatvec::VecV hT1
first part of h-vector coming from the kinetic energy
Definition: finite_element_1S_reference_curve.h:348
virtual void computeM(const fmatvec::Vec &q)
compute mass matrix
Definition: finite_element_1S_reference_curve.cc:227
virtual void init(MBSim::Element::InitStage stage)
initialize the FE
Definition: finite_element_1S_reference_curve.cc:56