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

#include <body.h>

Inheritance diagram for Body:
Collaboration diagram for Body:

Public Member Functions

 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 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 WorkSpaceDim (integer *piNumRows, integer *piNumCols) const =0
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
 
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 ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)=0
 
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)
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const =0
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)=0
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)=0
 

Protected Member Functions

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 Member Functions inherited from ElemGravityOwner
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 

Protected Attributes

const StructNodepNode
 
doublereal dMass
 
Vec3 Xgc
 
Vec3 S0
 
Mat3x3 J0
 
Vec3 STmp
 
Mat3x3 JTmp
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

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 270 of file body.h.

Constructor & Destructor Documentation

Body::Body ( unsigned int  uL,
const StructNode pNode,
doublereal  dMassTmp,
const Vec3 XgcTmp,
const Mat3x3 JTmp,
flag  fOut 
)

Definition at line 722 of file body.cc.

References ASSERT, StructDispNode::GetNodeType(), and Node::STRUCTURAL.

728 : Elem(uL, fOut),
729 ElemGravityOwner(uL, fOut),
730 InitialAssemblyElem(uL, fOut),
731 pNode(pNode),
732 dMass(dMass),
733 Xgc(Xgc),
734 S0(Xgc*dMass),
735 J0(J)
736 {
737  ASSERT(pNode != NULL);
738  ASSERT(pNode->GetNodeType() == Node::STRUCTURAL);
739  ASSERT(dMass > 0.);
740 }
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
ElemGravityOwner(unsigned int uL, flag fOut)
Definition: gravity.cc:223
Mat3x3 J0
Definition: body.h:277
doublereal dMass
Definition: body.h:274
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 S0
Definition: body.h:276
InitialAssemblyElem(unsigned int uL, flag fOut)
Definition: elem.cc:233
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
const StructNode * pNode
Definition: body.h:273
Vec3 Xgc
Definition: body.h:275

Here is the call graph for this function:

Body::~Body ( void  )
virtual

Definition at line 744 of file body.cc.

References NO_OP.

745 {
746  NO_OP;
747 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void Body::AfterPredict ( VectorHandler X,
VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 787 of file body.cc.

References StructNode::GetRRef(), J0, JTmp, Mat3x3::MulMT(), pNode, R, S0, and STmp.

788 {
789  const Mat3x3& R = pNode->GetRRef();
790 
791  STmp = R*S0;
792  JTmp = R*J0.MulMT(R);
793 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Vec3 STmp
Definition: body.h:279
Mat3x3 J0
Definition: body.h:277
Mat3x3 JTmp
Definition: body.h:280
Vec3 S0
Definition: body.h:276
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
const StructNode * pNode
Definition: body.h:273
Mat3x3 R

Here is the call graph for this function:

void Body::AssMatsRBK_int ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
const doublereal dCoef,
const Vec3 Sc 
)
protected

Definition at line 928 of file body.cc.

References FullSubMatrixHandler::Add(), Vec3::Cross(), dMass, StructDispNode::GetVCurr(), RigidBodyKinematics::GetW(), StructNode::GetWCurr(), RigidBodyKinematics::GetWP(), StructDispNode::GetXCurr(), RigidBodyKinematics::GetXPP(), JTmp, MatCross, MatCrossCross, StructDispNode::pGetRBK(), pNode, STmp, and FullSubMatrixHandler::Sub().

Referenced by DynamicBody::AssMats(), ModalBody::AssMats(), and StaticBody::AssMats().

933 {
934  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
935 
936  Mat3x3 MTmp;
937  Vec3 VTmp;
938 
939  integer iIdx = 0;
940  if (dynamic_cast<DynamicBody *>(this)) {
941  iIdx = 6;
942  }
943 
944  // f: delta x
945  MTmp = Mat3x3(MatCross, pRBK->GetWP());
946  MTmp += Mat3x3(MatCrossCross, pRBK->GetW(), pRBK->GetW());
947 
948  WMA.Add(iIdx + 1, 1, MTmp*(dMass*dCoef));
949 
950 
951  // f: theta delta
952 
953  WMA.Sub(iIdx + 1, 3 + 1, MTmp*Mat3x3(MatCross, Sc));
954 
955 
956  // m: delta x
957  MTmp = Mat3x3(MatCrossCross, Sc, pRBK->GetWP());
958  MTmp += Sc.Cross(Mat3x3(MatCrossCross, pRBK->GetW(), pRBK->GetW()));
959 
960  WMA.Add(iIdx + 3 + 1, 1, MTmp);
961 
962 
963  // m: theta delta
964 
965  VTmp = pRBK->GetXPP();
966  VTmp += pRBK->GetWP().Cross(pNode->GetXCurr());
967  VTmp += pRBK->GetW().Cross(pRBK->GetW().Cross(pNode->GetXCurr()));
968  VTmp += pRBK->GetW().Cross(pNode->GetVCurr());
969 
970  MTmp = Mat3x3(MatCrossCross, VTmp, Sc);
971 
972  VTmp = (pRBK->GetW() + pNode->GetWCurr())*dCoef;
973 
974  Mat3x3 MTmp2(JTmp*Mat3x3(MatCross, pRBK->GetW()) - Mat3x3(MatCross, JTmp*pRBK->GetW()));
975  MTmp += VTmp.Cross(MTmp2);
976 
977  VTmp = (pRBK->GetWP() + pRBK->GetW().Cross(pNode->GetWCurr()))*dCoef;
978 
979  MTmp += JTmp*Mat3x3(MatCross, VTmp);
980  MTmp -= Mat3x3(MatCross, JTmp*VTmp);
981 
982  MTmp -= pNode->GetVCurr().Cross(Mat3x3(MatCrossCross, pRBK->GetW(), Sc));
983 
984  WMA.Add(iIdx + 3 + 1, 3 + 1, MTmp);
985 
986 
987  // m: delta dot x
988  MTmp = Mat3x3(MatCrossCross, STmp, pRBK->GetW());
989  MTmp -= Mat3x3(MatCross, pRBK->GetW().Cross(STmp));
990 
991  WMB.Add(iIdx + 3 + 1, 1, MTmp);
992 
993  // m: delta omega
994  WMB.Add(iIdx + 3 + 1, 3 + 1, MTmp2);
995 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Vec3 STmp
Definition: body.h:279
virtual const Vec3 & GetXPP(void) const =0
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Mat3x3 JTmp
Definition: body.h:280
virtual const Vec3 & GetWP(void) const =0
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
virtual const Vec3 & GetW(void) const =0
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
long int integer
Definition: colamd.c:51
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

void Body::AssVecRBK_int ( SubVectorHandler WorkVec)
protected

Definition at line 888 of file body.cc.

References a, Vec3::Cross(), dMass, StructDispNode::GetVCurr(), RigidBodyKinematics::GetW(), StructNode::GetWCurr(), RigidBodyKinematics::GetWP(), StructDispNode::GetXCurr(), RigidBodyKinematics::GetXPP(), JTmp, StructDispNode::pGetRBK(), pNode, STmp, and VectorHandler::Sub().

Referenced by DynamicBody::AssRes(), ModalBody::AssRes(), and StaticBody::AssRes().

889 {
890  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
891 
892  Vec3 s0;
893 
894  integer iIdx = 0;
895  if (dynamic_cast<DynamicBody *>(this)) {
896  iIdx = 6;
897  }
898 
899  s0 = pNode->GetXCurr()*dMass + STmp;
900 
901  // force
902  Vec3 f;
903  f = pRBK->GetXPP()*dMass;
904  f += pRBK->GetWP().Cross(s0);
905  f += pRBK->GetW().Cross(pRBK->GetW().Cross(s0));
906 
907  WorkVec.Sub(iIdx + 1, f);
908 
909  // moment
910  Vec3 a;
911  a = pRBK->GetXPP();
912  a += pRBK->GetWP().Cross(pNode->GetXCurr());
913  a += pRBK->GetW().Cross(pRBK->GetW().Cross(pNode->GetXCurr()));
914  a += pRBK->GetW().Cross(pNode->GetVCurr());
915 
916  Vec3 m;
917  m = STmp.Cross(a);
918  m += pRBK->GetW().Cross(JTmp*pRBK->GetW());
919  m += JTmp*pRBK->GetWP();
920  m += pNode->GetWCurr().Cross(JTmp*pRBK->GetW());
921  m -= JTmp*(pNode->GetWCurr().Cross(pRBK->GetW()));
922  m += pNode->GetVCurr().Cross(pRBK->GetW().Cross(STmp));
923 
924  WorkVec.Sub(iIdx + 3 + 1, m);
925 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
Vec3 STmp
Definition: body.h:279
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
virtual const Vec3 & GetXPP(void) const =0
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Mat3x3 JTmp
Definition: body.h:280
virtual const Vec3 & GetWP(void) const =0
virtual const Vec3 & GetW(void) const =0
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
static const doublereal a
Definition: hfluid_.h:289
long int integer
Definition: colamd.c:51
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

doublereal Body::dGetM ( void  ) const
virtual

Reimplemented from ElemGravityOwner.

Definition at line 797 of file body.cc.

References dMass.

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

798 {
799  return dMass;
800 }
doublereal dMass
Definition: body.h:274
doublereal Body::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Definition at line 852 of file body.cc.

References GravityOwner::bGetGravity(), Vec3::Cross(), dMass, Vec3::Dot(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), J0, MatCrossCross, Mat3x3::MulTV(), pNode, and Xgc.

853 {
854  switch (i) {
855  case 1: {
856  // kinetic energy
857  const Mat3x3& Rn = pNode->GetRCurr();
858  const Vec3& Vn = pNode->GetVCurr();
859  const Vec3& Wn = pNode->GetWCurr();
860 
861  Vec3 X = Rn*Xgc;
862  Vec3 V = Vn + Wn.Cross(X);
863  Vec3 W = Rn.MulTV(Wn);
864 
865  Mat3x3 Jgc = J0 + Mat3x3(MatCrossCross, Xgc, Xgc*dMass);
866 
867  return ((V*V)*dMass + W*(Jgc*W))/2.;
868  }
869 
870  case 2: {
871  // potential energy
872  Vec3 X(pNode->GetXCurr() + pNode->GetRCurr()*Xgc);
873  Vec3 GravityAcceleration;
874  if (GravityOwner::bGetGravity(X, GravityAcceleration)) {
875  return -X.Dot(GravityAcceleration)*dMass;
876  }
877  break;
878  }
879 
880  case 3:
881  return dMass;
882  }
883 
884  return 0.;
885 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
virtual bool bGetGravity(const Vec3 &X, Vec3 &Acc) const
Definition: gravity.cc:208
Mat3x3 J0
Definition: body.h:277
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
const StructNode * pNode
Definition: body.h:273
Vec3 Xgc
Definition: body.h:275

Here is the call graph for this function:

virtual void Body::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Definition at line 342 of file body.h.

References pNode.

342  {
343  connectedNodes.resize(1);
344  connectedNodes[0] = pNode;
345  };
const StructNode * pNode
Definition: body.h:273
virtual Elem::Type Body::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 322 of file body.h.

References Elem::BODY.

322  {
323  return Elem::BODY;
324  };
Mat3x3 Body::GetJ ( void  ) const

Definition at line 811 of file body.cc.

References GetJ_int().

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

812 {
813  return GetJ_int();
814 }
Mat3x3 GetJ_int(void) const
Definition: body.cc:760

Here is the call graph for this function:

Mat3x3 Body::GetJ_int ( void  ) const
protectedvirtual

Reimplemented from ElemGravityOwner.

Definition at line 760 of file body.cc.

References dMass, StructNode::GetRCurr(), StructDispNode::GetXCurr(), J0, MatCrossCross, Mat3x3::MulMT(), pNode, and S0.

Referenced by GetJ().

761 {
762  Vec3 s = pNode->GetRCurr()*S0;
763  const Vec3& x = pNode->GetXCurr();
764 
765  return pNode->GetRCurr()*J0.MulMT(pNode->GetRCurr())
766  - Mat3x3(MatCrossCross, x, x*dMass)
767  - Mat3x3(MatCrossCross, s, x)
768  - Mat3x3(MatCrossCross, x, s);
769 }
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 J0
Definition: body.h:277
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
Vec3 S0
Definition: body.h:276
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

Vec3 Body::GetS ( void  ) const

Definition at line 804 of file body.cc.

References GetS_int().

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

805 {
806  return GetS_int();
807 }
Vec3 GetS_int(void) const
Definition: body.cc:752

Here is the call graph for this function:

Vec3 Body::GetS_int ( void  ) const
protectedvirtual

Reimplemented from ElemGravityOwner.

Definition at line 752 of file body.cc.

References dMass, StructNode::GetRCurr(), StructDispNode::GetXCurr(), pNode, and S0.

Referenced by GetS().

753 {
754  return pNode->GetXCurr()*dMass + pNode->GetRCurr()*S0;
755 }
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal dMass
Definition: body.h:274
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Vec3 S0
Definition: body.h:276
const StructNode * pNode
Definition: body.h:273

Here is the call graph for this function:

virtual unsigned int Body::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 327 of file body.h.

327  {
328  return 0;
329  };
unsigned int Body::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Definition at line 825 of file body.cc.

826 {
827  return 3;
828 }
unsigned int Body::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Definition at line 831 of file body.cc.

832 {
833  if (s[1] == '\0') {
834  switch (s[0]) {
835  case 'E':
836  // kinetic energy
837  return 1;
838 
839  case 'V':
840  // potential energy
841  return 2;
842 
843  case 'm':
844  return 3;
845  }
846  }
847 
848  return 0;
849 }
const StructNode * Body::pGetNode ( void  ) const

Definition at line 818 of file body.cc.

References pNode.

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

819 {
820  return pNode;
821 }
const StructNode * pNode
Definition: body.h:273
std::ostream & Body::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Definition at line 774 of file body.cc.

References dMass, WithLabel::GetLabel(), J0, MatCrossCross, pNode, S0, Write(), Vec3::Write(), and Xgc.

775 {
776  out << " body: " << GetLabel() << ", "
777  << pNode->GetLabel() << ", " << dMass << ", "
778  << "reference, node, ", Xgc.Write(out, ", ") << ", "
779  << "reference, node, ", (J0 + Mat3x3(MatCrossCross, S0, Xgc)).Write(out, ", ")
780  << ";" << std::endl;
781 
782  return out;
783 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
Mat3x3 J0
Definition: body.h:277
doublereal dMass
Definition: body.h:274
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
Vec3 S0
Definition: body.h:276
const StructNode * pNode
Definition: body.h:273
unsigned int GetLabel(void) const
Definition: withlab.cc:62
Vec3 Xgc
Definition: body.h:275

Here is the call graph for this function:

Member Data Documentation

Vec3 Body::Xgc
protected

Definition at line 275 of file body.h.

Referenced by StaticBody::AssRes(), dGetPrivData(), and Restart().


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