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

#include <strforce_impl.h>

Inheritance diagram for FollowerForce:
Collaboration diagram for FollowerForce:

Public Member Functions

 FollowerForce (unsigned int uL, const StructNode *pN, const TplDriveCaller< Vec3 > *pDC, const Vec3 &TmpArm, flag fOut)
 
 ~FollowerForce (void)
 
virtual Force::Type GetForceType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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 VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
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 unsigned int iGetInitialNumDof (void) 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 Attributes

const Vec3 Arm
 
- 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
 

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
}
 

Detailed Description

Definition at line 278 of file strforce_impl.h.

Constructor & Destructor Documentation

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

Definition at line 709 of file strforce.cc.

References NO_OP.

713 : Elem(uL, fOut),
714 StructuralForce(uL, pN, pDC, fOut),
715 Arm(TmpArm)
716 #ifdef USE_NETCDF
717 ,
718 Var_A(0)
719 #endif // USE_NETCDF
720 {
721  NO_OP;
722 }
#define NO_OP
Definition: myassert.h:74
const Vec3 Arm
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
FollowerForce::~FollowerForce ( void  )

Definition at line 725 of file strforce.cc.

References NO_OP.

726 {
727  NO_OP;
728 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 762 of file strforce.cc.

References FullSubMatrixHandler::Add(), Arm, Vec3::Cross(), DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructNode::GetRRef(), StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), MatCross, StructuralForce::pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), R, FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), and WorkSpaceDim().

766 {
767  DEBUGCOUT("Entering FollowerForce::AssJac()" << std::endl);
768 
769  FullSubMatrixHandler& WM = WorkMat.SetFull();
770 
771  /* Dimensiona e resetta la matrice di lavoro */
772  integer iNumRows = 0;
773  integer iNumCols = 0;
774  WorkSpaceDim(&iNumRows, &iNumCols);
775  WM.ResizeReset(iNumRows, iNumCols);
776 
777  integer iFirstRotationIndex = pNode->iGetFirstPositionIndex() + 3;
778  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
779  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
780  WM.PutRowIndex(iCnt, iFirstMomentumIndex + iCnt); /* forza */
781  WM.PutRowIndex(3 + iCnt, iFirstMomentumIndex + 3 + iCnt); /* coppia */
782  WM.PutColIndex(iCnt, iFirstRotationIndex + iCnt); /* rotazione */
783  }
784 
785  /* Dati */
786  const Mat3x3& R(pNode->GetRRef());
787  Vec3 TmpDir(R*(f.Get()*dCoef));
788  Vec3 TmpArm(R*Arm);
789 
790  /* | F/\ | | F |
791  * | | Delta_g = | |
792  * | (d/\F)/\ | | d/\F |
793  */
794 
795  WM.Add(1, 1, Mat3x3(MatCross, TmpDir));
796  WM.Add(4, 1, Mat3x3(MatCross, TmpArm.Cross(TmpDir)));
797 
798  return WorkMat;
799 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:732
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
const Vec3 Arm
#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
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Implements Elem.

Definition at line 804 of file strforce.cc.

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

808 {
809  DEBUGCOUT("Entering FollowerForce::AssRes()" << std::endl);
810 
811  integer iNumRows;
812  integer iNumCols;
813  WorkSpaceDim(&iNumRows, &iNumCols);
814  WorkVec.ResizeReset(iNumRows);
815 
816  /* Indici delle incognite del nodo */
817  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
818  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
819  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex + iCnt);
820  }
821 
822  /* Dati */
823  const Mat3x3& R(pNode->GetRCurr());
824  Vec3 TmpDir = f.Get();
825  Vec3 F(R*TmpDir);
826  Vec3 M(R*Arm.Cross(TmpDir));
827 
828  WorkVec.Add(1, F);
829  WorkVec.Add(4, M);
830 
831  return WorkVec;
832 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:732
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const Vec3 Arm
#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
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 837 of file strforce.cc.

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

842 {
843  DEBUGCOUT("Entering FollowerForce::AssRes()" << std::endl);
844 
845  integer iNumRows;
846  integer iNumCols;
847  WorkSpaceDim(&iNumRows, &iNumCols);
848  WorkVec.ResizeReset(iNumRows);
849 
850  /* Indici delle incognite del nodo */
851  integer iFirstMomentumIndex = pNode->iGetFirstPositionIndex();
852  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
853  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex+iCnt);
854  }
855 
856  /* Dati */
857  const Mat3x3& R(pNode->GetRCurr());
858  Vec3 TmpDir = f.Get();
859  Vec3 F(R*TmpDir);
860  Vec3 M(R*Arm.Cross(TmpDir));
861 
862  WorkVec.Add(1, F);
863  WorkVec.Add(4, M);
864 
865  return WorkVec;
866 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:732
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const Vec3 Arm
#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
Mat3x3 R

Here is the call graph for this function:

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

Implements Force.

Definition at line 296 of file strforce_impl.h.

References Force::FOLLOWERFORCE.

296  {
297  return Force::FOLLOWERFORCE;
298  };
VariableSubMatrixHandler & FollowerForce::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from Force.

Definition at line 938 of file strforce.cc.

References FullSubMatrixHandler::Add(), Arm, DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructNode::GetRRef(), StructNode::GetWRef(), StructDispNode::iGetFirstPositionIndex(), MatCross, MatCrossCross, StructuralForce::pNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), R, FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

940 {
941  DEBUGCOUT("Entering FollowerForce::InitialAssJac()" << std::endl);
942 
943  FullSubMatrixHandler& WM = WorkMat.SetFull();
944 
945  /* Dimensiona e resetta la matrice di lavoro */
946  WM.ResizeReset(12, 6);
947 
948  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
949  integer iFirstVelocityIndex = iFirstPositionIndex + 6;
950  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
951  WM.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
952  WM.PutRowIndex(3 + iCnt, iFirstPositionIndex + 3 + iCnt);
953  WM.PutRowIndex(6 + iCnt, iFirstVelocityIndex + iCnt);
954  WM.PutRowIndex(9 + iCnt, iFirstVelocityIndex + 3 + iCnt);
955  WM.PutColIndex(iCnt, iFirstPositionIndex + 3 + iCnt);
956  WM.PutColIndex(3 + iCnt, iFirstVelocityIndex + 3 + iCnt);
957  }
958 
959  /* Dati */
960  const Mat3x3& R(pNode->GetRRef());
961  Vec3 TmpArm(R*Arm);
962  Vec3 TmpDir = R*f.Get();
963  const Vec3& Omega(pNode->GetWRef());
964 
965  /* | F/\ | | F |
966  * | | Delta_g = | |
967  * | (d/\F)/\ | | d/\F |
968  */
969 
970  WM.Add(1, 1, Mat3x3(MatCross, TmpDir));
971  WM.Add(4, 1, Mat3x3(MatCross, TmpArm.Cross(TmpDir)));
972  WM.Add(7, 1, Mat3x3(MatCrossCross, Omega, TmpDir));
973  WM.Add(7, 4, Mat3x3(MatCross, TmpDir));
974  WM.Add(10, 1, Mat3x3(MatCrossCross, Omega, TmpArm.Cross(TmpDir)));
975  WM.Add(10, 4, Mat3x3(MatCross, TmpArm.Cross(TmpDir)));
976 
977  return WorkMat;
978 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
const Vec3 Arm
#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 ResizeReset(integer, integer)
Definition: submat.cc:182
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 983 of file strforce.cc.

References VectorHandler::Add(), Arm, grad::Cross(), DEBUGCOUT, StructuralForce::f, TplDriveOwner< T >::Get(), StructNode::GetRCurr(), StructNode::GetWCurr(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), StructuralForce::pNode, SubVectorHandler::PutRowIndex(), R, and VectorHandler::ResizeReset().

985 {
986  DEBUGCOUT("Entering FollowerForce::InitialAssRes()" << std::endl);
987 
988  integer iNumRows;
989  integer iNumCols;
990  InitialWorkSpaceDim(&iNumRows, &iNumCols);
991  WorkVec.ResizeReset(iNumRows);
992 
993  /* Indici delle incognite del nodo */
994  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
995  integer iFirstVelocityIndex = iFirstPositionIndex + 6;
996  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
997  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
998  WorkVec.PutRowIndex(6 + iCnt, iFirstVelocityIndex + iCnt);
999  }
1000 
1001  /* Dati */
1002  const Mat3x3& R(pNode->GetRCurr());
1003  Vec3 TmpDir(R*f.Get());
1004  Vec3 TmpArm(R*Arm);
1005  const Vec3& Omega(pNode->GetWCurr());
1006 
1007  WorkVec.Add(1, TmpDir);
1008  WorkVec.Add(4, TmpArm.Cross(TmpDir));
1009  WorkVec.Add(7, Omega.Cross(TmpDir));
1010  WorkVec.Add(10, (Omega.Cross(TmpArm)).Cross(TmpDir)
1011  + TmpArm.Cross(Omega.Cross(TmpDir)));
1012 
1013  return WorkVec;
1014 }
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:740
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const Vec3 Arm
#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 const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 740 of file strforce.cc.

Referenced by InitialAssRes().

743 {
744  *piNumRows = 12;
745  *piNumCols = 6;
746 }
void FollowerForce::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 900 of file strforce.cc.

References Arm, ToBeOutput::bToBeOutput(), StructuralForce::f, OutputHandler::FORCES, OutputHandler::Forces(), ToBeOutput::fToBeOutput(), TplDriveOwner< T >::Get(), OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), StructuralForce::OUTPUT_REL, StructuralForce::pNode, OutputHandler::UseNetCDF(), and OutputHandler::UseText().

901 {
902  if (bToBeOutput()) {
903 #ifdef USE_NETCDF
905  if (fToBeOutput() & OUTPUT_REL) {
906  Var_F->put_rec((f.Get()).pGetVec(), OH.GetCurrentStep());
907  } else {
908  Var_F->put_rec((pNode->GetRCurr()*f.Get()).pGetVec(), OH.GetCurrentStep());
909  }
910  Var_A->put_rec((pNode->GetXCurr() + pNode->GetRCurr()*Arm).pGetVec(), OH.GetCurrentStep());
911  }
912 #endif // USE_NETCDF
913 
914  if (OH.UseText(OutputHandler::FORCES)) {
915  OH.Forces()
916  << GetLabel()
917  << " " << pNode->GetLabel();
918 
919  if (fToBeOutput() & OUTPUT_REL) {
920  OH.Forces()
921  << " " << f.Get();
922 
923  } else {
924  OH.Forces()
925  << " " << pNode->GetRCurr()*f.Get();
926  }
927 
928  OH.Forces()
929  << " " << pNode->GetXCurr() + pNode->GetRCurr()*Arm
930  << std::endl;
931  }
932  }
933 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
bool UseNetCDF(int out) const
Definition: output.cc:491
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Vec3 Arm
long GetCurrentStep(void) const
Definition: output.h:116
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
TplDriveOwner< Vec3 > f
const StructNode * pNode
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual flag fToBeOutput(void) const
Definition: output.cc:884
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 FollowerForce::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Definition at line 869 of file strforce.cc.

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

870 {
871  if (bToBeOutput()) {
872 #ifdef USE_NETCDF
875 
876  std::ostringstream os;
877  os << "elem.force." << GetLabel();
878  (void)OH.CreateVar(os.str(), "follower");
879 
880  // joint sub-data
882  os << '.';
883  Var_F = OH.CreateVar<Vec3>(os.str() + "f", "N",
884  "local force components (x, y, z)");
885 
886  } else {
887  os << '.';
888  Var_F = OH.CreateVar<Vec3>(os.str() + "F", "N",
889  "global force components (x, y, z)");
890  }
891 
892  Var_A = OH.CreateVar<Vec3>(os.str() + "Arm", "m",
893  "arm in global frame (x, y, z)");
894  }
895 #endif // USE_NETCDF
896  }
897 }
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
virtual flag fToBeOutput(void) const
Definition: output.cc:884
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 751 of file strforce.cc.

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

752 {
753  Force::Restart(out) << ", follower, "
754  << pNode->GetLabel()
755  << ", position, reference, node, ",
756  Arm.Write(out, ", ") << ", ";
757  return f.pGetDriveCaller()->Restart(out) << ';' << std::endl;
758 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
virtual std::ostream & Restart(std::ostream &out) const
Definition: force.cc:52
const Vec3 Arm
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 FollowerForce::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 732 of file strforce.cc.

Referenced by AssJac(), and AssRes().

733 {
734  *piNumRows = 6;
735  *piNumCols = 3;
736 }

Member Data Documentation

const Vec3 FollowerForce::Arm
protected

Definition at line 280 of file strforce_impl.h.

Referenced by AssJac(), AssRes(), InitialAssJac(), InitialAssRes(), Output(), and Restart().


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