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

#include <body.h>

Inheritance diagram for ModalBody:
Collaboration diagram for ModalBody:

Public Member Functions

 ModalBody (unsigned int uL, const ModalNode *pNodeTmp, doublereal dMassTmp, const Vec3 &XgcTmp, const Mat3x3 &JTmp, flag fOut)
 
virtual ~ModalBody (void)
 
void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
- 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 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)
 
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
 
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 DynamicBody
 DynamicBody (unsigned int uL, const DynamicStructNode *pNodeTmp, doublereal dMassTmp, const Vec3 &XgcTmp, const Mat3x3 &JTmp, flag fOut)
 
virtual ~DynamicBody (void)
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
- Public Member Functions inherited from Body
 Body (unsigned int uL, const StructNode *pNode, doublereal dMassTmp, const Vec3 &XgcTmp, const Mat3x3 &JTmp, flag fOut)
 
virtual ~Body (void)
 
virtual std::ostream & Restart (std::ostream &out) const
 
doublereal dGetM (void) const
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
const StructNodepGetNode (void) const
 
virtual Elem::Type GetElemType (void) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- Public Member Functions inherited from ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
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)
 

Private Member Functions

void AssMats (FullSubMatrixHandler &WorkMatA, FullSubMatrixHandler &WorkMatB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, bool bGravity, const Vec3 &GravityAcceleration)
 

Private Attributes

Vec3 XPP
 
Vec3 WP
 

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 }
 
- Protected Member Functions inherited from Body
Vec3 GetS_int (void) const
 
Mat3x3 GetJ_int (void) const
 
void AssVecRBK_int (SubVectorHandler &WorkVec)
 
void AssMatsRBK_int (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, const doublereal &dCoef, const Vec3 &Sc)
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from Body
const StructNodepNode
 
doublereal dMass
 
Vec3 Xgc
 
Vec3 S0
 
Mat3x3 J0
 
Vec3 STmp
 
Mat3x3 JTmp
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

Detailed Description

Definition at line 425 of file body.h.

Constructor & Destructor Documentation

ModalBody::ModalBody ( unsigned int  uL,
const ModalNode pNodeTmp,
doublereal  dMassTmp,
const Vec3 XgcTmp,
const Mat3x3 JTmp,
flag  fOut 
)

Definition at line 1427 of file body.cc.

References NO_OP.

1433 : Elem(uL, fOut),
1434 DynamicBody(uL, pNode, dMass, Xgc, J, fOut),
1435 XPP(::Zero3), WP(::Zero3)
1436 {
1437  NO_OP;
1438 }
const Vec3 Zero3(0., 0., 0.)
DynamicBody(unsigned int uL, const DynamicStructNode *pNodeTmp, doublereal dMassTmp, const Vec3 &XgcTmp, const Mat3x3 &JTmp, flag fOut)
Definition: body.cc:1002
#define NO_OP
Definition: myassert.h:74
doublereal dMass
Definition: body.h:274
Vec3 WP
Definition: body.h:428
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
const StructNode * pNode
Definition: body.h:273
Vec3 XPP
Definition: body.h:428
Vec3 Xgc
Definition: body.h:275
ModalBody::~ModalBody ( void  )
virtual

Definition at line 1441 of file body.cc.

References NO_OP.

1442 {
1443  NO_OP;
1444 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 1454 of file body.cc.

References AssMats(), GravityOwner::bGetGravity(), DEBUGCOUTFNAME, StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), Body::pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

1458 {
1459  DEBUGCOUTFNAME("ModalBody::AssJac");
1460 
1461  /* Casting di WorkMat */
1462  FullSubMatrixHandler& WM = WorkMat.SetFull();
1463 
1464  Vec3 GravityAcceleration;
1466  GravityAcceleration);
1467 
1468  const integer iNumRows = 12;
1469 
1470  /* Dimensiona e resetta la matrice di lavoro */
1471  WM.ResizeReset(iNumRows, 12);
1472 
1473  /* Setta gli indici della matrice - le incognite sono ordinate come:
1474  * - posizione (3)
1475  * - parametri di rotazione (3)
1476  * - quantita' di moto (3)
1477  * - momento della quantita' di moto
1478  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
1479  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
1480  * e' dato da iGetFirstPositionIndex()+i */
1481  const integer iFirstIndexModal = pNode->iGetFirstIndex();
1482  for (integer iCnt = 1; iCnt <= 12; iCnt++) {
1483  WM.PutRowIndex(iCnt, iFirstIndexModal + iCnt);
1484  }
1485 
1486  for (integer iCnt = 1; iCnt <= 12; ++iCnt) {
1487  WM.PutColIndex(iCnt, iFirstIndexModal + iCnt);
1488  }
1489 
1490  AssMats(WM, WM, dCoef, XCurr, XPrimeCurr, g, GravityAcceleration);
1491 
1492  return WorkMat;
1493 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual bool bGetGravity(const Vec3 &X, Vec3 &Acc) const
Definition: gravity.cc:208
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void AssMats(FullSubMatrixHandler &WorkMatA, FullSubMatrixHandler &WorkMatB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, bool bGravity, const Vec3 &GravityAcceleration)
Definition: body.cc:1540
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

void ModalBody::AssMats ( FullSubMatrixHandler WorkMatA,
FullSubMatrixHandler WorkMatB,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr,
bool  bGravity,
const Vec3 GravityAcceleration 
)
private

Definition at line 1540 of file body.cc.

References FullSubMatrixHandler::Add(), Body::AssMatsRBK_int(), DEBUGCOUTFNAME, Body::dMass, StructNode::GetRCurr(), StructNode::GetRRef(), StructNode::GetWCurr(), Body::J0, Body::JTmp, Mat3x3DEye, MatCross, MatCrossCross, Mat3x3::MulTV(), Mat3x3::MulTVCross(), StructDispNode::pGetRBK(), Body::pNode, Body::S0, Body::STmp, FullSubMatrixHandler::Sub(), WP, and XPP.

Referenced by AssJac(), and AssMats().

1547 {
1548  DEBUGCOUTFNAME("ModalBody::AssMats");
1549 
1550  const Vec3& W(pNode->GetWCurr());
1551 
1552  Vec3 Sc(STmp*dCoef);
1553 
1554  const Mat3x3& RRef = pNode->GetRRef();
1555  const Mat3x3& RCurr = pNode->GetRCurr();
1556 
1557  const Mat3x3 J12A = (Mat3x3(MatCross, WP) + Mat3x3(MatCrossCross, W, W)).MulVCross(RRef * S0 * (-dCoef));
1558  const Mat3x3 J13B(Mat3x3DEye, dMass);
1559  const Mat3x3 J14A = (Mat3x3(MatCrossCross, W, STmp) + Mat3x3(MatCross, W.Cross(STmp))) * (-dCoef);
1560  const Mat3x3 J14B(MatCross, -STmp);
1561  const Mat3x3 J22A = (Mat3x3(MatCrossCross, W, RRef * J0 * RCurr.MulTV(W))
1562  - Mat3x3(MatCrossCross, XPP, RRef * S0)
1563  - W.Cross(RCurr * J0 * RRef.MulTVCross(W))
1564  + Mat3x3(MatCross, RRef * J0 * RCurr.MulTV(WP))
1565  - RCurr * J0 * RRef.MulTVCross(WP))* (-dCoef);
1566  const Mat3x3 J23B(MatCross, STmp);
1567  const Mat3x3 J24A = (Mat3x3(MatCross, JTmp * W) - W.Cross(JTmp)) * (-dCoef);
1568  const Mat3x3 J24B = JTmp;
1569 
1570  WMA.Add(6 + 1, 3 + 1, J12A);
1571  WMB.Add(6 + 1, 6 + 1, J13B);
1572  WMA.Add(6 + 1, 9 + 1, J14A);
1573  WMB.Add(6 + 1, 9 + 1, J14B);
1574  WMA.Add(9 + 1, 3 + 1, J22A);
1575  WMB.Add(9 + 1, 6 + 1, J23B);
1576  WMA.Add(9 + 1, 9 + 1, J24A);
1577  WMB.Add(9 + 1, 9 + 1, J24B);
1578 
1579  if (bGravity) {
1580  WMA.Sub(9 + 1, 3 + 1, Mat3x3(MatCrossCross, GravityAcceleration, Sc));
1581  }
1582 
1583  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
1584  if (pRBK) {
1585  AssMatsRBK_int(WMA, WMB, dCoef, Sc);
1586  }
1587 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
const MatCross_Manip MatCross
Definition: matvec3.cc:639
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 STmp
Definition: body.h:279
Mat3x3 J0
Definition: body.h:277
const Mat3x3DEye_Manip Mat3x3DEye
Definition: matvec3.cc:637
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Mat3x3 MulTVCross(const Vec3 &v) const
Definition: matvec3.cc:596
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
void AssMatsRBK_int(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, const doublereal &dCoef, const Vec3 &Sc)
Definition: body.cc:928
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
Vec3 WP
Definition: body.h:428
Mat3x3 JTmp
Definition: body.h:280
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
Vec3 S0
Definition: body.h:276
const StructNode * pNode
Definition: body.h:273
Vec3 XPP
Definition: body.h:428

Here is the call graph for this function:

void ModalBody::AssMats ( VariableSubMatrixHandler WorkMatA,
VariableSubMatrixHandler WorkMatB,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Reimplemented from Elem.

Definition at line 1497 of file body.cc.

References AssMats(), GravityOwner::bGetGravity(), DEBUGCOUTFNAME, StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), Body::pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

1501 {
1502  DEBUGCOUTFNAME("ModalBody::AssMats");
1503 
1504  /* Casting di WorkMat */
1505  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
1506  FullSubMatrixHandler& WMB = WorkMatB.SetFull();
1507 
1508  Vec3 GravityAcceleration;
1510  GravityAcceleration);
1511 
1512  const integer iNumRows = 12;
1513 
1514  /* Dimensiona e resetta la matrice di lavoro */
1515  WMA.ResizeReset(iNumRows, 12);
1516  WMB.ResizeReset(iNumRows, 12);
1517 
1518  /* Setta gli indici della matrice - le incognite sono ordinate come:
1519  * - posizione (3)
1520  * - parametri di rotazione (3)
1521  * - quantita' di moto (3)
1522  * - momento della quantita' di moto
1523  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
1524  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
1525  * e' dato da iGetFirstPositionIndex()+i */
1526  integer iFirstIndexModal = pNode->iGetFirstIndex();
1527  for (integer iCnt = 1; iCnt <= 12; iCnt++) {
1528  WMA.PutRowIndex(iCnt, iFirstIndexModal + iCnt);
1529  WMA.PutColIndex(iCnt, iFirstIndexModal + iCnt);
1530 
1531  WMB.PutRowIndex(iCnt, iFirstIndexModal + iCnt);
1532  WMB.PutColIndex(iCnt, iFirstIndexModal + iCnt);
1533  }
1534 
1535  AssMats(WMA, WMB, 1., XCurr, XPrimeCurr, g, GravityAcceleration);
1536 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual bool bGetGravity(const Vec3 &X, Vec3 &Acc) const
Definition: gravity.cc:208
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void AssMats(FullSubMatrixHandler &WorkMatA, FullSubMatrixHandler &WorkMatB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, bool bGravity, const Vec3 &GravityAcceleration)
Definition: body.cc:1540
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1591 of file body.cc.

References VectorHandler::Add(), DynamicStructNode::AddInertia(), ASSERT, Body::AssVecRBK_int(), GravityOwner::bGetGravity(), Vec3::Cross(), DEBUGCOUTFNAME, VectorHandler::dGetCoef(), Body::dMass, StructNode::GetRCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstPositionIndex(), Body::J0, Body::JTmp, Mat3x3::MulMT(), StructDispNode::pGetRBK(), Body::pNode, SubVectorHandler::PutRowIndex(), R, VectorHandler::ResizeReset(), Body::S0, Body::STmp, WP, and XPP.

1595 {
1596  DEBUGCOUTFNAME("ModalBody::AssRes");
1597 
1598  /* Se e' definita l'accelerazione di gravita',
1599  * la aggiunge (solo al residuo) */
1600  Vec3 GravityAcceleration;
1602  GravityAcceleration);
1603 
1604  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
1605 
1606  const integer iNumRows = 12;
1607 
1608  WorkVec.ResizeReset(iNumRows);
1609 
1610  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
1611  for (integer iCnt = 1; iCnt <= iNumRows; iCnt++) {
1612  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
1613  }
1614 
1615  const Vec3& W(pNode->GetWCurr());
1616 
1617  /* Aggiorna i suoi dati (saranno pronti anche per AssJac) */
1618  const Mat3x3& R(pNode->GetRCurr());
1619  STmp = R*S0;
1620  JTmp = R*J0.MulMT(R);
1621 
1622  const integer iFirstIndexModal = pNode->iGetFirstIndex();
1623 
1624  for (integer i = 1; i <= 3; ++i) {
1625  XPP(i) = XPrimeCurr.dGetCoef(iFirstIndexModal + i + 6);
1626  WP(i) = XPrimeCurr.dGetCoef(iFirstIndexModal + i + 9);
1627  }
1628 
1629  const Vec3 F = XPP * -dMass - WP.Cross(STmp) - W.Cross(W.Cross(STmp));
1630  const Vec3 M = -STmp.Cross(XPP) - W.Cross(JTmp * W) - JTmp * WP;
1631 
1632  WorkVec.Add(6 + 1, F);
1633  WorkVec.Add(9 + 1, M);
1634 
1635  if (g) {
1636  WorkVec.Add(6 + 1, GravityAcceleration*dMass);
1637  /* FIXME: this should go into Jacobian matrix
1638  * as Gravity /\ S /\ Delta g */
1639  WorkVec.Add(9 + 1, STmp.Cross(GravityAcceleration));
1640  }
1641 
1642  if (pRBK) {
1643  AssVecRBK_int(WorkVec);
1644  }
1645 
1646  const DynamicStructNode *pDN = dynamic_cast<const DynamicStructNode *>(pNode);
1647  ASSERT(pDN != 0);
1648 
1649  pDN->AddInertia(dMass, STmp, JTmp);
1650 
1651  return WorkVec;
1652 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 STmp
Definition: body.h:279
virtual bool bGetGravity(const Vec3 &X, Vec3 &Acc) const
Definition: gravity.cc:208
void AssVecRBK_int(SubVectorHandler &WorkVec)
Definition: body.cc:888
virtual const doublereal & dGetCoef(integer iRow) const =0
Mat3x3 J0
Definition: body.h:277
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
#define ASSERT(expression)
Definition: colamd.c:977
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
Vec3 WP
Definition: body.h:428
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
Mat3x3 JTmp
Definition: body.h:280
Vec3 S0
Definition: body.h:276
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
const StructNode * pNode
Definition: body.h:273
Vec3 XPP
Definition: body.h:428
Mat3x3 R
virtual void AddInertia(const doublereal &dm, const Vec3 &dS, const Mat3x3 &dJ) const
Definition: strnode.cc:3092

Here is the call graph for this function:

void ModalBody::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 1447 of file body.cc.

1448 {
1449  *piNumRows = 12;
1450  *piNumCols = 12;
1451 }

Member Data Documentation

Vec3 ModalBody::WP
private

Definition at line 428 of file body.h.

Referenced by AssMats(), and AssRes().

Vec3 ModalBody::XPP
private

Definition at line 428 of file body.h.

Referenced by AssMats(), and AssRes().


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