21 #ifndef _BODY_FLEXIBLE_1S_21_ANCF_H_
22 #define _BODY_FLEXIBLE_1S_21_ANCF_H_
24 #include "body_flexible.h"
28 class FiniteElement1s21ANCF;
29 class Contour1sFlexible;
38 FiniteElement1s21ANCF *balken;
39 static const int NodeDOFs;
40 static const int ElementalDOFs;
43 double L, E, A, I, rho;
47 Vec qElement,uElement;
54 void BuildElement(
const int&);
55 double BuildElement(
const double&);
57 void updateStateDependentVariables(
double t);
58 void updatePorts(
double t);
60 void updateh(
double t);
61 void init(InitStage stage);
64 double alphaRelax0, alphaRelax;
67 Vec Wt, Wn, WrOC, WvC, Womega;
75 void setNumberElements(
int n);
76 void setLength(
double L_) {L = L_;}
77 void setEModul(
double E_) {E = E_;}
78 void setCrossSectionalArea(
double A_) {A = A_;}
79 void setMomentInertia(
double I_) {I = I_;}
80 void setDensity(
double rho_) {rho = rho_;}
89 void addPort(
const string &name,
const int &node);
91 Mat computeJacobianMatrix(
const ContourPointData &data);
93 Mat computeWt (
const ContourPointData &S_);
94 Vec computeWn (
const ContourPointData &S_);
95 Vec computeWrOC(
const ContourPointData &S_);
96 Vec computeWvC (
const ContourPointData &S_);
97 Vec computeWomega(
const ContourPointData &S_);
99 bool hasConstMass()
const {
return true;}
101 void setJT(
const Mat &JT_) {assert(JT_.cols()==2); JT = JT_;};
102 void setJR(
const Mat &JR_) {assert(JR_.cols()==1); JR = JR_;};
104 void setWrON00(
const Vec &WrON00_) {WrON00 = WrON00_;}
105 void initRelaxed(
double alpha);