MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Beam2 Class Reference

#include <beam2.h>

Inheritance diagram for Beam2:
Collaboration diagram for Beam2:

Classes

class  ErrGeneric
 

Public Member Functions

 Beam2 (unsigned int uL, const StructNode *pN1, const StructNode *pN2, const Vec3 &F1, const Vec3 &F2, const Mat3x3 &R1, const Mat3x3 &R2, const Mat3x3 &r, const ConstitutiveLaw6D *pd, OrientationDescription ood, flag fOut)
 
virtual ~Beam2 (void)
 
virtual Beam::Type GetBeamType (void) const
 
virtual Elem::Type GetElemType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
void SetValue (DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
 
virtual void AfterPredict (VectorHandler &, VectorHandler &)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
virtual bool bInverseDynamics (void) const
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual void SetInitialValue (VectorHandler &)
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual const StructNodepGetNode (unsigned int i) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
virtual unsigned int iGetNumDof (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual int GetNumConnectedNodes (void) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
virtual doublereal dGetM (void) const
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
Vec3 GetB (void) const
 
Vec3 GetG (void) const
 
- Public Member Functions inherited from GravityOwner
 GravityOwner (void)
 
virtual ~GravityOwner (void)
 
void PutGravity (const Gravity *pG)
 
virtual bool bGetGravity (const Vec3 &X, Vec3 &Acc) const
 
- Public Member Functions inherited from InitialAssemblyElem
 InitialAssemblyElem (unsigned int uL, flag fOut)
 
virtual ~InitialAssemblyElem (void)
 
- Public Member Functions inherited from SubjectToInitialAssembly
 SubjectToInitialAssembly (void)
 
virtual ~SubjectToInitialAssembly (void)
 

Protected Types

enum  NodeName { NODE1 = 0, NODE2 = 1, NUMNODES = 2 }
 
enum  Deformations { STRAIN = 0, CURVAT = 1, NUMDEFORM = 2 }
 

Protected Member Functions

virtual Vec3 InterpState (const Vec3 &v1, const Vec3 &v2)
 
virtual Vec3 InterpDeriv (const Vec3 &v1, const Vec3 &v2)
 
virtual void AssStiffnessMat (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AssStiffnessVec (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AddInternalForces (Vec6 &)
 
virtual void AssInertiaMat (FullSubMatrixHandler &, FullSubMatrixHandler &, doublereal, const VectorHandler &, const VectorHandler &)
 
virtual void AssInertiaVec (SubVectorHandler &, doublereal, const VectorHandler &, const VectorHandler &)
 
virtual void DsDxi (void)
 
virtual void Omega0 (void)
 
void SetBeamType (Beam::Type T)
 
virtual std::ostream & Restart_ (std::ostream &out) const
 
- Protected Member Functions inherited from ElemGravityOwner
virtual Vec3 GetS_int (void) const
 
virtual Mat3x3 GetJ_int (void) const
 
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 

Protected Attributes

unsigned uOutputFlags
 
OrientationDescription od
 
const StructNodepNode [NUMNODES]
 
Vec3 f [NUMNODES]
 
Vec3 fRef [NUMNODES]
 
Mat3x3 RNode [NUMNODES]
 
Mat3x3 R
 
Mat3x3 RRef
 
Mat3x3 RPrev
 
ConstitutiveLaw6DOwnerpD
 
Mat6x6 DRef
 
Vec3 Omega
 
Vec3 OmegaRef
 
Vec6 Az
 
Vec6 AzRef
 
Vec6 AzLoc
 
Vec6 DefLoc
 
Vec6 DefLocRef
 
Vec6 DefLocPrev
 
Vec6 DefPrimeLoc
 
Vec3 p
 
Vec3 g
 
Vec3 L0
 
Vec3 L
 
Vec3 LRef
 
doublereal dsdxi
 
bool bFirstRes
 
bool bFirstIDRes
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

Private Attributes

Beam::Type BeamT
 

Friends

class AerodynamicBeam
 

Additional Inherited Members

- Public Types inherited from Elem
enum  Type {
  UNKNOWN = -1, AIRPROPERTIES = 0, INDUCEDVELOCITY, AUTOMATICSTRUCTURAL,
  GRAVITY, BODY, JOINT, JOINT_REGULARIZATION,
  BEAM, PLATE, FORCE, INERTIA,
  ELECTRICBULK, ELECTRIC, THERMAL, HYDRAULIC,
  BULK, LOADABLE, DRIVEN, EXTERNAL,
  AEROMODAL, AERODYNAMIC, GENEL, SOCKETSTREAM_OUTPUT,
  RTAI_OUTPUT = SOCKETSTREAM_OUTPUT, LASTELEMTYPE
}
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 

Detailed Description

Definition at line 50 of file beam2.h.

Member Enumeration Documentation

enum Beam2::Deformations
protected
Enumerator
STRAIN 
CURVAT 
NUMDEFORM 

Definition at line 65 of file beam2.h.

65 { STRAIN = 0, CURVAT = 1, NUMDEFORM = 2 };
enum Beam2::NodeName
protected
Enumerator
NODE1 
NODE2 
NUMNODES 

Definition at line 64 of file beam2.h.

64 { NODE1 = 0, NODE2 = 1, NUMNODES = 2 };

Constructor & Destructor Documentation

Beam2::Beam2 ( unsigned int  uL,
const StructNode pN1,
const StructNode pN2,
const Vec3 F1,
const Vec3 F2,
const Mat3x3 R1,
const Mat3x3 R2,
const Mat3x3 r,
const ConstitutiveLaw6D pd,
OrientationDescription  ood,
flag  fOut 
)

Definition at line 65 of file beam2.cc.

References ASSERT, Az, AzLoc, AzRef, DefLoc, DefLocPrev, DefLocRef, DsDxi(), f, g, StructDispNode::GetNodeType(), InterpState(), L, L0, NODE1, NODE2, NUMNODES, Omega, p, pD, pNode, R, RNode, RPrev, RRef, SAFENEWWITHCONSTRUCTOR, Node::STRUCTURAL, Zero3, and Zero6.

76 : Elem(uL, fOut),
77 ElemGravityOwner(uL, fOut),
78 InitialAssemblyElem(uL, fOut),
79 od(ood),
80 #ifdef USE_NETCDF
81 Var_X(0),
82 Var_Phi(0),
83 Var_F(0),
84 Var_M(0),
85 Var_Nu(0),
86 Var_K(0),
87 Var_NuP(0),
88 Var_KP(0),
89 #endif /* USE_NETCDF */
90 bFirstRes(false),
91 bFirstIDRes(true)
92 {
93  /* Validazione dati */
94  ASSERT(pN1 != NULL);
96  ASSERT(pN2 != NULL);
98 
99  pNode[NODE1] = pN1;
100  pNode[NODE2] = pN2;
101  const_cast<Vec3&>(f[NODE1]) = F1;
102  const_cast<Vec3&>(f[NODE2]) = F2;
103  const_cast<Mat3x3&>(RNode[NODE1]) = R1;
104  const_cast<Mat3x3&>(RNode[NODE2]) = R2;
105  RPrev = RRef = R = (Mat3x3&)r;
106 
107  pD = NULL;
111 
112  Omega = Zero3;
113  Az = Zero6;
114  AzRef = Zero6;
115  AzLoc = Zero6;
116  DefLoc = Zero6;
117  DefLocRef = Zero6;
118  DefLocPrev = Zero6;
119  p = Zero3;
120  g = Zero3;
121  L0 = Zero3;
122  L = Zero3;
123 
124  DsDxi();
125 
126  Vec3 xTmp[NUMNODES];
127 
128  for (unsigned int i = 0; i < NUMNODES; i++) {
129  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRCurr()*f[i];
130  }
131 
132  /* Aggiorna le grandezze della trave nel punto di valutazione */
133  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
134 }
Mat3x3 RRef
Definition: beam2.h:93
Vec3 Omega
Definition: beam2.h:103
Vec6 Az
Definition: beam2.h:107
const Vec3 Zero3(0., 0., 0.)
virtual void DsDxi(void)
Definition: beam2.cc:230
Definition: matvec3.h:98
Mat3x3 RPrev
Definition: beam2.h:94
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
Vec3 L
Definition: beam2.h:120
Vec3 L0
Definition: beam2.h:119
ConstitutiveLawOwner< Vec6, Mat6x6 > ConstitutiveLaw6DOwner
Definition: constltp.h:380
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
ElemGravityOwner(unsigned int uL, flag fOut)
Definition: gravity.cc:223
Mat3x3 RNode[NUMNODES]
Definition: beam2.h:88
Vec6 DefLoc
Definition: beam2.h:110
OrientationDescription od
Definition: beam2.h:69
virtual Vec3 InterpState(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:208
Vec6 AzRef
Definition: beam2.h:108
bool bFirstRes
Definition: beam2.h:127
Mat3x3 R
Definition: beam2.h:92
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
Vec3 p
Definition: beam2.h:117
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
#define ASSERT(expression)
Definition: colamd.c:977
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
Vec6 DefLocPrev
Definition: beam2.h:112
Vec6 AzLoc
Definition: beam2.h:109
InitialAssemblyElem(unsigned int uL, flag fOut)
Definition: elem.cc:233
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
bool bFirstIDRes
Definition: beam2.h:128
Vec6 DefLocRef
Definition: beam2.h:111
Vec3 f[NUMNODES]
Definition: beam2.h:86
Vec3 g
Definition: beam2.h:118

Here is the call graph for this function:

Beam2::~Beam2 ( void  )
virtual

Definition at line 137 of file beam2.cc.

References ASSERT, pD, and SAFEDELETE.

138 {
139  ASSERT(pD != NULL);
140  if (pD != NULL) {
141  SAFEDELETE(pD);
142  }
143 }
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
#define ASSERT(expression)
Definition: colamd.c:977
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

virtual void Beam2::AddInternalForces ( Vec6 )
inlineprotectedvirtual

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 154 of file beam2.h.

References NO_OP.

Referenced by AfterPredict(), ViscoElasticBeam2::AfterPredict(), AssStiffnessVec(), and ViscoElasticBeam2::AssStiffnessVec().

154  {
155  NO_OP;
156  };
#define NO_OP
Definition: myassert.h:74
void Beam2::AfterConvergence ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in ViscoElasticBeam2.

Definition at line 321 of file beam2.cc.

References ConstitutiveLawOwner< T, Tder >::AfterConvergence(), DefLoc, DefLocPrev, pD, R, and RPrev.

Referenced by AfterConvergence().

322 {
323  RPrev = R;
324  DefLocPrev = DefLoc;
326 }
Mat3x3 RPrev
Definition: beam2.h:94
Vec6 DefLoc
Definition: beam2.h:110
Mat3x3 R
Definition: beam2.h:92
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
Vec6 DefLocPrev
Definition: beam2.h:112

Here is the call graph for this function:

void Beam2::AfterConvergence ( const VectorHandler X,
const VectorHandler XP,
const VectorHandler XPP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 931 of file beam2.cc.

References AfterConvergence(), and bFirstIDRes.

933 {
934  AfterConvergence(X, XP);
935  bFirstIDRes = true;
936 }
bool bFirstIDRes
Definition: beam2.h:128
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: beam2.cc:321

Here is the call graph for this function:

void Beam2::AfterPredict ( VectorHandler ,
VectorHandler  
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in ViscoElasticBeam2, PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 565 of file beam2.cc.

References AddInternalForces(), Az, AzLoc, AzRef, bFirstRes, DefLoc, DefLocPrev, DefLocRef, DRef, f, g, ConstitutiveLawOwner< T, Tder >::GetF(), ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetgRef(), StructNode::GetRRef(), Vec6::GetVec2(), StructDispNode::GetXCurr(), InterpDeriv(), InterpState(), L, L0, LRef, CGR_Rot::MatG, CGR_Rot::MatR, MultRMRt(), MultRV(), Mat3x3::MulTV(), NODE1, NODE2, NUMNODES, p, pD, pNode, R, RPrev, RRef, and ConstitutiveLawOwner< T, Tder >::Update().

Referenced by PiezoActuatorBeam2::AfterPredict(), and AssRes().

566 {
567  /*
568  * Calcola le deformazioni, aggiorna il legame costitutivo
569  * e crea la FDE
570  */
571 
572  /* Recupera i dati dei nodi */
573  Vec3 gNod[NUMNODES];
574  Vec3 xTmp[NUMNODES];
575 
576  for (unsigned int i = 0; i < NUMNODES; i++) {
577  gNod[i] = pNode[i]->GetgRef();
578  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRRef()*f[i];
579  }
580 
581  Mat3x3 RDelta;
582  Vec3 gGrad;
583 
584  /* Aggiorna le grandezze della trave nel punto di valutazione */
585 
586  /* Posizione */
587  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
588 
589  /* Matrici di rotazione */
590  g = InterpState(gNod[NODE1], gNod[NODE2]);
591  RDelta = Mat3x3(CGR_Rot::MatR, g);
592  R = RRef = RDelta*RPrev;
593 
594  /* Derivate della posizione */
595  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
596 
597  /* Derivate dei parametri di rotazione */
598  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
599 
600  /*
601  * Calcola le deformazioni nel sistema locale
602  * nei punti di valutazione
603  */
604  DefLoc = DefLocRef = Vec6(R.MulTV(L) - L0,
606 
607  /* Calcola le azioni interne */
608  pD->Update(DefLoc);
609  AzLoc = pD->GetF();
610 
611  /* corregge le azioni interne locali (piezo, ecc) */
613 
614  /* Porta le azioni interne nel sistema globale */
615  Az = AzRef = MultRV(AzLoc, R);
616 
617  /* Aggiorna il legame costitutivo di riferimento */
618  DRef = MultRMRt(pD->GetFDE(), RRef);
619 
620  bFirstRes = true;
621 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
Mat3x3 RRef
Definition: beam2.h:93
Vec6 Az
Definition: beam2.h:107
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
Definition: matvec3.cc:1144
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Mat3x3 RPrev
Definition: beam2.h:94
Vec3 L
Definition: beam2.h:120
Vec3 L0
Definition: beam2.h:119
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
const Tder & GetFDE(void) const
Definition: constltp.h:298
Vec6 DefLoc
Definition: beam2.h:110
Vec3 LRef
Definition: beam2.h:122
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual Vec3 InterpState(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:208
Vec6 AzRef
Definition: beam2.h:108
bool bFirstRes
Definition: beam2.h:127
Mat3x3 R
Definition: beam2.h:92
Definition: matvec6.h:37
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
Vec3 p
Definition: beam2.h:117
const MatG_Manip MatG
Definition: matvec3.cc:646
Mat6x6 DRef
Definition: beam2.h:100
const MatR_Manip MatR
Definition: matvec3.cc:645
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const T & GetF(void) const
Definition: constltp.h:293
Vec6 DefLocPrev
Definition: beam2.h:112
virtual const Vec3 & GetgRef(void) const
Definition: strnode.h:976
Vec6 AzLoc
Definition: beam2.h:109
virtual Vec3 InterpDeriv(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:219
virtual void AddInternalForces(Vec6 &)
Definition: beam2.h:154
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
Vec6 DefLocRef
Definition: beam2.h:111
Vec3 f[NUMNODES]
Definition: beam2.h:86
Vec3 g
Definition: beam2.h:118

Here is the call graph for this function:

virtual void Beam2::AssInertiaMat ( FullSubMatrixHandler ,
FullSubMatrixHandler ,
doublereal  ,
const VectorHandler ,
const VectorHandler  
)
inlineprotectedvirtual

Definition at line 159 of file beam2.h.

References NO_OP.

163  {
164  NO_OP;
165  };
#define NO_OP
Definition: myassert.h:74
virtual void Beam2::AssInertiaVec ( SubVectorHandler ,
doublereal  ,
const VectorHandler ,
const VectorHandler  
)
inlineprotectedvirtual

Definition at line 168 of file beam2.h.

References NO_OP.

171  {
172  NO_OP;
173  };
#define NO_OP
Definition: myassert.h:74
VariableSubMatrixHandler & Beam2::AssJac ( VariableSubMatrixHandler WorkMat,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 485 of file beam2.cc.

References AssStiffnessMat(), DEBUGCOUTFNAME, StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), NODE1, NODE2, pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

Referenced by DataManager::AssConstrJac(), and AssJac().

489 {
490  DEBUGCOUTFNAME("Beam2::AssJac => AssStiffnessMat");
491 
492  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
493  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
494  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
495  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
496 
497  FullSubMatrixHandler& WM = WorkMat.SetFull();
498 
499  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
500  WM.ResizeReset(12, 12);
501 
502  for (int iCnt = 1; iCnt <= 6; iCnt++) {
503  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
504  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
505  WM.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
506  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
507  }
508 
509  AssStiffnessMat(WM, WM, dCoef, XCurr, XPrimeCurr);
510 
511  return WorkMat;
512 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:330
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

VariableSubMatrixHandler & Beam2::AssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from Elem.

Definition at line 875 of file beam2.cc.

References ASSERT, AssJac(), Elem::bIsErgonomy(), DEBUGCOUT, InverseDynamics::INVERSE_DYNAMICS, and InverseDynamics::POSITION.

877 {
878  // silent_cout("Beam2::IDAssJac()" << std::endl);
879 
880  DEBUGCOUT("Entering Beam2::[InverseDynamics]AssJac()" << std::endl);
881 
882 #if 0
883  // iOrder not available
885  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
886 #endif
887 
888  return AssJac(WorkMat, 1., XCurr, XCurr);
889 }
bool bIsErgonomy(void) const
Definition: elem.cc:83
#define DEBUGCOUT(msg)
Definition: myassert.h:232
#define ASSERT(expression)
Definition: colamd.c:977
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:485

Here is the call graph for this function:

SubVectorHandler & Beam2::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 517 of file beam2.cc.

References AssStiffnessVec(), DEBUGCOUTFNAME, StructDispNode::iGetFirstMomentumIndex(), NODE1, NODE2, pNode, SubVectorHandler::PutRowIndex(), and VectorHandler::ResizeReset().

Referenced by AssRes().

521 {
522  DEBUGCOUTFNAME("Beam2::AssRes => AssStiffnessVec");
523 
524  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
525  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
526 
527  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
528  WorkVec.ResizeReset(12);
529 
530  for (unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
531  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
532  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
533  }
534 
535  AssStiffnessVec(WorkVec, dCoef, XCurr, XPrimeCurr);
536 
537  return WorkVec;
538 }
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstMomentumIndex(void) const =0
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:408
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

SubVectorHandler & Beam2::AssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr,
const VectorHandler XPrimePrimeCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from Elem.

Definition at line 893 of file beam2.cc.

References AfterPredict(), ASSERT, AssRes(), bFirstIDRes, bFirstRes, Elem::bIsErgonomy(), DEBUGCOUT, InverseDynamics::INVERSE_DYNAMICS, and InverseDynamics::POSITION.

898 {
899  // silent_cout("Beam2::IDAssRes(" << iOrder << ")" << std::endl);
900 
901  DEBUGCOUT("Entering Beam2::[InverseDynamics]AssRes()" << std::endl);
902 
904  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
905 
906  // if (iOrder == InverseDynamics::POSITION) {
907  // ASSERT(bIsErgonomy());
908 
909  if (bFirstIDRes) {
910  // prepare for new step
911  AfterPredict(const_cast<VectorHandler&>(XCurr),
912  const_cast<VectorHandler&>(XPrimeCurr));
913 
914  bFirstIDRes = false;
915  bFirstRes = true;
916  }
917  // }
918 
919  return AssRes(WorkVec, 1., XCurr, XPrimeCurr);
920 }
bool bIsErgonomy(void) const
Definition: elem.cc:83
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:517
bool bFirstRes
Definition: beam2.h:127
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual void AfterPredict(VectorHandler &, VectorHandler &)
Definition: beam2.cc:565
#define ASSERT(expression)
Definition: colamd.c:977
bool bFirstIDRes
Definition: beam2.h:128

Here is the call graph for this function:

void Beam2::AssStiffnessMat ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
protectedvirtual

Reimplemented in ViscoElasticBeam2, PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 330 of file beam2.cc.

References FullSubMatrixHandler::Add(), Az, Vec3::Cross(), DEBUGCOUTFNAME, dN2, dN2P, DRef, dsdxi, f, StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), L, MatCross, MatCrossCross, mb_deye< Mat3x3 >(), NODE1, NODE2, NUMNODES, p, pNode, FullSubMatrixHandler::Sub(), Mat6x6::SubMat12(), and Zero3x3.

Referenced by AssJac(), PiezoActuatorBeam2::AssStiffnessMat(), and InitialAssJac().

335 {
336  DEBUGCOUTFNAME("Beam2::AssStiffnessMat");
337 
338  /*
339  * La matrice arriva gia' dimensionata
340  * e con gli indici di righe e colonne a posto
341  */
342 
343  /* offset nel riferimento globale */
344  Vec3 fTmp[NUMNODES];
345  for (unsigned int i = 0; i < NUMNODES; i++) {
346  fTmp[i] = pNode[i]->GetRCurr()*f[i];
347  }
348 
349  Mat6x6 AzTmp[NUMNODES];
350 
351  for (unsigned int i = 0; i < NUMNODES; i++) {
352  /* Delta - deformazioni */
353  AzTmp[i] = Mat6x6(mb_deye<Mat3x3>(dN2P[i]*dsdxi*dCoef),
354  Zero3x3,
355  Mat3x3(MatCross, L*(dN2[i]*dCoef) -fTmp[i]*(dN2P[i]*dsdxi*dCoef)),
356  mb_deye<Mat3x3>(dN2P[i]*dsdxi*dCoef));
357 
358  /* Delta - azioni interne */
359  AzTmp[i] = DRef*AzTmp[i];
360 
361  /* Correggo per la rotazione da locale a globale */
362  AzTmp[i].SubMat12(Mat3x3(MatCross, Az.GetVec1()*(dN2[i]*dCoef)));
363  AzTmp[i].SubMat22(Mat3x3(MatCross, Az.GetVec2()*(dN2[i]*dCoef)));
364  }
365 
366  Vec3 bTmp[NUMNODES];
367 
368  bTmp[NODE1] = p - pNode[NODE1]->GetXCurr();
369  bTmp[NODE2] = p - pNode[NODE2]->GetXCurr();
370 
371  for (unsigned int i = 0; i < NUMNODES; i++) {
372  /* Equazione all'indietro: */
373  WMA.Sub(1, 6*i + 1, AzTmp[i].GetMat11());
374  WMA.Sub(1, 6*i + 4, AzTmp[i].GetMat12());
375 
376  WMA.Sub(3 + 1, 6*i + 1,
377  AzTmp[i].GetMat21()
378  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
379  + bTmp[NODE1].Cross(AzTmp[i].GetMat11()));
380  WMA.Sub(3 + 1, 6*i + 4,
381  AzTmp[i].GetMat22()
382  - Mat3x3(MatCrossCross, Az.GetVec1()*(-dCoef*dN2[i]), fTmp[i])
383  + bTmp[NODE1].Cross(AzTmp[i].GetMat12()));
384 
385  /* Equazione in avanti: */
386  WMA.Add(6 + 1, 6*i + 1, AzTmp[i].GetMat11());
387  WMA.Add(6 + 1, 6*i + 4, AzTmp[i].GetMat12());
388 
389  WMA.Add(9 + 1, 6*i + 1,
390  AzTmp[i].GetMat21()
391  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
392  + bTmp[NODE2].Cross(AzTmp[i].GetMat11()));
393  WMA.Add(9 + 1, 6*i + 4,
394  AzTmp[i].GetMat22()
395  + Mat3x3(MatCrossCross, Az.GetVec1()*(dCoef*dN2[i]), fTmp[i])
396  + bTmp[NODE2].Cross(AzTmp[i].GetMat12()));
397  }
398 
399  /* correzione alle equazioni */
400  Mat3x3 FTmp(MatCross, Az.GetVec1()*dCoef);
401  WMA.Sub(3 + 1, 1, FTmp);
402  WMA.Add(9 + 1, 6 + 1, FTmp);
403 };
Vec6 Az
Definition: beam2.h:107
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const MatCross_Manip MatCross
Definition: matvec3.cc:639
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 L
Definition: beam2.h:120
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
Mat3x3 mb_deye< Mat3x3 >(const doublereal d)
Definition: matvec3.h:1584
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
const doublereal dN2[2]
Definition: shapefnc.cc:52
void SubMat12(const Mat3x3 &x)
Definition: matvec6.h:416
Vec3 p
Definition: beam2.h:117
Mat6x6 DRef
Definition: beam2.h:100
doublereal dsdxi
Definition: beam2.h:124
const doublereal dN2P[2]
Definition: shapefnc.cc:56
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
Vec3 f[NUMNODES]
Definition: beam2.h:86

Here is the call graph for this function:

void Beam2::AssStiffnessVec ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
protectedvirtual

Reimplemented in ViscoElasticBeam2, PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 408 of file beam2.cc.

References VectorHandler::Add(), AddInternalForces(), Az, AzLoc, bFirstRes, grad::Cross(), DEBUGCOUTFNAME, DefLoc, DefLocRef, f, g, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetgCurr(), StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), InterpDeriv(), InterpState(), L, L0, CGR_Rot::MatG, CGR_Rot::MatR, MultRV(), Mat3x3::MulTV(), NODE1, NODE2, NUMNODES, p, pD, pNode, R, RRef, VectorHandler::Sub(), and ConstitutiveLawOwner< T, Tder >::Update().

Referenced by AssRes(), PiezoActuatorBeam2::AssStiffnessVec(), and InitialAssRes().

412 {
413  DEBUGCOUTFNAME("Beam2::AssStiffnessVec");
414 
415  /*
416  * Riceve il vettore gia' dimensionato e con gli indici a posto
417  * per scrivere il residuo delle equazioni di equilibrio dei tre nodi
418  */
419 
420  /*
421  * Per la trattazione teorica, il riferimento e' il file ul-travi.tex
422  * (ora e' superato)
423  */
424 
425  if (bFirstRes) {
426  bFirstRes = false; /* AfterPredict ha gia' calcolato tutto */
427 
428  } else {
429  Vec3 gNod[NUMNODES];
430  Vec3 xTmp[NUMNODES];
431 
432  for (unsigned int i = 0; i < NUMNODES; i++) {
433  gNod[i] = pNode[i]->GetgCurr();
434  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRCurr()*f[i];
435  }
436 
437  Mat3x3 RDelta;
438  Vec3 gGrad;
439 
440  /*
441  * Aggiorna le grandezze della trave nel punto di valutazione
442  */
443 
444  /* Posizione */
445  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
446 
447  /* Matrici di rotazione */
448  g = InterpState(gNod[NODE1], gNod[NODE2]);
449  RDelta = Mat3x3(CGR_Rot::MatR, g);
450  R = RDelta*RRef;
451 
452  /* Derivate della posizione */
453  L = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
454 
455  /* Derivate dei parametri di rotazione */
456  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
457 
458  /*
459  * Calcola le deformazioni nel sistema locale
460  * nei punti di valutazione
461  */
462  DefLoc = Vec6(R.MulTV(L) - L0,
463  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gGrad) + DefLocRef.GetVec2());
464 
465  /* Calcola le azioni interne */
466  pD->Update(DefLoc);
467  AzLoc = pD->GetF();
468 
469  /* corregge le azioni interne locali (piezo, ecc) */
471 
472  /* Porta le azioni interne nel sistema globale */
473  Az = MultRV(AzLoc, R);
474  }
475 
476  WorkVec.Add(1, Az.GetVec1());
477  WorkVec.Add(4, (p - pNode[NODE1]->GetXCurr()).Cross(Az.GetVec1()) + Az.GetVec2());
478  WorkVec.Sub(7, Az.GetVec1());
479  WorkVec.Sub(10, Az.GetVec2() + (p - pNode[NODE2]->GetXCurr()).Cross(Az.GetVec1()));
480 }
Mat3x3 RRef
Definition: beam2.h:93
Vec6 Az
Definition: beam2.h:107
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
Definition: matvec3.cc:1144
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
virtual const Vec3 & GetgCurr(void) const
Definition: strnode.h:982
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 L
Definition: beam2.h:120
Vec3 L0
Definition: beam2.h:119
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
Vec6 DefLoc
Definition: beam2.h:110
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual Vec3 InterpState(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:208
bool bFirstRes
Definition: beam2.h:127
Mat3x3 R
Definition: beam2.h:92
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
Vec3 p
Definition: beam2.h:117
const MatG_Manip MatG
Definition: matvec3.cc:646
const MatR_Manip MatR
Definition: matvec3.cc:645
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
const T & GetF(void) const
Definition: constltp.h:293
Vec6 AzLoc
Definition: beam2.h:109
virtual Vec3 InterpDeriv(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:219
virtual void AddInternalForces(Vec6 &)
Definition: beam2.h:154
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
Vec6 DefLocRef
Definition: beam2.h:111
Vec3 f[NUMNODES]
Definition: beam2.h:86
Vec3 g
Definition: beam2.h:118

Here is the call graph for this function:

bool Beam2::bInverseDynamics ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 867 of file beam2.cc.

868 {
869  return true;
870 }
doublereal Beam2::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Reimplemented in ViscoElasticBeam2.

Definition at line 164 of file beam2.cc.

References ASSERT, AzLoc, DefLoc, Vec6::dGet(), Vec3::dGet(), WithLabel::GetLabel(), iGetNumPrivData(), MBDYN_EXCEPT_ARGS, Omega, p, R, and RotManip::VecRot().

Referenced by ViscoElasticBeam2::dGetPrivData().

165 {
166  ASSERT(i > 0 && i <= iGetNumPrivData());
167 
168  switch (i) {
169  case 1:
170  case 2:
171  case 3:
172  case 4:
173  case 5:
174  case 6:
175  return DefLoc.dGet(i);
176 
177  case 7:
178  case 8:
179  case 9:
180  case 10:
181  case 11:
182  case 12:
183  return AzLoc.dGet(i - 7);
184 
185  case 13:
186  case 14:
187  case 15:
188  return p.dGet(i - 12);
189 
190  case 16:
191  case 17:
192  case 18:
193  return RotManip::VecRot(R).dGet(i - 15);
194 
195  case 19:
196  case 20:
197  case 21:
198  return Omega.dGet(i - 18);
199 
200  default:
201  silent_cerr("Beam2(" << GetLabel() << "): "
202  "illegal private data " << i << std::endl);
204  }
205 }
Vec3 Omega
Definition: beam2.h:103
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Vec6 DefLoc
Definition: beam2.h:110
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 R
Definition: beam2.h:92
Vec3 p
Definition: beam2.h:117
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumPrivData(void) const
Definition: beam2.cc:147
Vec6 AzLoc
Definition: beam2.h:109
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const doublereal & dGet(unsigned short int i) const
Definition: matvec6.h:182

Here is the call graph for this function:

void Beam2::DsDxi ( void  )
protectedvirtual

Definition at line 230 of file beam2.cc.

References Vec3::Dot(), DRef, dsdxi, f, ConstitutiveLawOwner< T, Tder >::GetFDE(), WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), InterpDeriv(), L0, MBDYN_EXCEPT_ARGS, MultRMRt(), Mat3x3::MulTV(), NODE1, NODE2, NUMNODES, pD, pNode, R, grad::sqrt(), ConstitutiveLawOwner< T, Tder >::Update(), and Zero6.

Referenced by Beam2().

231 {
232  /* Calcola il ds/dxi e le deformazioni iniziali */
233  Vec3 xNod[NUMNODES];
234  Mat3x3 RNod[NUMNODES];
235  Vec3 xTmp[NUMNODES];
236  for (unsigned int i = 0; i < NUMNODES; i++) {
237  xNod[i] = pNode[i]->GetXCurr();
238  RNod[i] = pNode[i]->GetRCurr();
239  xTmp[i] = xNod[i] + RNod[i]*f[i];
240  }
241 
242  dsdxi = 1.;
243 
244  Vec3 xGrad = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
245  doublereal d = xGrad.Dot();
246  if (d > std::numeric_limits<doublereal>::epsilon()) {
247  dsdxi = 1./std::sqrt(d);
248  } else {
249  silent_cerr("warning, Beam2(" << GetLabel() << ") "
250  "has singular metric; aborting..." << std::endl);
251 
253  }
254 
255  /* Calcola le deformazioni iniziali */
256  L0 = R.MulTV(InterpDeriv(xTmp[NODE1], xTmp[NODE2]));
257  pD->Update(Zero6);
258  DRef = MultRMRt(pD->GetFDE(), R);
259 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
Vec3 L0
Definition: beam2.h:119
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
const Tder & GetFDE(void) const
Definition: constltp.h:298
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Mat3x3 R
Definition: beam2.h:92
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
Mat6x6 DRef
Definition: beam2.h:100
doublereal dsdxi
Definition: beam2.h:124
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual Vec3 InterpDeriv(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:219
double doublereal
Definition: colamd.c:52
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
unsigned int GetLabel(void) const
Definition: withlab.cc:62
Vec3 f[NUMNODES]
Definition: beam2.h:86

Here is the call graph for this function:

virtual Beam::Type Beam2::GetBeamType ( void  ) const
inlinevirtual

Reimplemented in ViscoElasticBeam2, PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 207 of file beam2.h.

References Beam::ELASTIC.

Referenced by OutputPrepare().

207  {
208  return Beam::ELASTIC;
209  };
virtual void Beam2::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 348 of file beam2.h.

References NUMNODES, and pNode.

Referenced by PiezoActuatorBeam2::GetConnectedNodes().

348  {
349  connectedNodes.resize(NUMNODES);
350  for (int i = 0; i < NUMNODES; i++) {
351  connectedNodes[i] = pNode[i];
352  }
353  };
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual Elem::Type Beam2::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 212 of file beam2.h.

References Elem::BEAM.

Referenced by AerodynamicBeam2::AerodynamicBeam2().

212  {
213  return Elem::BEAM;
214  };
virtual unsigned int Beam2::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 307 of file beam2.h.

307  {
308  return 0;
309  };
unsigned int Beam2::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Definition at line 147 of file beam2.cc.

References Beam::iNumPrivData.

Referenced by dGetPrivData(), and ViscoElasticBeam2::dGetPrivData().

148 {
149  return Beam::iNumPrivData;
150 }
static const unsigned int iNumPrivData
Definition: beam.h:100
unsigned int Beam2::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Definition at line 153 of file beam2.cc.

References ConstLawType::ELASTIC, Beam::iGetPrivDataIdx_int(), and ConstLawType::VISCOUS.

154 {
156  if (dynamic_cast<const ViscoElasticBeam2 *>(this)) {
157  type = ConstLawType::VISCOUS;
158  }
159 
160  return Beam::iGetPrivDataIdx_int(s, type);
161 }
static unsigned int iGetPrivDataIdx_int(const char *s, ConstLawType::Type type)
Definition: beam.cc:269

Here is the call graph for this function:

VariableSubMatrixHandler & Beam2::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 804 of file beam2.cc.

References AssStiffnessMat(), DEBUGCOUTFNAME, StructDispNode::iGetFirstPositionIndex(), NODE1, NODE2, pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

Referenced by PiezoActuatorBeam2::InitialAssJac(), and PiezoActuatorVEBeam2::InitialAssJac().

806 {
807  DEBUGCOUTFNAME("Beam2::InitialAssJac => AssStiffnessMat");
808 
809  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
810  FullSubMatrixHandler& WM = WorkMat.SetFull();
811  WM.ResizeReset(12, 12);
812 
813  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
814  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
815 
816  for (int iCnt = 1; iCnt <= 6; iCnt++) {
817  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
818  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
819  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
820  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
821  }
822 
823  AssStiffnessMat(WM, WM, 1., XCurr, XCurr);
824  return WorkMat;
825 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:330
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

SubVectorHandler & Beam2::InitialAssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 830 of file beam2.cc.

References AssStiffnessVec(), DEBUGCOUTFNAME, StructDispNode::iGetFirstPositionIndex(), NODE1, NODE2, pNode, SubVectorHandler::PutRowIndex(), and VectorHandler::ResizeReset().

Referenced by PiezoActuatorBeam2::InitialAssRes(), and PiezoActuatorVEBeam2::InitialAssRes().

832 {
833  DEBUGCOUTFNAME("Beam2::InitialAssRes => AssStiffnessVec");
834 
835  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
836  WorkVec.ResizeReset(12);
837 
838  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
839  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
840 
841  for (int iCnt = 1; iCnt <= 6; iCnt++) {
842  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
843  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
844  }
845 
846  AssStiffnessVec(WorkVec, 1., XCurr, XCurr);
847  return WorkVec;
848 }
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:408
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

virtual void Beam2::InitialWorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 316 of file beam2.h.

317  {
318  *piNumRows = 12;
319  *piNumCols = 12;
320  };
Vec3 Beam2::InterpDeriv ( const Vec3 v1,
const Vec3 v2 
)
protectedvirtual

Definition at line 219 of file beam2.cc.

References dN2P, dsdxi, and Vec3::pGetVec().

Referenced by AfterPredict(), ViscoElasticBeam2::AfterPredict(), AssStiffnessVec(), ViscoElasticBeam2::AssStiffnessVec(), and DsDxi().

220 {
221  doublereal* pv1 = (doublereal*)v1.pGetVec();
222  doublereal* pv2 = (doublereal*)v2.pGetVec();
223  return Vec3((pv1[0]*dN2P[0] + pv2[0]*dN2P[1])*dsdxi,
224  (pv1[1]*dN2P[0] + pv2[1]*dN2P[1])*dsdxi,
225  (pv1[2]*dN2P[0] + pv2[2]*dN2P[1])*dsdxi);
226 }
Definition: matvec3.h:98
doublereal dsdxi
Definition: beam2.h:124
const doublereal dN2P[2]
Definition: shapefnc.cc:56
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

Vec3 Beam2::InterpState ( const Vec3 v1,
const Vec3 v2 
)
protectedvirtual

Definition at line 208 of file beam2.cc.

References dN2, and Vec3::pGetVec().

Referenced by AfterPredict(), ViscoElasticBeam2::AfterPredict(), AssStiffnessVec(), ViscoElasticBeam2::AssStiffnessVec(), and Beam2().

209 {
210  doublereal* pv1 = (doublereal*)v1.pGetVec();
211  doublereal* pv2 = (doublereal*)v2.pGetVec();
212  return Vec3(pv1[0]*dN2[0] + pv2[0]*dN2[1],
213  pv1[1]*dN2[0] + pv2[1]*dN2[1],
214  pv1[2]*dN2[0] + pv2[2]*dN2[1]);
215 }
Definition: matvec3.h:98
const doublereal dN2[2]
Definition: shapefnc.cc:52
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

void Beam2::Omega0 ( void  )
protectedvirtual

Definition at line 264 of file beam2.cc.

References dN2, StructNode::GetRCurr(), StructNode::GetWCurr(), CGR_Rot::MatG, CGR_Rot::MatGm1, NODE1, NODE2, NUMNODES, Omega, CGR_Rot::Param, pNode, and RNode.

Referenced by ViscoElasticBeam2::ViscoElasticBeam2().

265 {
266  /* Modo consistente: */
267  Mat3x3 RNod[NUMNODES];
268  Vec3 w[NUMNODES];
269  for (unsigned int i = 0; i < NUMNODES; i++) {
270  RNod[i] = pNode[i]->GetRCurr()*RNode[i];
271  w[i] = pNode[i]->GetWCurr();
272  }
273 
274  /*
275  * Calcolo i parametri di rotazione della rotazione relativa
276  * tra inizio e fine e li dimezzo nell'ipotesi che siano limitati
277  */
278  Vec3 gTmp(CGR_Rot::Param, RNod[NODE2].MulTM(RNod[NODE1]));
279 
280  /*
281  * Le derivate dei parametri di rotazione si ricavano da omega
282  */
283  Vec3 g1P(Mat3x3(CGR_Rot::MatGm1, gTmp*(-.5))*w[NODE1]);
284  Vec3 g2P(Mat3x3(CGR_Rot::MatGm1, gTmp*.5)*w[NODE2]);
285 
286  Vec3 gPTmp(g1P*dN2[NODE1] + g2P*dN2[NODE2]);
287  Omega = Mat3x3(CGR_Rot::MatG, gTmp)*gPTmp;
288 
289 #if 0
290  /* Modo brutale: interpolo le velocita' dei nodi */
292  + pNode[NODE2]->GetWCurr()*dN2[NODE2];
293 #endif /* 0 */
294 }
const MatGm1_Manip MatGm1
Definition: matvec3.cc:647
Vec3 Omega
Definition: beam2.h:103
const Param_Manip Param
Definition: matvec3.cc:644
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
Mat3x3 RNode[NUMNODES]
Definition: beam2.h:88
const doublereal dN2[2]
Definition: shapefnc.cc:52
const MatG_Manip MatG
Definition: matvec3.cc:646
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030

Here is the call graph for this function:

void Beam2::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 712 of file beam2.cc.

References AzLoc, OutputHandler::BEAMS, OutputHandler::Beams(), ToBeOutput::bToBeOutput(), DefLoc, DefPrimeLoc, dRaDegr, EULER_123, EULER_313, EULER_321, OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), Vec6::GetVec1(), Vec6::GetVec2(), MatR2EulerAngles123(), MatR2EulerAngles313(), MatR2EulerAngles321(), MBDYN_EXCEPT_ARGS, od, ORIENTATION_MATRIX, ORIENTATION_VECTOR, p, Mat3x3::pGetMat(), Vec3::pGetVec(), R, OutputHandler::UseNetCDF(), OutputHandler::UseText(), and RotManip::VecRot().

713 {
714  if (bToBeOutput()) {
715 #ifdef USE_NETCDF
717  if (Var_X) {
718  Var_X->put_rec(p.pGetVec(), OH.GetCurrentStep());
719  }
720 
721  if (Var_Phi) {
722  Vec3 E;
723  switch (od) {
724  case EULER_123:
726  break;
727 
728  case EULER_313:
730  break;
731 
732  case EULER_321:
734  break;
735 
736  case ORIENTATION_VECTOR:
737  E = RotManip::VecRot(R);
738  break;
739 
740  case ORIENTATION_MATRIX:
741  break;
742 
743  default:
744  /* impossible */
746  break;
747  }
748 
749  switch (od) {
750  case EULER_123:
751  case EULER_313:
752  case EULER_321:
753  case ORIENTATION_VECTOR:
754  Var_Phi->put_rec(E.pGetVec(), OH.GetCurrentStep());
755  break;
756 
757  case ORIENTATION_MATRIX:
758  Var_Phi->put_rec(R.pGetMat(), OH.GetCurrentStep());
759  break;
760 
761  default:
762  /* impossible */
763  break;
764  }
765  }
766 
767  if (Var_F) {
768  Var_F->put_rec(AzLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
769  }
770 
771  if (Var_M) {
772  Var_M->put_rec(AzLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
773  }
774 
775  if (Var_Nu) {
776  Var_Nu->put_rec(DefLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
777  }
778 
779  if (Var_K) {
780  Var_K->put_rec(DefLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
781  }
782 
783  if (Var_NuP) {
784  Var_NuP->put_rec(DefPrimeLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
785  }
786 
787  if (Var_KP) {
788  Var_KP->put_rec(DefPrimeLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
789  }
790  }
791 #endif /* USE_NETCDF */
792 
793  if (OH.UseText(OutputHandler::BEAMS)) {
794  OH.Beams() << std::setw(8) << GetLabel()
795  << " " << AzLoc.GetVec1()
796  << " " << AzLoc.GetVec2()
797  << std::endl;
798  }
799  }
800 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
bool UseNetCDF(int out) const
Definition: output.cc:491
Vec6 DefLoc
Definition: beam2.h:110
OrientationDescription od
Definition: beam2.h:69
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 R
Definition: beam2.h:92
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
Definition: matvec3.cc:927
Vec6 DefPrimeLoc
Definition: beam2.h:115
Vec3 p
Definition: beam2.h:117
long GetCurrentStep(void) const
Definition: output.h:116
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
Definition: matvec3.cc:893
const doublereal dRaDegr
Definition: matvec3.cc:884
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
std::ostream & Beams(void) const
Definition: output.h:457
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
Definition: matvec3.cc:941
Vec6 AzLoc
Definition: beam2.h:109
unsigned int GetLabel(void) const
Definition: withlab.cc:62
bool UseText(int out) const
Definition: output.cc:446

Here is the call graph for this function:

void Beam2::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Definition at line 625 of file beam2.cc.

References ASSERT, OutputHandler::BEAMS, ToBeOutput::bToBeOutput(), Beam::ELASTIC, ToBeOutput::fToBeOutput(), GetBeamType(), WithLabel::GetLabel(), OutputHandler::IsOpen(), OutputHandler::NETCDF, od, Beam::OUTPUT_EP_F, Beam::OUTPUT_EP_K, Beam::OUTPUT_EP_KP, Beam::OUTPUT_EP_M, Beam::OUTPUT_EP_NU, Beam::OUTPUT_EP_NUP, Beam::OUTPUT_EP_R, Beam::OUTPUT_EP_X, ToBeOutput::OUTPUT_PRIVATE_MASK, Beam::PIEZOELECTRICELASTIC, Beam::PIEZOELECTRICVISCOELASTIC, uOutputFlags, OutputHandler::UseNetCDF(), and Beam::VISCOELASTIC.

626 {
627  if (bToBeOutput()) {
628 #ifdef USE_NETCDF
631 
632  const char *type = 0;
633  switch (GetBeamType()) {
634  case Beam::ELASTIC:
635  type = "elastic";
636  break;
637 
638  case Beam::VISCOELASTIC:
639  type = "viscoelastic";
640  break;
641 
643  type = "piezoelectric elastic";
644  break;
645 
647  type = "piezoelectric viscoelastic";
648  break;
649 
650  default:
651  type = "unknown";
652  break;
653  }
654 
655  std::ostringstream os;
656  os << "elem.beam." << GetLabel();
657 
658  (void)OH.CreateVar(os.str(), type);
659 
660  os << '.';
661  std::string name(os.str());
662 
664 
665  if (uOutputFlags & Beam::OUTPUT_EP_X) {
666  Var_X = OH.CreateVar<Vec3>(name + "X", "m",
667  "evaluation point global position vector (X, Y, Z)");
668  }
669 
670  if (uOutputFlags & Beam::OUTPUT_EP_R) {
671  Var_Phi = OH.CreateRotationVar(name, "", od,
672  " evaluation point global orientation matrix");
673  }
674 
675  if (uOutputFlags & Beam::OUTPUT_EP_F) {
676  Var_F = OH.CreateVar<Vec3>(name + "F", "N",
677  "evaluation point internal force in local frame (F_X, F_Y, F_Z)");
678  }
679 
680  if (uOutputFlags & Beam::OUTPUT_EP_M) {
681  Var_M = OH.CreateVar<Vec3>(name + "M", "Nm",
682  "evaluation point internal force in local frame (M_X, M_Y, M_Z)");
683  }
684 
685  if (uOutputFlags & Beam::OUTPUT_EP_NU) {
686  Var_Nu = OH.CreateVar<Vec3>(name + "nu", "-",
687  "evaluation point linear strain in local frame (nu_X, nu_Y, nu_Z)");
688  }
689 
690  if (uOutputFlags & Beam::OUTPUT_EP_K) {
691  Var_K = OH.CreateVar<Vec3>(name + "k", "1/m",
692  "evaluation point angular strain in local frame (K_X, K_Y, K_Z)");
693  }
694 
695  if (uOutputFlags & Beam::OUTPUT_EP_NUP) {
696  Var_NuP = OH.CreateVar<Vec3>(name + "nuP", "1/s",
697  "evaluation point linear strain rate in local frame (nuP_X, nuP_Y, nuP_Z)");
698  }
699 
700  if (uOutputFlags & Beam::OUTPUT_EP_KP) {
701  Var_KP = OH.CreateVar<Vec3>(name + "kP", "1/ms",
702  "evaluation point angular strain rate in local frame (KP_X, KP_Y, KP_Z)");
703  }
704  }
705 #endif // USE_NETCDF
706  }
707 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
bool UseNetCDF(int out) const
Definition: output.cc:491
OrientationDescription od
Definition: beam2.h:69
virtual Beam::Type GetBeamType(void) const
Definition: beam2.h:207
unsigned uOutputFlags
Definition: beam2.h:68
bool IsOpen(int out) const
Definition: output.cc:395
#define ASSERT(expression)
Definition: colamd.c:977
virtual flag fToBeOutput(void) const
Definition: output.cc:884
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

const StructNode * Beam2::pGetNode ( unsigned int  i) const
virtual

Definition at line 852 of file beam2.cc.

References ASSERT, MBDYN_EXCEPT_ARGS, and pNode.

Referenced by AerodynamicBeam2::AerodynamicBeam2(), and ReadAerodynamicBeam2().

853 {
854  ASSERT(i >= 1 && i <= 2);
855  switch (i) {
856  case 1:
857  case 2:
858  return pNode[i-1];
859  default:
861  }
862 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
#define ASSERT(expression)
Definition: colamd.c:977
std::ostream & Beam2::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 299 of file beam2.cc.

References Restart_().

300 {
301  return Restart_(out)<< ';' << std::endl;
302 }
virtual std::ostream & Restart_(std::ostream &out) const
Definition: beam2.cc:305

Here is the call graph for this function:

std::ostream & Beam2::Restart_ ( std::ostream &  out) const
protectedvirtual

Definition at line 305 of file beam2.cc.

References f, WithLabel::GetLabel(), Mat3x3::GetVec(), NUMNODES, pD, ConstitutiveLawOwner< T, Tder >::pGetConstLaw(), pNode, R, Write(), and Vec3::Write().

Referenced by PiezoActuatorBeam2::Restart(), PiezoActuatorVEBeam2::Restart(), and Restart().

306 {
307  out << " beam2: " << GetLabel();
308  for (unsigned int i = 0; i < NUMNODES; i++) {
309  out << ", " << pNode[i]->GetLabel() << ", reference, node, ",
310  f[i].Write(out, ", ");
311  }
312  out << ", reference, global,"
313  << "1, ", (R.GetVec(1)).Write(out, ", ") << ", "
314  << "2, ", (R.GetVec(2)).Write(out, ", ") << ", ",
315  pD->pGetConstLaw()->Restart(out);
316 
317  return out;
318 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
ConstitutiveLaw< T, Tder > * pGetConstLaw(void) const
Definition: constltp.h:278
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
Mat3x3 R
Definition: beam2.h:92
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
unsigned int GetLabel(void) const
Definition: withlab.cc:62
Vec3 f[NUMNODES]
Definition: beam2.h:86

Here is the call graph for this function:

void Beam2::SetBeamType ( Beam::Type  T)
inlineprotected

Definition at line 185 of file beam2.h.

References BeamT.

185  {
186  BeamT = T;
187  };
Beam::Type BeamT
Definition: beam2.h:61
virtual void Beam2::SetInitialValue ( VectorHandler )
inlinevirtual

Definition at line 323 of file beam2.h.

References NO_OP.

323  {
324  NO_OP;
325  };
#define NO_OP
Definition: myassert.h:74
void Beam2::SetValue ( DataManager pDM,
VectorHandler ,
VectorHandler ,
SimulationEntity::Hints ph = 0 
)
virtual

Implements ElemGravityOwner.

Reimplemented in ViscoElasticBeam2, PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 543 of file beam2.cc.

References Az, AzRef, bFirstRes, DefLoc, DefLocRef, DRef, ConstitutiveLawOwner< T, Tder >::GetFDE(), L, LRef, MultRMRt(), pD, R, and RRef.

Referenced by PiezoActuatorBeam2::SetValue(), and ViscoElasticBeam2::SetValue().

546 {
547  /* Aggiorna le grandezze della trave nei punti di valutazione */
548  RRef = R;
549  LRef = L;
550  DefLocRef = DefLoc;
551  AzRef = Az;
552 
553  /*
554  * Aggiorna il legame costitutivo di riferimento
555  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
556  */
557  DRef = MultRMRt(pD->GetFDE(), RRef);
558 
559  bFirstRes = true;
560 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
Mat3x3 RRef
Definition: beam2.h:93
Vec6 Az
Definition: beam2.h:107
Vec3 L
Definition: beam2.h:120
const Tder & GetFDE(void) const
Definition: constltp.h:298
Vec6 DefLoc
Definition: beam2.h:110
Vec3 LRef
Definition: beam2.h:122
Vec6 AzRef
Definition: beam2.h:108
bool bFirstRes
Definition: beam2.h:127
Mat3x3 R
Definition: beam2.h:92
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
Mat6x6 DRef
Definition: beam2.h:100
Vec6 DefLocRef
Definition: beam2.h:111

Here is the call graph for this function:

void Beam2::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 924 of file beam2.cc.

References NO_OP.

925 {
926  NO_OP;
927 }
#define NO_OP
Definition: myassert.h:74
virtual void Beam2::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Reimplemented in PiezoActuatorVEBeam2, and PiezoActuatorBeam2.

Definition at line 227 of file beam2.h.

227  {
228  *piNumRows = 12;
229  *piNumCols = 12;
230  };

Friends And Related Function Documentation

friend class AerodynamicBeam
friend

Definition at line 52 of file beam2.h.

Member Data Documentation

Vec6 Beam2::AzRef
protected

Definition at line 108 of file beam2.h.

Referenced by AfterPredict(), ViscoElasticBeam2::AfterPredict(), Beam2(), and SetValue().

Beam::Type Beam2::BeamT
private

Definition at line 61 of file beam2.h.

Referenced by SetBeamType().

bool Beam2::bFirstIDRes
protected

Definition at line 128 of file beam2.h.

Referenced by AfterConvergence(), and AssRes().

Vec6 Beam2::DefLocPrev
protected
Vec6 Beam2::DefLocRef
protected
doublereal Beam2::dsdxi
protected

Definition at line 124 of file beam2.h.

Referenced by AssStiffnessMat(), ViscoElasticBeam2::AssStiffnessMat(), DsDxi(), and InterpDeriv().

Vec3 Beam2::fRef[NUMNODES]
protected

Definition at line 87 of file beam2.h.

Vec3 Beam2::LRef
protected

Definition at line 122 of file beam2.h.

Referenced by AfterPredict(), ViscoElasticBeam2::AfterPredict(), and SetValue().

OrientationDescription Beam2::od
protected

Definition at line 69 of file beam2.h.

Referenced by Output(), and OutputPrepare().

Mat3x3 Beam2::RNode[NUMNODES]
protected

Definition at line 88 of file beam2.h.

Referenced by Beam2(), and Omega0().

Mat3x3 Beam2::RPrev
protected
unsigned Beam2::uOutputFlags
protected

Definition at line 68 of file beam2.h.

Referenced by OutputPrepare().


The documentation for this class was generated from the following files: