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

#include <strforce_impl.h>

Inheritance diagram for FollowerInternalForce:
Collaboration diagram for FollowerInternalForce:

Public Member Functions

 FollowerInternalForce (unsigned int uL, const StructNode *pN1, const StructNode *pN2, const TplDriveCaller< Vec3 > *pDC, const Vec3 &TmpArm1, const Vec3 &TmpArm2, flag fOut)
 
 ~FollowerInternalForce (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 StructuralInternalForce
 StructuralInternalForce (unsigned int uL, const StructNode *pN1, const StructNode *pN2, const TplDriveCaller< Vec3 > *pDC, flag fOut)
 
virtual ~StructuralInternalForce (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 Arm1
 
const Vec3 Arm2
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from StructuralInternalForce
TplDriveOwner< Vec3f
 
const StructNodepNode1
 
const StructNodepNode2
 

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 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 564 of file strforce_impl.h.

Constructor & Destructor Documentation

FollowerInternalForce::FollowerInternalForce ( unsigned int  uL,
const StructNode pN1,
const StructNode pN2,
const TplDriveCaller< Vec3 > *  pDC,
const Vec3 TmpArm1,
const Vec3 TmpArm2,
flag  fOut 
)

Definition at line 1843 of file strforce.cc.

References NO_OP.

1848 : Elem(uL, fOut),
1849 StructuralInternalForce(uL, pN1, pN2, pDC, fOut),
1850 Arm1(TmpArm1), Arm2(TmpArm2)
1851 #ifdef USE_NETCDF
1852 ,
1853 Var_A1(0),
1854 Var_A2(0)
1855 #endif // USE_NETCDF
1856 {
1857  NO_OP;
1858 }
#define NO_OP
Definition: myassert.h:74
StructuralInternalForce(unsigned int uL, const StructNode *pN1, const StructNode *pN2, const TplDriveCaller< Vec3 > *pDC, flag fOut)
Definition: strforce.cc:1457
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
FollowerInternalForce::~FollowerInternalForce ( void  )

Definition at line 1861 of file strforce.cc.

References NO_OP.

1862 {
1863  NO_OP;
1864 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 1903 of file strforce.cc.

References FullSubMatrixHandler::Add(), Arm1, Arm2, DEBUGCOUT, StructuralInternalForce::f, TplDriveOwner< T >::Get(), StructNode::GetRRef(), StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), MatCross, MatCrossCross, StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), FullSubMatrixHandler::Sub(), and WorkSpaceDim().

1907 {
1908  DEBUGCOUT("Entering FollowerInternalForce::AssJac()" << std::endl);
1909 
1910  FullSubMatrixHandler& WM = WorkMat.SetFull();
1911 
1912  /* Dimensiona e resetta la matrice di lavoro */
1913  integer iNumRows = 0;
1914  integer iNumCols = 0;
1915  WorkSpaceDim(&iNumRows, &iNumCols);
1916  WM.ResizeReset(iNumRows, iNumCols);
1917 
1918  integer iFirstRotationIndex1 = pNode1->iGetFirstPositionIndex() + 3;
1919  integer iFirstMomentumIndex1 = pNode1->iGetFirstMomentumIndex();
1920  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
1921  WM.PutRowIndex(iCnt, iFirstMomentumIndex1 + iCnt); /* forza */
1922  WM.PutRowIndex(3 + iCnt, iFirstMomentumIndex1 + 3 + iCnt); /* coppia */
1923  WM.PutColIndex(iCnt, iFirstRotationIndex1 + iCnt); /* rotazione */
1924 
1925  WM.PutRowIndex(6 + iCnt, iFirstMomentumIndex1 + iCnt); /* forza */
1926  WM.PutRowIndex(9 + iCnt, iFirstMomentumIndex1 + 3 + iCnt); /* coppia */
1927  WM.PutColIndex(3 + iCnt, iFirstRotationIndex1 + iCnt); /* rotazione */
1928  }
1929 
1930  /* Dati */
1931  Vec3 TmpDir(pNode1->GetRRef()*(f.Get()*dCoef));
1932  Vec3 TmpArm1(pNode1->GetRRef()*Arm1);
1933  Vec3 TmpArm2(pNode2->GetRRef()*Arm2);
1934 
1935  /* | F/\ 0 | | F |
1936  * | | Delta_g_1 = | |
1937  * | (d1/\F)/\ 0 | | d1/\F |
1938  * | | Delta_g_2 = | |
1939  * | -F/\d2/\ d2/\F/\ | | d2/\F |
1940  */
1941 
1942  WM.Add(1, 1, Mat3x3(MatCross, TmpDir));
1943  WM.Add(4, 1, Mat3x3(MatCross, TmpArm1.Cross(TmpDir)));
1944  WM.Sub(7, 1, Mat3x3(MatCross, TmpDir));
1945  WM.Sub(7, 1, Mat3x3(MatCrossCross, TmpArm2, TmpDir));
1946  WM.Add(7, 4, Mat3x3(MatCrossCross, TmpDir, TmpArm2));
1947 
1948  return WorkMat;
1949 }
TplDriveOwner< Vec3 > f
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
const StructNode * pNode1
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
virtual integer iGetFirstMomentumIndex(void) const =0
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
const StructNode * pNode2
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1868
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1954 of file strforce.cc.

References VectorHandler::Add(), Arm1, Arm2, Vec3::Cross(), DEBUGCOUT, StructuralInternalForce::f, TplDriveOwner< T >::Get(), StructNode::GetRCurr(), StructDispNode::iGetFirstMomentumIndex(), StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), VectorHandler::Sub(), and WorkSpaceDim().

1958 {
1959  DEBUGCOUT("Entering FollowerInternalForce::AssRes()" << std::endl);
1960 
1961  integer iNumRows;
1962  integer iNumCols;
1963  WorkSpaceDim(&iNumRows, &iNumCols);
1964  WorkVec.ResizeReset(iNumRows);
1965 
1966  /* Indici delle incognite del nodo */
1967  integer iFirstMomentumIndex1 = pNode1->iGetFirstMomentumIndex();
1968  integer iFirstMomentumIndex2 = pNode2->iGetFirstMomentumIndex();
1969  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
1970  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex1 + iCnt);
1971  WorkVec.PutRowIndex(6 + iCnt, iFirstMomentumIndex2 + iCnt);
1972  }
1973 
1974  /* Dati */
1975  Vec3 TmpDir(f.Get());
1976  Vec3 F(pNode1->GetRCurr()*TmpDir);
1977  Vec3 M1(pNode1->GetRCurr()*Arm1.Cross(TmpDir));
1978  Vec3 M2(F.Cross(pNode2->GetRCurr()*Arm2));
1979 
1980  WorkVec.Add(1, F);
1981  WorkVec.Add(4, M1);
1982  WorkVec.Sub(7, F);
1983  WorkVec.Add(10, M2);
1984 
1985  return WorkVec;
1986 }
TplDriveOwner< Vec3 > f
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
const StructNode * pNode1
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
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
virtual integer iGetFirstMomentumIndex(void) const =0
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
const StructNode * pNode2
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1868
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 1990 of file strforce.cc.

References VectorHandler::Add(), Arm1, Arm2, Vec3::Cross(), DEBUGCOUT, StructuralInternalForce::f, TplDriveOwner< T >::Get(), StructNode::GetRCurr(), StructDispNode::iGetFirstPositionIndex(), StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), VectorHandler::Sub(), and WorkSpaceDim().

1995 {
1996  DEBUGCOUT("Entering FollowerInternalForce::AssRes()" << std::endl);
1997 
1998  integer iNumRows;
1999  integer iNumCols;
2000  WorkSpaceDim(&iNumRows, &iNumCols);
2001  WorkVec.ResizeReset(iNumRows);
2002 
2003  /* Indici delle incognite del nodo */
2004  integer iFirstMomentumIndex1 = pNode1->iGetFirstPositionIndex();
2005  integer iFirstMomentumIndex2 = pNode2->iGetFirstPositionIndex();
2006  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
2007  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex1 + iCnt);
2008  WorkVec.PutRowIndex(6+iCnt, iFirstMomentumIndex2 + iCnt);
2009  }
2010 
2011  /* Dati */
2012  Vec3 TmpDir(f.Get());
2013  Vec3 F(pNode1->GetRCurr()*TmpDir);
2014  Vec3 M1(pNode1->GetRCurr()*Arm1.Cross(TmpDir));
2015  Vec3 M2(F.Cross(pNode2->GetRCurr()*Arm2));
2016 
2017  WorkVec.Add(1, F);
2018  WorkVec.Add(4, M1);
2019  WorkVec.Sub(7, F);
2020  WorkVec.Add(10, M2);
2021 
2022  return WorkVec;
2023 }
TplDriveOwner< Vec3 > f
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
const StructNode * pNode1
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
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
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
const StructNode * pNode2
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1868
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Force.

Definition at line 586 of file strforce_impl.h.

References Force::FOLLOWERINTERNALFORCE.

586  {
588  };
VariableSubMatrixHandler & FollowerInternalForce::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from Force.

Definition at line 2099 of file strforce.cc.

References FullSubMatrixHandler::Add(), Arm1, Arm2, DEBUGCOUT, StructuralInternalForce::f, TplDriveOwner< T >::Get(), StructNode::GetRRef(), StructNode::GetWRef(), StructDispNode::iGetFirstPositionIndex(), MatCross, MatCrossCross, StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), FullSubMatrixHandler::Sub(), and WorkSpaceDim().

2101 {
2102  DEBUGCOUT("Entering FollowerInternalForce::InitialAssJac()" << std::endl);
2103 
2104  FullSubMatrixHandler& WM = WorkMat.SetFull();
2105 
2106  integer iNumRows;
2107  integer iNumCols;
2108  WorkSpaceDim(&iNumRows, &iNumCols);
2109 
2110  /* Dimensiona e resetta la matrice di lavoro */
2111  WM.ResizeReset(iNumRows, iNumCols);
2112 
2113  integer iFirstPositionIndex1 = pNode1->iGetFirstPositionIndex();
2114  integer iFirstVelocityIndex1 = iFirstPositionIndex1 + 6;
2115 
2116  integer iFirstPositionIndex2 = pNode2->iGetFirstPositionIndex();
2117  integer iFirstVelocityIndex2 = iFirstPositionIndex2 + 6;
2118 
2119  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
2120  WM.PutRowIndex(iCnt, iFirstPositionIndex1 + iCnt);
2121  WM.PutRowIndex(3 + iCnt, iFirstPositionIndex1 + 3 + iCnt);
2122  WM.PutRowIndex(6 + iCnt, iFirstVelocityIndex1 + iCnt);
2123  WM.PutRowIndex(9 + iCnt, iFirstVelocityIndex1 + 3 + iCnt);
2124 
2125  WM.PutColIndex(iCnt, iFirstPositionIndex1 +3+iCnt);
2126  WM.PutColIndex(3 + iCnt, iFirstVelocityIndex1 + 3 + iCnt);
2127 
2128  WM.PutRowIndex(12 + iCnt, iFirstPositionIndex2 + iCnt);
2129  WM.PutRowIndex(15 + iCnt, iFirstPositionIndex2 + 3 + iCnt);
2130  WM.PutRowIndex(18 + iCnt, iFirstVelocityIndex2 + iCnt);
2131  WM.PutRowIndex(21 + iCnt, iFirstVelocityIndex2 + 3 + iCnt);
2132 
2133  WM.PutColIndex(12 + iCnt, iFirstPositionIndex2 + 3 + iCnt);
2134  WM.PutColIndex(15 + iCnt, iFirstVelocityIndex2 + 3 + iCnt);
2135  }
2136 
2137  /* Dati */
2138  Vec3 TmpArm1(pNode1->GetRRef()*Arm1);
2139  Vec3 TmpArm2(pNode2->GetRRef()*Arm2);
2140  Vec3 TmpDir = pNode1->GetRRef()*f.Get();
2141  const Vec3& Omega1(pNode1->GetWRef());
2142  const Vec3& Omega2(pNode2->GetWRef());
2143 
2144  WM.Add(1, 1, Mat3x3(MatCross, TmpDir));
2145  WM.Add(4, 1, Mat3x3(MatCross, TmpArm1.Cross(TmpDir)));
2146 
2147  WM.Add(7, 1, Mat3x3(MatCrossCross, Omega1, TmpDir));
2148  WM.Add(7, 4, Mat3x3(MatCross, TmpDir));
2149  WM.Add(10, 1, Mat3x3(MatCrossCross, Omega1, TmpArm1.Cross(TmpDir)));
2150  WM.Add(10, 4, Mat3x3(MatCross, TmpArm1.Cross(TmpDir)));
2151 
2152  WM.Sub(13, 1, Mat3x3(MatCross, TmpDir));
2153  WM.Add(16, 1, Mat3x3(MatCrossCross, TmpArm2, TmpDir));
2154  WM.Sub(16, 7, Mat3x3(MatCrossCross, TmpDir, TmpArm2));
2155 
2156  WM.Sub(19, 1, Mat3x3(MatCrossCross, Omega1, TmpDir));
2157  WM.Sub(19, 4, Mat3x3(MatCross, TmpDir));
2158 
2159  WM.Add(22, 1, Mat3x3(MatCrossCross, TmpArm2, Omega1)*Mat3x3(MatCross, TmpDir)
2160  - Mat3x3(MatCrossCross, Omega2.Cross(TmpArm2), TmpDir));
2161  WM.Add(22, 4, Mat3x3(MatCrossCross, TmpArm2, TmpDir));
2162  WM.Add(22, 7, Mat3x3(MatCrossCross, TmpDir, Omega2)*Mat3x3(MatCross, TmpArm2)
2163  - Mat3x3(MatCrossCross, Omega1.Cross(TmpDir), TmpArm2));
2164  WM.Add(22, 10, Mat3x3(MatCrossCross, TmpDir, TmpArm2));
2165 
2166  return WorkMat;
2167 }
TplDriveOwner< Vec3 > f
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
const StructNode * pNode1
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
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
const StructNode * pNode2
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1868
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 2172 of file strforce.cc.

References VectorHandler::Add(), Arm1, Arm2, grad::Cross(), DEBUGCOUT, StructuralInternalForce::f, TplDriveOwner< T >::Get(), StructNode::GetRCurr(), StructNode::GetWCurr(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and VectorHandler::Sub().

2174 {
2175  DEBUGCOUT("Entering FollowerInternalForce::InitialAssRes()" << std::endl);
2176 
2177  integer iNumRows;
2178  integer iNumCols;
2179  InitialWorkSpaceDim(&iNumRows, &iNumCols);
2180  WorkVec.ResizeReset(iNumRows);
2181 
2182  /* Indici delle incognite del nodo */
2183  integer iFirstPositionIndex1 = pNode1->iGetFirstPositionIndex();
2184  integer iFirstVelocityIndex1 = iFirstPositionIndex1 + 6;
2185 
2186  integer iFirstPositionIndex2 = pNode2->iGetFirstPositionIndex();
2187  integer iFirstVelocityIndex2 = iFirstPositionIndex2 + 6;
2188 
2189  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
2190  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex1 + iCnt);
2191  WorkVec.PutRowIndex(6 + iCnt, iFirstVelocityIndex1 + iCnt);
2192 
2193  WorkVec.PutRowIndex(12 + iCnt, iFirstPositionIndex2 + iCnt);
2194  WorkVec.PutRowIndex(18 + iCnt, iFirstVelocityIndex2 + iCnt);
2195  }
2196 
2197  /* Dati */
2198  Vec3 TmpDir(pNode1->GetRCurr()*f.Get());
2199  Vec3 TmpArm1(pNode1->GetRCurr()*Arm1);
2200  Vec3 TmpArm2(pNode2->GetRCurr()*Arm2);
2201  const Vec3& Omega1(pNode1->GetWCurr());
2202  const Vec3& Omega2(pNode2->GetWCurr());
2203 
2204  WorkVec.Add(1, TmpDir);
2205  WorkVec.Add(4, TmpArm1.Cross(TmpDir));
2206  WorkVec.Add(7, Omega1.Cross(TmpDir));
2207  WorkVec.Add(10, (Omega1.Cross(TmpArm1)).Cross(TmpDir)
2208  + TmpArm1.Cross(Omega1.Cross(TmpDir)));
2209 
2210  WorkVec.Sub(13, TmpDir);
2211  WorkVec.Sub(16, TmpArm2.Cross(TmpDir));
2212  WorkVec.Sub(19, Omega1.Cross(TmpDir));
2213  WorkVec.Sub(22, (Omega2.Cross(TmpArm2)).Cross(TmpDir)
2214  + TmpArm2.Cross(Omega1.Cross(TmpDir)));
2215 
2216  return WorkVec;
2217 }
TplDriveOwner< Vec3 > f
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode1
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: strforce.cc:1878
#define DEBUGCOUT(msg)
Definition: myassert.h:232
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
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
const StructNode * pNode2
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 1878 of file strforce.cc.

Referenced by InitialAssRes().

1881 {
1882  *piNumRows = 24;
1883  *piNumCols = 12;
1884 }
void FollowerInternalForce::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 2058 of file strforce.cc.

References Arm1, Arm2, ToBeOutput::bToBeOutput(), StructuralInternalForce::f, OutputHandler::FORCES, OutputHandler::Forces(), ToBeOutput::fToBeOutput(), TplDriveOwner< T >::Get(), OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), StructuralForce::OUTPUT_REL, Vec3::pGetVec(), StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, OutputHandler::UseNetCDF(), and OutputHandler::UseText().

2059 {
2060  if (bToBeOutput()) {
2061 #ifdef USE_NETCDF
2062  if (OH.UseNetCDF(OutputHandler::FORCES)) {
2064  Var_F->put_rec(f.Get().pGetVec(), OH.GetCurrentStep());
2065  } else {
2066  Var_F->put_rec((pNode1->GetRCurr()*f.Get()).pGetVec(), OH.GetCurrentStep());
2067  }
2068  Var_A1->put_rec((pNode1->GetXCurr() + pNode1->GetRCurr()*Arm1).pGetVec(), OH.GetCurrentStep());
2069  Var_A2->put_rec((pNode2->GetXCurr() + pNode2->GetRCurr()*Arm2).pGetVec(), OH.GetCurrentStep());
2070  }
2071 #endif // USE_NETCDF
2072 
2073  if (OH.UseText(OutputHandler::FORCES)) {
2074  Vec3 F;
2076  F = f.Get();
2077  } else {
2078  F = pNode1->GetRCurr()*f.Get();
2079  }
2080 
2081  OH.Forces()
2082  << GetLabel()
2083  << " " << pNode1->GetLabel()
2084  << " " << F
2085  << " " << pNode1->GetXCurr() + pNode1->GetRCurr()*Arm1
2086  << " " << pNode2->GetLabel()
2087  << " " << -F
2088  << " " << pNode2->GetXCurr() + pNode2->GetRCurr()*Arm2
2089  << std::endl;
2090  }
2091 
2092  /* TODO: NetCDF */
2093  }
2094 }
TplDriveOwner< Vec3 > f
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
bool UseNetCDF(int out) const
Definition: output.cc:491
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode1
long GetCurrentStep(void) const
Definition: output.h:116
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
virtual flag fToBeOutput(void) const
Definition: output.cc:884
const StructNode * pNode2
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 FollowerInternalForce::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Definition at line 2026 of file strforce.cc.

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

2027 {
2028  if (bToBeOutput()) {
2029 #ifdef USE_NETCDF
2030  if (OH.UseNetCDF(OutputHandler::FORCES)) {
2032 
2033  std::ostringstream os;
2034  os << "elem.force." << GetLabel();
2035  (void)OH.CreateVar(os.str(), "internal follower");
2036 
2037  // joint sub-data
2038  os << '.';
2040  Var_F = OH.CreateVar<Vec3>(os.str() + "f", "N",
2041  "local force components (x, y, z)");
2042  } else {
2043  Var_F = OH.CreateVar<Vec3>(os.str() + "F", "N",
2044  "global force components (x, y, z)");
2045  }
2046 
2047  Var_A1 = OH.CreateVar<Vec3>(os.str() + "Arm1", "m",
2048  "node 1 arm in global frame (x, y, z)");
2049 
2050  Var_A2 = OH.CreateVar<Vec3>(os.str() + "Arm2", "m",
2051  "node 2 arm in global frame (x, y, z)");
2052  }
2053 #endif // USE_NETCDF
2054  }
2055 }
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 & FollowerInternalForce::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Definition at line 1889 of file strforce.cc.

References Arm1, Arm2, StructuralInternalForce::f, WithLabel::GetLabel(), TplDriveOwner< T >::pGetDriveCaller(), StructuralInternalForce::pNode1, StructuralInternalForce::pNode2, TplDriveCaller< T >::Restart(), Force::Restart(), and Vec3::Write().

1890 {
1891  Force::Restart(out) << ", follower internal, "
1892  << pNode1->GetLabel()
1893  << ", position, reference, node, ",
1894  Arm1.Write(out, ", ") << ", "
1895  << pNode2->GetLabel()
1896  << ", position, reference, node, ",
1897  Arm2.Write(out, ", ") << ", ";
1898  return f.pGetDriveCaller()->Restart(out) << ';' << std::endl;
1899 }
TplDriveOwner< Vec3 > f
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
const StructNode * pNode1
virtual std::ostream & Restart(std::ostream &out) const
Definition: force.cc:52
TplDriveCaller< T > * pGetDriveCaller(void) const
Definition: tpldrive.h:105
virtual std::ostream & Restart(std::ostream &out) const =0
const StructNode * pNode2
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1868 of file strforce.cc.

Referenced by AssJac(), AssRes(), and InitialAssJac().

1871 {
1872  *piNumRows = 12;
1873  *piNumCols = 6;
1874 }

Member Data Documentation

const Vec3 FollowerInternalForce::Arm1
protected

Definition at line 567 of file strforce_impl.h.

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

const Vec3 FollowerInternalForce::Arm2
protected

Definition at line 568 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: