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

#include <hbeam.h>

Inheritance diagram for HBeam:
Collaboration diagram for HBeam:

Classes

class  ErrGeneric
 

Public Member Functions

 HBeam (unsigned int uL, const StructNode *pN1, const StructNode *pN2, const Vec3 &F1, const Vec3 &F2, const Mat3x3 &R1, const Mat3x3 &R2, const ConstitutiveLaw6D *pd, flag fOut)
 
virtual ~HBeam (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 Output (OutputHandler &OH) const
 
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)
 
virtual bool bInverseDynamics (void) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
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 void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
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 OutputPrepare (OutputHandler &OH)
 
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 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 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

const StructNodepNode [NUMNODES]
 
Vec3 f [NUMNODES]
 
Vec3 fRef [NUMNODES]
 
Mat3x3 Rn [NUMNODES]
 
Mat3x3 R
 
Mat3x3 RRef
 
ConstitutiveLaw6DOwnerpD
 
Mat6x6 DRef
 
Vec3 Omega
 
Vec3 OmegaRef
 
Vec6 Az
 
Vec6 AzRef
 
Vec6 AzLoc
 
Vec6 DefLoc
 
Vec6 DefLocRef
 
Vec3 p
 
Vec3 g
 
Vec3 L0
 
Vec3 L
 
Vec3 LRef
 
doublereal xi
 
doublereal dsdxi
 
doublereal dxids
 
bool bFirstRes
 
Vec3 Rho
 
Vec3 Rho0
 
Mat3x3 pdp [NUMNODES]
 
Mat3x3 pdP [NUMNODES]
 
Mat3x3 Ldp [NUMNODES]
 
Mat3x3 LdP [NUMNODES]
 
Mat3x3 RdP [NUMNODES]
 
Mat3x3 RhodP [NUMNODES]
 
- 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 57 of file hbeam.h.

Member Enumeration Documentation

enum HBeam::Deformations
protected
Enumerator
STRAIN 
CURVAT 
NUMDEFORM 

Definition at line 72 of file hbeam.h.

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

Definition at line 71 of file hbeam.h.

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

Constructor & Destructor Documentation

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

Definition at line 67 of file hbeam.cc.

References ASSERT, Az, AzLoc, AzRef, DefLoc, DefLocRef, DsDxi(), f, g, StructDispNode::GetNodeType(), L, L0, NODE1, NODE2, Omega, p, pD, pNode, Rn, SAFENEWWITHCONSTRUCTOR, Node::STRUCTURAL, Zero3, and Zero6.

75 : Elem(uL, fOut),
76 ElemGravityOwner(uL, fOut),
77 InitialAssemblyElem(uL, fOut),
78 bFirstRes(true)
79 {
80  /* Validazione dati */
81  ASSERT(pN1 != NULL);
83  ASSERT(pN2 != NULL);
85 
86  pNode[NODE1] = pN1;
87  pNode[NODE2] = pN2;
88  f[NODE1] = F1;
89  f[NODE2] = F2;
90 
91  Rn[NODE1] = R1;
92  Rn[NODE2] = R2;
93 
94  /*
95  RRef = R = interpolazione di R1 e R2 ;
96  */
97 
98  pD = NULL;
102 
103  Omega = Zero3;
104  Az = Zero6;
105  AzRef = Zero6;
106  AzLoc = Zero6;
107  DefLoc = Zero6;
108  DefLocRef = Zero6;
109  p = Zero3;
110  g = Zero3;
111  L0 = Zero3;
112  L = Zero3;
113 
114  DsDxi();
115 }
const Vec3 Zero3(0., 0., 0.)
Vec3 Omega
Definition: hbeam.h:96
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
ConstitutiveLawOwner< Vec6, Mat6x6 > ConstitutiveLaw6DOwner
Definition: constltp.h:380
Mat3x3 Rn[NUMNODES]
Definition: hbeam.h:82
ElemGravityOwner(unsigned int uL, flag fOut)
Definition: gravity.cc:223
bool bFirstRes
Definition: hbeam.h:118
Vec3 L
Definition: hbeam.h:110
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
virtual void DsDxi(void)
Definition: hbeam.cc:234
Vec3 f[NUMNODES]
Definition: hbeam.h:78
Vec6 DefLocRef
Definition: hbeam.h:104
Vec3 L0
Definition: hbeam.h:109
Vec6 DefLoc
Definition: hbeam.h:103
#define ASSERT(expression)
Definition: colamd.c:977
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
Vec6 AzLoc
Definition: hbeam.h:102
Vec3 g
Definition: hbeam.h:107
Vec6 AzRef
Definition: hbeam.h:101
Vec6 Az
Definition: hbeam.h:100
InitialAssemblyElem(unsigned int uL, flag fOut)
Definition: elem.cc:233
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
Vec3 p
Definition: hbeam.h:106
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

HBeam::~HBeam ( void  )
virtual

Definition at line 118 of file hbeam.cc.

References ASSERT, pD, and SAFEDELETE.

119 {
120  /* Distrugge il legame costitutivo */
121  ASSERT(pD != NULL);
122  if (pD != NULL) {
123  SAFEDELETE(pD);
124  }
125 }
#define ASSERT(expression)
Definition: colamd.c:977
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

virtual void HBeam::AddInternalForces ( Vec6 )
inlineprotectedvirtual

Definition at line 159 of file hbeam.h.

References NO_OP.

Referenced by AfterPredict(), and AssStiffnessVec().

159  {
160  NO_OP;
161  };
#define NO_OP
Definition: myassert.h:74
void HBeam::AfterConvergence ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 347 of file hbeam.cc.

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

348 {
350 }
Vec6 DefLoc
Definition: hbeam.h:103
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90

Here is the call graph for this function:

void HBeam::AfterPredict ( VectorHandler ,
VectorHandler  
)
virtual

Reimplemented from SimulationEntity.

Definition at line 577 of file hbeam.cc.

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

578 {
579  /*
580  * Calcola le deformazioni, aggiorna il legame costitutivo
581  * e crea la FDE
582  */
583 #if 0
584  /* Recupera i dati dei nodi */
585  Vec3 gNod[NUMNODES];
586  Vec3 xTmp[NUMNODES];
587 
588  for (unsigned int i = 0; i < NUMNODES; i++) {
589  gNod[i] = pNode[i]->GetgRef();
590  xTmp[i] = pNode[i]->GetXCurr()+pNode[i]->GetRRef()*f[i];
591  }
592 
593  Mat3x3 RDelta;
594  Vec3 gGrad;
595 
596  /* Aggiorna le grandezze della trave nel punto di valutazione */
597 
598  /* Posizione */
599  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
600 
601  /* Matrici di rotazione */
602  g = InterpState(gNod[NODE1], gNod[NODE2]);
603  RDelta = Mat3x3(MatR, g);
604  R = RRef = RDelta*R;
605 
606  /* Derivate della posizione */
607  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
608 
609  /* Derivate dei parametri di rotazione */
610  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
611 
612  /* Per le deformazioni nel sistema del materiale */
613  Mat3x3 RTmp(R.Transpose());
614 
615  /*
616  * Calcola le deformazioni nel sistema locale
617  * nei punti di valutazione
618  */
619  DefLoc = DefLocRef = Vec6(RTmp*L-L0,
620  RTmp*(Mat3x3(MatG, g)*gGrad)+DefLoc.GetVec2());
621 
622  /* Calcola le azioni interne */
623  pD->Update(DefLoc);
624  AzLoc = pD->GetF();
625 
626  /* corregge le azioni interne locali (piezo, ecc) */
628 
629  /* Porta le azioni interne nel sistema globale */
630  Az = AzRef = MultRV(AzLoc, R);
631 
632  /* Aggiorna il legame costitutivo di riferimento */
633  DRef = MultRMRt(pD->GetFDE(), RRef);
634 
635  bFirstRes = true;
636 #endif
637 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
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
Vec3 LRef
Definition: hbeam.h:111
const Tder & GetFDE(void) const
Definition: constltp.h:298
bool bFirstRes
Definition: hbeam.h:118
Definition: matvec6.h:37
Vec3 L
Definition: hbeam.h:110
const MatG_Manip MatG
Definition: matvec3.cc:646
Vec3 f[NUMNODES]
Definition: hbeam.h:78
Vec6 DefLocRef
Definition: hbeam.h:104
Vec3 L0
Definition: hbeam.h:109
Mat3x3 R
Definition: hbeam.h:86
Vec6 DefLoc
Definition: hbeam.h:103
const MatR_Manip MatR
Definition: matvec3.cc:645
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
virtual void AddInternalForces(Vec6 &)
Definition: hbeam.h:159
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Vec6 AzLoc
Definition: hbeam.h:102
Vec3 g
Definition: hbeam.h:107
const T & GetF(void) const
Definition: constltp.h:293
Mat6x6 DRef
Definition: hbeam.h:93
Vec6 AzRef
Definition: hbeam.h:101
virtual const Vec3 & GetgRef(void) const
Definition: strnode.h:976
Vec6 Az
Definition: hbeam.h:100
Mat3x3 RRef
Definition: hbeam.h:87
Vec3 p
Definition: hbeam.h:106
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

VariableSubMatrixHandler & HBeam::AssJac ( VariableSubMatrixHandler WorkMat,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 497 of file hbeam.cc.

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

501 {
502  DEBUGCOUTFNAME("HBeam::AssJac => AssStiffnessMat");
503 
504  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
505  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
506  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
507  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
508 
509  FullSubMatrixHandler& WM = WorkMat.SetFull();
510 
511  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
512  WM.ResizeReset(12, 12);
513 
514  for (int iCnt = 1; iCnt <= 6; iCnt++) {
515  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
516  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
517  WM.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
518  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
519  }
520 
521  AssStiffnessMat(WM, WM, dCoef, XCurr, XPrimeCurr);
522 
523  return WorkMat;
524 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:354
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Implements Elem.

Definition at line 529 of file hbeam.cc.

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

533 {
534  DEBUGCOUTFNAME("HBeam::AssRes => AssStiffnessVec");
535 
536  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
537  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
538 
539  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
540  WorkVec.ResizeReset(12);
541 
542  for (unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
543  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
544  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
545  }
546 
547  AssStiffnessVec(WorkVec, dCoef, XCurr, XPrimeCurr);
548 
549  return WorkVec;
550 }
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:447
virtual integer iGetFirstMomentumIndex(void) const =0
long int integer
Definition: colamd.c:51
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Definition at line 354 of file hbeam.cc.

References FullSubMatrixHandler::Add(), AzRef, ComputeFullInterpolation(), Vec3::Cross(), grad::Cross(), DEBUGCOUTFNAME, DRef, dxids, f, ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), L, Ldp, LdP, MatCross, MultRMRt(), NODE1, NODE2, NUMNODES, p, pD, pdp, pdP, pNode, R, RdP, Rho, RhodP, Rn, FullSubMatrixHandler::Sub(), Mat6x6::SubMat12(), xi, and Zero3x3.

Referenced by AssJac(), and InitialAssJac().

359 {
360  DEBUGCOUTFNAME("HBeam::AssStiffnessMat");
361 
362  /*
363  * La matrice arriva gia' dimensionata
364  * e con gli indici di righe e colonne a posto
365  */
366 
367  /* Recupera i dati dei nodi */
368  Vec3 yTmp[NUMNODES];
369  Vec3 fTmp[NUMNODES];
370  Mat3x3 RTmp[NUMNODES];
371  for (unsigned int i = 0; i < NUMNODES; i++) {
372  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
373  fTmp[i] = pNode[i]->GetRCurr()*f[i];
374  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
375  }
376  ComputeFullInterpolation(yTmp, RTmp, fTmp,
377  xi, dxids,
378  p, R,
379  RdP, pdP, pdp,
380  L, Rho,
381  RhodP, LdP, Ldp);
382  /* Legame costitutivo (viene generato sempre) */
383  DRef = MultRMRt(pD->GetFDE(), R);
384 
385  /* Derivate delle deformazioni rispetto alle incognite nodali */
386  Mat6x6 AzTmp[NUMNODES];
387 
388  for (unsigned int i = 0; i < NUMNODES; i++) {
389  /* Delta - deformazioni */
390  AzTmp[i] = Mat6x6(Ldp[i]*dCoef,
391  Zero3x3,
392  (LdP[i] + L.Cross(RdP[i]))*dCoef,
393  (RhodP[i] + Rho.Cross(RdP[i]))*dCoef);
394 
395  /* Delta - azioni interne */
396  AzTmp[i] = DRef*AzTmp[i];
397 
398  /* Correggo per la rotazione da locale a globale */
399  AzTmp[i].SubMat12((AzRef.GetVec1()*dCoef).Cross(RdP[i]));
400  AzTmp[i].SubMat22((AzRef.GetVec2()*dCoef).Cross(RdP[i]));
401  }
402 
403  Vec3 bTmp[2];
404 
405  bTmp[0] = p - pNode[NODE1]->GetXCurr();
406  bTmp[1] = p - pNode[NODE2]->GetXCurr();
407 
408  for (unsigned int i = 0; i < NUMNODES; i++) {
409  /* Equazione all'indietro: */
410  WMA.Sub(1, 6*i + 1, AzTmp[i].GetMat11());
411  WMA.Sub(1, 6*i + 4,
412  AzTmp[i].GetMat12()
413  - (AzRef.GetVec1()*dCoef).Cross(pdP[i]));
414 
415  WMA.Sub(4, 6*i + 1,
416  AzTmp[i].GetMat21()
417  - (AzRef.GetVec1()*dCoef).Cross(pdp[i])
418  + bTmp[0].Cross(AzTmp[i].GetMat11()));
419  WMA.Sub(4, 6*i + 4,
420  AzTmp[i].GetMat22()
421  + bTmp[0].Cross(AzTmp[i].GetMat12()));
422 
423  /* Equazione in avanti: */
424  WMA.Add(7, 6*i + 1, AzTmp[i].GetMat11());
425  WMA.Add(7, 6*i + 4,
426  AzTmp[i].GetMat12()
427  - (AzRef.GetVec1()*dCoef).Cross(pdP[i]));
428 
429  WMA.Add(10, 6*i + 1,
430  AzTmp[i].GetMat21()
431  - (AzRef.GetVec1()*dCoef).Cross(pdp[i])
432  + bTmp[1].Cross(AzTmp[i].GetMat11()));
433  WMA.Add(10, 6*i + 4,
434  AzTmp[i].GetMat22()
435  + bTmp[1].Cross(AzTmp[i].GetMat12()));
436  }
437 
438  /* correzione alle equazioni */
439  Mat3x3 FTmp(MatCross, AzRef.GetVec1()*dCoef);
440  WMA.Sub(4, 1, FTmp);
441  WMA.Add(10, 7, FTmp);
442 };
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
Vec3 Rho
Definition: hbeam.h:125
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
Mat3x3 RdP[NUMNODES]
Definition: hbeam.h:133
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Mat3x3 pdP[NUMNODES]
Definition: hbeam.h:130
const Tder & GetFDE(void) const
Definition: constltp.h:298
Mat3x3 Rn[NUMNODES]
Definition: hbeam.h:82
doublereal dxids
Definition: hbeam.h:115
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
void SubMat12(const Mat3x3 &x)
Definition: matvec6.h:416
Vec3 L
Definition: hbeam.h:110
Mat3x3 pdp[NUMNODES]
Definition: hbeam.h:129
Vec3 f[NUMNODES]
Definition: hbeam.h:78
doublereal xi
Definition: hbeam.h:113
Mat3x3 R
Definition: hbeam.h:86
Mat3x3 RhodP[NUMNODES]
Definition: hbeam.h:134
Mat3x3 Ldp[NUMNODES]
Definition: hbeam.h:131
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
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
Mat3x3 LdP[NUMNODES]
Definition: hbeam.h:132
Mat6x6 DRef
Definition: hbeam.h:93
Vec6 AzRef
Definition: hbeam.h:101
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
Vec3 p
Definition: hbeam.h:106
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75
void ComputeFullInterpolation(const Vec3 *const node_pos, const Mat3x3 *const node_or, const Vec3 *const node_f, const doublereal xi, const doublereal dexi_des, Vec3 &pos, Mat3x3 &orient, Mat3x3 *const or_delta_w_or, Mat3x3 *const delta_pos_w_or, Mat3x3 *const delta_pos_w_pos, Vec3 &F, Vec3 &om, Mat3x3 *const delta_om_ws_or, Mat3x3 *const delta_F_ws_or, Mat3x3 *const delta_F_ws_pos)

Here is the call graph for this function:

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

Definition at line 447 of file hbeam.cc.

References VectorHandler::Add(), AddInternalForces(), Az, AzLoc, ComputeInterpolation(), grad::Cross(), DEBUGCOUTFNAME, DefLoc, dxids, f, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), L, L0, MultRV(), NODE1, NODE2, NUMNODES, p, pD, pNode, R, Rho, Rho0, Rn, VectorHandler::Sub(), Mat3x3::Transpose(), ConstitutiveLawOwner< T, Tder >::Update(), and xi.

Referenced by AssRes(), and InitialAssRes().

451 {
452  DEBUGCOUTFNAME("HBeam::AssStiffnessVec");
453 
454  /*
455  * Riceve il vettore gia' dimensionato e con gli indici a posto
456  * per scrivere il residuo delle equazioni di equilibrio dei tre nodi
457  */
458 
459  /* Recupera i dati dei nodi */
460  Vec3 yTmp[NUMNODES];
461  Vec3 fTmp[NUMNODES];
462  Mat3x3 RTmp[NUMNODES];
463  for (unsigned int i = 0; i < NUMNODES; i++) {
464  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
465  fTmp[i] = pNode[i]->GetRCurr()*f[i];
466  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
467  }
468 
469  /* Interpolazione generica */
470  ComputeInterpolation(yTmp, RTmp, fTmp,
471  xi, dxids,
472  p, R,
473  L, Rho);
474 
475  Mat3x3 RT(R.Transpose());
476  DefLoc = Vec6(RT*L - L0, RT*Rho - Rho0);
477 
478  /* Calcola le azioni interne */
479  pD->Update(DefLoc);
480  AzLoc = pD->GetF();
481 
482  /* corregge le azioni interne locali (piezo, ecc) */
484 
485  /* Porta le azioni interne nel sistema globale */
486  Az = MultRV(AzLoc, R);
487 
488  WorkVec.Add(1, Az.GetVec1());
489  WorkVec.Add(4, (p - pNode[NODE1]->GetXCurr()).Cross(Az.GetVec1()) + Az.GetVec2());
490  WorkVec.Sub(7, Az.GetVec1());
491  WorkVec.Sub(10, Az.GetVec2() + (p - pNode[NODE2]->GetXCurr()).Cross(Az.GetVec1()));
492 }
void ComputeInterpolation(const Vec3 *const node_pos, const Mat3x3 *const node_or, const Vec3 *const node_f, const doublereal xi, const doublereal dexi_des, Vec3 &pos, Mat3x3 &orient, Vec3 &F, Vec3 &om)
Vec3 Rho
Definition: hbeam.h:125
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 Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
Mat3x3 Rn[NUMNODES]
Definition: hbeam.h:82
doublereal dxids
Definition: hbeam.h:115
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 L
Definition: hbeam.h:110
Vec3 f[NUMNODES]
Definition: hbeam.h:78
doublereal xi
Definition: hbeam.h:113
Vec3 L0
Definition: hbeam.h:109
Mat3x3 R
Definition: hbeam.h:86
Vec6 DefLoc
Definition: hbeam.h:103
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
virtual void AddInternalForces(Vec6 &)
Definition: hbeam.h:159
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
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
Vec3 Rho0
Definition: hbeam.h:126
Vec6 AzLoc
Definition: hbeam.h:102
const T & GetF(void) const
Definition: constltp.h:293
Vec6 Az
Definition: hbeam.h:100
Vec3 p
Definition: hbeam.h:106
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

doublereal HBeam::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Definition at line 197 of file hbeam.cc.

References ASSERT, AzLoc, DefLoc, Vec6::dGet(), WithLabel::GetLabel(), and MBDYN_EXCEPT_ARGS.

198 {
199  ASSERT(i > 0 && i <= 6);
200 
201  switch (i) {
202  case 1:
203  case 4:
204  case 5:
205  case 6:
206  return DefLoc.dGet(i);
207 
208  case 7:
209  case 10:
210  case 11:
211  case 12:
212  return AzLoc.dGet(i);
213 
214  case 2:
215  case 3:
216  silent_cerr("HBeam(" << GetLabel() << "): "
217  "not allowed to return shear strain" << std::endl);
219 
220  case 8:
221  case 9:
222  silent_cerr("HBeam(" << GetLabel() << "): "
223  "not allowed to return shear force" << std::endl);
225 
226  default:
227  silent_cerr("HBeam(" << GetLabel() << "): "
228  "illegal private data " << i << std::endl);
230  }
231 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Vec6 DefLoc
Definition: hbeam.h:103
#define ASSERT(expression)
Definition: colamd.c:977
Vec6 AzLoc
Definition: hbeam.h:102
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 HBeam::DsDxi ( void  )
protectedvirtual

Definition at line 234 of file hbeam.cc.

References ComputeInterpolation(), Vec3::Dot(), dsdxi, dxids, f, WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), L, L0, LRef, MBDYN_EXCEPT_ARGS, NUMNODES, p, pNode, R, Rho, Rho0, Rn, RRef, grad::sqrt(), Mat3x3::Transpose(), and xi.

Referenced by HBeam().

235 {
236  /* Calcola il ds/dxi e le deformazioni iniziali */
237  Mat3x3 RTmp[NUMNODES];
238  Vec3 yTmp[NUMNODES];
239  Vec3 fTmp[NUMNODES];
240  for (unsigned int i = 0; i < NUMNODES; i++) {
241  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
242  fTmp[i] = pNode[i]->GetRCurr()*f[i];
243  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
244  }
245 
246  xi = 0.5;
247  dsdxi = 1.0;
248  /* Calcolo i wder ... */
249  ComputeInterpolation(yTmp, RTmp, fTmp,
250  xi, dsdxi,
251  p, R,
252  L, Rho);
253 
254  doublereal d = L.Dot();
255  if (d > std::numeric_limits<doublereal>::epsilon()) {
256  d = std::sqrt(d);
257  } else {
258  silent_cerr("HBeam(" << GetLabel() << ") "
259  "has singular metric; aborting..." << std::endl);
260 
262  }
263 
264  dsdxi = dsdxi*d;
265  dxids = 1./dsdxi;
266 
267  /* Calcolo le caratteristiche iniziali ... */
268  ComputeInterpolation(yTmp, RTmp, fTmp,
269  xi, dxids,
270  p, R,
271  L, Rho);
272 
273  /* Grandezze iniziali e di riferimento */
274  /* FIXME: fare un temporaneo per i trasposti ... */
275  RRef = R;
276  Mat3x3 RT(R.Transpose());
277  Rho0 = RT*Rho;
278  LRef = L;
279  L0 = RT*L;
280 }
void ComputeInterpolation(const Vec3 *const node_pos, const Mat3x3 *const node_or, const Vec3 *const node_f, const doublereal xi, const doublereal dexi_des, Vec3 &pos, Mat3x3 &orient, Vec3 &F, Vec3 &om)
Vec3 Rho
Definition: hbeam.h:125
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
Vec3 LRef
Definition: hbeam.h:111
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
Mat3x3 Rn[NUMNODES]
Definition: hbeam.h:82
doublereal dxids
Definition: hbeam.h:115
doublereal dsdxi
Definition: hbeam.h:114
Vec3 L
Definition: hbeam.h:110
Vec3 f[NUMNODES]
Definition: hbeam.h:78
doublereal xi
Definition: hbeam.h:113
Vec3 L0
Definition: hbeam.h:109
Mat3x3 R
Definition: hbeam.h:86
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
Vec3 Rho0
Definition: hbeam.h:126
Mat3x3 RRef
Definition: hbeam.h:87
double doublereal
Definition: colamd.c:52
Vec3 p
Definition: hbeam.h:106
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Definition at line 193 of file hbeam.h.

References Beam::ELASTIC.

193  {
194  return Beam::ELASTIC;
195  };
virtual void HBeam::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Definition at line 301 of file hbeam.h.

References NUMNODES, and pNode.

301  {
302  connectedNodes.resize(NUMNODES);
303  for (int i = 0; i < NUMNODES; i++) {
304  connectedNodes[i] = pNode[i];
305  }
306  };
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75
virtual Elem::Type HBeam::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 198 of file hbeam.h.

References Elem::BEAM.

198  {
199  return Elem::BEAM;
200  };
virtual unsigned int HBeam::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 259 of file hbeam.h.

259  {
260  return 0;
261  };
unsigned int HBeam::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Definition at line 129 of file hbeam.cc.

130 {
131  return 12;
132 }
unsigned int HBeam::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Definition at line 135 of file hbeam.cc.

References ASSERT.

136 {
137  ASSERT(s != NULL);
138 
139  /*
140  * {ex|k{x|y|z}}
141  */
142 
143  unsigned int idx = 0;
144 
145  switch (s[0]) {
146  case 'F':
147  idx += 6;
148  case 'e':
149  switch (s[1]) {
150  case 'x':
151  idx += 1;
152  break;
153 
154  case 'y':
155  case 'z':
156  return 0;
157 
158  default:
159  return 0;
160  }
161  break;
162 
163  case 'M':
164  idx += 6;
165  case 'k':
166  idx += 3;
167  switch (s[1]) {
168  case 'x':
169  idx += 1;
170  break;
171 
172  case 'y':
173  idx += 2;
174  break;
175 
176  case 'z':
177  idx += 3;
178  break;
179 
180  default:
181  return 0;
182  }
183  break;
184 
185  default:
186  return 0;
187  }
188 
189  if (s[2] != '\0') {
190  return 0;
191  }
192 
193  return idx;
194 }
#define ASSERT(expression)
Definition: colamd.c:977
VariableSubMatrixHandler & HBeam::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 656 of file hbeam.cc.

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

658 {
659  DEBUGCOUTFNAME("HBeam::InitialAssJac => AssStiffnessMat");
660 
661  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
662  FullSubMatrixHandler& WM = WorkMat.SetFull();
663  WM.ResizeReset(12, 12);
664 
665  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
666  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
667 
668  for (int iCnt = 1; iCnt <= 6; iCnt++) {
669  WM.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
670  WM.PutColIndex(iCnt, iNode1FirstPosIndex+iCnt);
671  WM.PutRowIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
672  WM.PutColIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
673  }
674 
675  AssStiffnessMat(WM, WM, 1., XCurr, XCurr);
676  return WorkMat;
677 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:354
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 682 of file hbeam.cc.

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

684 {
685  DEBUGCOUTFNAME("HBeam::InitialAssRes => AssStiffnessVec");
686 
687  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
688  WorkVec.ResizeReset(12);
689 
690  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
691  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
692 
693  for (int iCnt = 1; iCnt <= 6; iCnt++) {
694  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
695  WorkVec.PutRowIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
696  }
697 
698  AssStiffnessVec(WorkVec, 1., XCurr, XCurr);
699  return WorkVec;
700 }
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:447
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
long int integer
Definition: colamd.c:51
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 268 of file hbeam.h.

269  {
270  *piNumRows = 12;
271  *piNumCols = 12;
272  };
void HBeam::Omega0 ( void  )
protectedvirtual

Definition at line 285 of file hbeam.cc.

References dN2, StructNode::GetRCurr(), StructNode::GetWCurr(), CGR_Rot::MatG, CGR_Rot::MatGm1, MatR2gparam(), NODE1, NODE2, NUMNODES, Omega, pNode, and grad::Transpose().

286 {
287 #if 0
288  /* Modo consistente: */
289  Mat3x3 RNod[NUMNODES];
290  Vec3 w[NUMNODES];
291  for (unsigned int i = 0; i < NUMNODES; i++) {
292  RNod[i] = pNode[i]->GetRCurr();
293  w[i] = pNode[i]->GetWCurr();
294  }
295 
296  /*
297  * Calcolo i parametri di rotazione della rotazione relativa
298  * tra inizio e fine e li dimezzo nell'ipotesi che siano limitati
299  */
300  Vec3 gTmp(MatR2gparam(RNod[NODE2].Transpose()*RNod[NODE1]));
301 
302  /*
303  * Le derivate dei parametri di rotazione si ricavano da omega
304  */
305  Vec3 g1P(Mat3x3(MatGm1, gTmp*(-.5))*w[NODE1]);
306  Vec3 g2P(Mat3x3(MatGm1, gTmp*.5)*w[NODE2]);
307 
308  Vec3 gPTmp(g1P*dN2[NODE1]+g2P*dN2[NODE2]);
309  Omega = Mat3x3(MatG, gTmp)*gPTmp;
310 
311 #if 0
312  /* Modo brutale: interpolo le velocita' dei nodi */
313  Vec3 w[NUMNODES];
314  for (unsigned int i = 0; i < NUMNODES; i++) {
315  w[i] = pNode[i]->GetWCurr();
316  }
317  Omega[i] = w[NODE1]*dN2[NODE1]+w[NODE2]*dN2[NODE2];
318 #endif /* 0 */
319 #endif
320 }
const MatGm1_Manip MatGm1
Definition: matvec3.cc:647
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
Vec3 Omega
Definition: hbeam.h:96
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 MatR2gparam(const Mat3x3 &m)
Definition: matvec3.cc:756
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
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

void HBeam::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 645 of file hbeam.cc.

References AzLoc, OutputHandler::Beams(), ToBeOutput::bToBeOutput(), WithLabel::GetLabel(), Vec6::GetVec1(), and Vec6::GetVec2().

646 {
647  if (bToBeOutput()) {
648  OH.Beams() << std::setw(8) << GetLabel() << " "
649  << AzLoc.GetVec1() << " " << AzLoc.GetVec2() << std::endl;
650  }
651 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
std::ostream & Beams(void) const
Definition: output.h:457
Vec6 AzLoc
Definition: hbeam.h:102
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Definition at line 704 of file hbeam.cc.

References ASSERT, MBDYN_EXCEPT_ARGS, and pNode.

705 {
706  ASSERT(i >= 1 && i <= 2);
707  switch (i) {
708  case 1:
709  case 2:
710  return pNode[i-1];
711  default:
713  }
714 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75
std::ostream & HBeam::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Definition at line 325 of file hbeam.cc.

References Restart_().

326 {
327  return Restart_(out)<< ';' << std::endl;
328 }
virtual std::ostream & Restart_(std::ostream &out) const
Definition: hbeam.cc:331

Here is the call graph for this function:

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

Definition at line 331 of file hbeam.cc.

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

Referenced by Restart().

332 {
333  out << " beam2: " << GetLabel();
334  for (unsigned int i = 0; i < NUMNODES; i++) {
335  out << ", " << pNode[i]->GetLabel() << ", reference, node, ",
336  f[i].Write(out, ", ");
337  }
338  out << ", reference, global,"
339  << "1, ", (R.GetVec(1)).Write(out, ", ") << ", "
340  << "2, ", (R.GetVec(2)).Write(out, ", ") << ", ",
341  pD->pGetConstLaw()->Restart(out);
342 
343  return out;
344 }
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
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
Vec3 f[NUMNODES]
Definition: hbeam.h:78
Mat3x3 R
Definition: hbeam.h:86
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75

Here is the call graph for this function:

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

Definition at line 173 of file hbeam.h.

References BeamT.

173  {
174  BeamT = T;
175  };
Beam::Type BeamT
Definition: hbeam.h:68
virtual void HBeam::SetInitialValue ( VectorHandler )
inlinevirtual

Definition at line 275 of file hbeam.h.

References NO_OP.

275  {
276  NO_OP;
277  };
#define NO_OP
Definition: myassert.h:74
void HBeam::SetValue ( DataManager pDM,
VectorHandler ,
VectorHandler ,
SimulationEntity::Hints ph = 0 
)
virtual

Implements ElemGravityOwner.

Definition at line 555 of file hbeam.cc.

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

558 {
559  /* Aggiorna le grandezze della trave nei punti di valutazione */
560  (Mat3x3&)RRef = R;
561  (Vec3&)LRef = L;
562  (Vec6&)DefLocRef = DefLoc;
563  (Vec6&)AzRef = Az;
564 
565  /*
566  * Aggiorna il legame costitutivo di riferimento
567  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
568  */
569  (Mat6x6&)DRef = MultRMRt(pD->GetFDE(), RRef);
570 
571  bFirstRes = true;
572 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
Definition: matvec3.h:98
Vec3 LRef
Definition: hbeam.h:111
const Tder & GetFDE(void) const
Definition: constltp.h:298
bool bFirstRes
Definition: hbeam.h:118
Definition: matvec6.h:37
Vec3 L
Definition: hbeam.h:110
Vec6 DefLocRef
Definition: hbeam.h:104
Mat3x3 R
Definition: hbeam.h:86
Vec6 DefLoc
Definition: hbeam.h:103
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
Mat6x6 DRef
Definition: hbeam.h:93
Vec6 AzRef
Definition: hbeam.h:101
Vec6 Az
Definition: hbeam.h:100
Mat3x3 RRef
Definition: hbeam.h:87

Here is the call graph for this function:

virtual void HBeam::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 213 of file hbeam.h.

213  {
214  *piNumRows = 12;
215  *piNumCols = 12;
216  };

Friends And Related Function Documentation

friend class AerodynamicBeam
friend

Definition at line 59 of file hbeam.h.

Member Data Documentation

Vec6 HBeam::Az
protected

Definition at line 100 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessVec(), HBeam(), and SetValue().

Vec6 HBeam::AzLoc
protected

Definition at line 102 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessVec(), dGetPrivData(), HBeam(), and Output().

Vec6 HBeam::AzRef
protected

Definition at line 101 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), HBeam(), and SetValue().

Beam::Type HBeam::BeamT
private

Definition at line 68 of file hbeam.h.

Referenced by SetBeamType().

bool HBeam::bFirstRes
protected

Definition at line 118 of file hbeam.h.

Referenced by AfterPredict(), and SetValue().

Vec6 HBeam::DefLoc
protected

Definition at line 103 of file hbeam.h.

Referenced by AfterConvergence(), AfterPredict(), AssStiffnessVec(), dGetPrivData(), HBeam(), and SetValue().

Vec6 HBeam::DefLocRef
protected

Definition at line 104 of file hbeam.h.

Referenced by AfterPredict(), HBeam(), and SetValue().

Mat6x6 HBeam::DRef
protected

Definition at line 93 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), and SetValue().

doublereal HBeam::dsdxi
protected

Definition at line 114 of file hbeam.h.

Referenced by DsDxi().

doublereal HBeam::dxids
protected

Definition at line 115 of file hbeam.h.

Referenced by AssStiffnessMat(), AssStiffnessVec(), and DsDxi().

Vec3 HBeam::f[NUMNODES]
protected

Definition at line 78 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), AssStiffnessVec(), DsDxi(), HBeam(), and Restart_().

Vec3 HBeam::fRef[NUMNODES]
protected

Definition at line 79 of file hbeam.h.

Vec3 HBeam::g
protected

Definition at line 107 of file hbeam.h.

Referenced by AfterPredict(), and HBeam().

Vec3 HBeam::L
protected

Definition at line 110 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), AssStiffnessVec(), DsDxi(), HBeam(), and SetValue().

Vec3 HBeam::L0
protected

Definition at line 109 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessVec(), DsDxi(), and HBeam().

Mat3x3 HBeam::Ldp[NUMNODES]
protected

Definition at line 131 of file hbeam.h.

Referenced by AssStiffnessMat().

Mat3x3 HBeam::LdP[NUMNODES]
protected

Definition at line 132 of file hbeam.h.

Referenced by AssStiffnessMat().

Vec3 HBeam::LRef
protected

Definition at line 111 of file hbeam.h.

Referenced by AfterPredict(), DsDxi(), and SetValue().

Vec3 HBeam::Omega
protected

Definition at line 96 of file hbeam.h.

Referenced by HBeam(), and Omega0().

Vec3 HBeam::OmegaRef
protected

Definition at line 97 of file hbeam.h.

Vec3 HBeam::p
protected

Definition at line 106 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), AssStiffnessVec(), DsDxi(), and HBeam().

Mat3x3 HBeam::pdp[NUMNODES]
protected

Definition at line 129 of file hbeam.h.

Referenced by AssStiffnessMat().

Mat3x3 HBeam::pdP[NUMNODES]
protected

Definition at line 130 of file hbeam.h.

Referenced by AssStiffnessMat().

Mat3x3 HBeam::R
protected

Definition at line 86 of file hbeam.h.

Referenced by AfterPredict(), AssStiffnessMat(), AssStiffnessVec(), DsDxi(), Restart_(), and SetValue().

Mat3x3 HBeam::RdP[NUMNODES]
protected

Definition at line 133 of file hbeam.h.

Referenced by AssStiffnessMat().

Vec3 HBeam::Rho
protected

Definition at line 125 of file hbeam.h.

Referenced by AssStiffnessMat(), AssStiffnessVec(), and DsDxi().

Vec3 HBeam::Rho0
protected

Definition at line 126 of file hbeam.h.

Referenced by AssStiffnessVec(), and DsDxi().

Mat3x3 HBeam::RhodP[NUMNODES]
protected

Definition at line 134 of file hbeam.h.

Referenced by AssStiffnessMat().

Mat3x3 HBeam::Rn[NUMNODES]
protected

Definition at line 82 of file hbeam.h.

Referenced by AssStiffnessMat(), AssStiffnessVec(), DsDxi(), and HBeam().

Mat3x3 HBeam::RRef
protected

Definition at line 87 of file hbeam.h.

Referenced by AfterPredict(), DsDxi(), and SetValue().

doublereal HBeam::xi
protected

Definition at line 113 of file hbeam.h.

Referenced by AssStiffnessMat(), AssStiffnessVec(), and DsDxi().


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