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

#include <strforce_impl.h>

Inheritance diagram for AbsoluteCouple:
Collaboration diagram for AbsoluteCouple:

Public Member Functions

 AbsoluteCouple (unsigned int uL, const StructNode *pN, const TplDriveCaller< Vec3 > *pDC, flag fOut)
 
 ~AbsoluteCouple (void)
 
virtual Force::Type GetForceType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &, const VectorHandler &, const VectorHandler &, InverseDynamics::Order iOrder)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
- 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 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 void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
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 unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from StructuralForce
 StructuralForce (unsigned int uL, const StructNode *pN, const TplDriveCaller< Vec3 > *pDC, flag fOut)
 
virtual ~StructuralForce (void)
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- Public Member Functions inherited from Force
 Force (unsigned int uL, flag fOut)
 
virtual ~Force (void)
 
virtual Elem::Type GetElemType (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal, const VectorHandler &, const VectorHandler &)
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &)
 
- 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)
 

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 }
 
- Public Types inherited from StructuralForce
enum  { OUTPUT_REL = ToBeOutput::OUTPUT_PRIVATE }
 
- Public Types inherited from Force
enum  Type {
  UNKNOWN = -1, ABSTRACTFORCE = 0, ABSTRACTINTERNALFORCE, ABSOLUTEDISPFORCE,
  ABSOLUTEINTERNALDISPFORCE, ABSOLUTEFORCE, FOLLOWERFORCE, ABSOLUTECOUPLE,
  FOLLOWERCOUPLE, ABSOLUTEINTERNALFORCE, FOLLOWERINTERNALFORCE, ABSOLUTEINTERNALCOUPLE,
  FOLLOWERINTERNALCOUPLE, TOTALFORCE, TOTALINTERNALFORCE, EXTERNALSTRUCTURAL,
  MODALFORCE, EXTERNALMODAL, LASTFORCETYPE
}
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from StructuralForce
TplDriveOwner< Vec3f
 
const StructNodepNode
 

Detailed Description

Definition at line 347 of file strforce_impl.h.

Constructor & Destructor Documentation

AbsoluteCouple::AbsoluteCouple ( unsigned int  uL,
const StructNode pN,
const TplDriveCaller< Vec3 > *  pDC,
flag  fOut 
)

Definition at line 1023 of file strforce.cc.

References NO_OP.

1026 : Elem(uL, fOut),
1027 StructuralForce(uL, pN, pDC, fOut)
1028 {
1029  NO_OP;
1030 }
#define NO_OP
Definition: myassert.h:74
StructuralForce(unsigned int uL, const StructNode *pN, const TplDriveCaller< Vec3 > *pDC, flag fOut)
Definition: strforce.cc:398
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
AbsoluteCouple::~AbsoluteCouple ( void  )

Definition at line 1033 of file strforce.cc.

References NO_OP.

1034 {
1035  NO_OP;
1036 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 1069 of file strforce.cc.

References VectorHandler::Add(), DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructDispNode::iGetFirstMomentumIndex(), StructuralForce::pNode, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and WorkSpaceDim().

1073 {
1074  DEBUGCOUT("Entering AbsoluteCouple::AssRes()" << std::endl);
1075 
1076  integer iNumRows;
1077  integer iNumCols;
1078  WorkSpaceDim(&iNumRows, &iNumCols);
1079  WorkVec.ResizeReset(iNumRows);
1080 
1081  /* Indici delle incognite del nodo */
1082  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex()+3;
1083  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
1084  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex+iCnt);
1085  }
1086 
1087  WorkVec.Add(1, f.Get());
1088 
1089  return WorkVec;
1090 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
TplDriveOwner< Vec3 > f
const StructNode * pNode
virtual integer iGetFirstMomentumIndex(void) const =0
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1040
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

SubVectorHandler & AbsoluteCouple::AssRes ( SubVectorHandler WorkVec,
const VectorHandler ,
const VectorHandler ,
const VectorHandler ,
InverseDynamics::Order  iOrder 
)
virtual

Reimplemented from Elem.

Definition at line 1094 of file strforce.cc.

References VectorHandler::Add(), DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructDispNode::iGetFirstPositionIndex(), StructuralForce::pNode, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and WorkSpaceDim().

1099 {
1100  DEBUGCOUT("Entering AbsoluteCouple::AssRes()" << std::endl);
1101 
1102  integer iNumRows;
1103  integer iNumCols;
1104  WorkSpaceDim(&iNumRows, &iNumCols);
1105  WorkVec.ResizeReset(iNumRows);
1106 
1107  /* Indici delle incognite del nodo */
1108  integer iFirstMomentumIndex = pNode->iGetFirstPositionIndex()+3;
1109  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
1110  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex+iCnt);
1111  }
1112 
1113  WorkVec.Add(1, f.Get());
1114 
1115  return WorkVec;
1116 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
TplDriveOwner< Vec3 > f
const StructNode * pNode
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1040
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

virtual Force::Type AbsoluteCouple::GetForceType ( void  ) const
inlinevirtual

Implements Force.

Definition at line 357 of file strforce_impl.h.

References Force::ABSOLUTECOUPLE.

357  {
358  return Force::ABSOLUTECOUPLE;
359  };
SubVectorHandler & AbsoluteCouple::InitialAssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1165 of file strforce.cc.

References VectorHandler::Add(), DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructDispNode::iGetFirstPositionIndex(), StructuralForce::pNode, SubVectorHandler::PutRowIndex(), and VectorHandler::Resize().

1167 {
1168  DEBUGCOUT("Entering AbsoluteCouple::InitialAssRes()" << std::endl);
1169 
1170  WorkVec.Resize(3);
1171 
1172  /* Indici delle incognite del nodo */
1173  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex() + 3;
1174  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
1175  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
1176  }
1177 
1178  WorkVec.Add(1, f.Get());
1179 
1180  return WorkVec;
1181 }
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
TplDriveOwner< Vec3 > f
const StructNode * pNode
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
long int integer
Definition: colamd.c:51
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

void AbsoluteCouple::InitialWorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements SubjectToInitialAssembly.

Definition at line 1048 of file strforce.cc.

1051 {
1052  *piNumRows = 3;
1053  *piNumCols = 1;
1054 }
void AbsoluteCouple::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 1141 of file strforce.cc.

References ToBeOutput::bToBeOutput(), StructuralForce::f, OutputHandler::FORCES, OutputHandler::Forces(), TplDriveOwner< T >::Get(), OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), Vec3::pGetVec(), StructuralForce::pNode, OutputHandler::UseNetCDF(), and OutputHandler::UseText().

1142 {
1143  if (bToBeOutput()) {
1144 #ifdef USE_NETCDF
1145  if (OH.UseNetCDF(OutputHandler::FORCES)) {
1146  Var_F->put_rec(f.Get().pGetVec(), OH.GetCurrentStep());
1147  }
1148 #endif // USE_NETCDF
1149 
1150  if (OH.UseText(OutputHandler::FORCES)) {
1151  OH.Forces()
1152  << GetLabel()
1153  << " " << pNode->GetLabel()
1154  << " " << f.Get()
1155  << std::endl;
1156  }
1157 
1158  /* TODO: NetCDF */
1159  }
1160 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
bool UseNetCDF(int out) const
Definition: output.cc:491
long GetCurrentStep(void) const
Definition: output.h:116
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
TplDriveOwner< Vec3 > f
const StructNode * pNode
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
unsigned int GetLabel(void) const
Definition: withlab.cc:62
std::ostream & Forces(void) const
Definition: output.h:450
bool UseText(int out) const
Definition: output.cc:446

Here is the call graph for this function:

void AbsoluteCouple::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Definition at line 1119 of file strforce.cc.

References ASSERT, ToBeOutput::bToBeOutput(), OutputHandler::FORCES, WithLabel::GetLabel(), OutputHandler::IsOpen(), OutputHandler::NETCDF, and OutputHandler::UseNetCDF().

1120 {
1121  if (bToBeOutput()) {
1122 #ifdef USE_NETCDF
1123  if (OH.UseNetCDF(OutputHandler::FORCES)) {
1125 
1126  std::ostringstream os;
1127  os << "elem.couple." << GetLabel();
1128  (void)OH.CreateVar(os.str(), "absolute");
1129 
1130  // joint sub-data
1131  os << '.';
1132  Var_F = OH.CreateVar<Vec3>(os.str() + "M", "Nm",
1133  "global couple components (x, y, z)");
1134  }
1135 #endif // USE_NETCDF
1136  }
1137 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
bool UseNetCDF(int out) const
Definition: output.cc:491
bool IsOpen(int out) const
Definition: output.cc:395
#define ASSERT(expression)
Definition: colamd.c:977
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

std::ostream & AbsoluteCouple::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Definition at line 1059 of file strforce.cc.

References StructuralForce::f, WithLabel::GetLabel(), TplDriveOwner< T >::pGetDriveCaller(), StructuralForce::pNode, and TplDriveCaller< T >::Restart().

1060 {
1061  out << " couple: " << GetLabel() << ", absolute, "
1062  << pNode->GetLabel() << ", ";
1063  return f.pGetDriveCaller()->Restart(out) << ';' << std::endl;
1064 }
TplDriveCaller< T > * pGetDriveCaller(void) const
Definition: tpldrive.h:105
TplDriveOwner< Vec3 > f
const StructNode * pNode
virtual std::ostream & Restart(std::ostream &out) const =0
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1040 of file strforce.cc.

Referenced by AssRes().

1041 {
1042  *piNumRows = 3;
1043  *piNumCols = 1;
1044 }

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