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

#include <genel_.h>

Inheritance diagram for GenelSpringSupport:
Collaboration diagram for GenelSpringSupport:

Public Member Functions

 GenelSpringSupport (unsigned int uLabel, const DofOwner *pDO, const ConstitutiveLaw1D *pCL, const ScalarDof &sd, doublereal X0, flag fOutput)
 
virtual ~GenelSpringSupport (void)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual Genel::Type GetGenelType (void) const
 
virtual 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 void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) 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 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 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 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, const VectorHandler &XPP)
 
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 Genel
 Genel (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~Genel (void)
 
virtual Elem::Type GetElemType (void) const
 
- Public Member Functions inherited from ElemWithDofs
 ElemWithDofs (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~ElemWithDofs (void)
 
- Public Member Functions inherited from DofOwnerOwner
 DofOwnerOwner (const DofOwner *pDO)
 
virtual ~DofOwnerOwner ()
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (void) const
 
virtual void SetInitialValue (VectorHandler &X)
 
- Public Member Functions inherited from ConstitutiveLawOwner< T, Tder >
 ConstitutiveLawOwner (const ConstitutiveLaw< T, Tder > *pCL)
 
virtual ~ConstitutiveLawOwner (void)
 
ConstitutiveLaw< T, Tder > * pGetConstLaw (void) const
 
void Update (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
const T & GetF (void) const
 
const Tder & GetFDE (void) const
 
const Tder & GetFDEPrime (void) const
 
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 i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 

Protected Attributes

ScalarDof SD
 
doublereal dVal
 
doublereal dInitVal
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from ConstitutiveLawOwner< T, Tder >
ConstitutiveLaw< T, Tder > * pConstLaw
 

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 Genel
enum  Type {
  UNKNOWN = -1, SWASHPLATE = 0, ROTORTRIM, CLAMP,
  DISTANCE, SPRING, SPRINGSUPPORT, CROSSSPRINGSUPPORT,
  SPRINGDAMPER, SPRINGDAMPERSUPPORT, CROSSSPRINGDAMPERSUPPORT, MASS,
  SCALARFILTER, STATESPACESISO, STATESPACEMIMO, LASTGENELTYPE
}
 

Detailed Description

Definition at line 215 of file genel_.h.

Constructor & Destructor Documentation

GenelSpringSupport::GenelSpringSupport ( unsigned int  uLabel,
const DofOwner pDO,
const ConstitutiveLaw1D pCL,
const ScalarDof sd,
doublereal  X0,
flag  fOutput 
)

Definition at line 517 of file genel_.cc.

References ASSERT, ScalarDof::iOrder, and SD.

521 : Elem(uLabel, fOutput),
522 Genel(uLabel, pDO, fOutput),
523 ConstitutiveLaw1DOwner(pCL), SD(sd), dVal(0.), dInitVal(X0)
524 {
525  ASSERT(SD.iOrder == 0);
526 }
doublereal dInitVal
Definition: genel_.h:220
flag fOutput
Definition: output.h:658
int iOrder
Definition: node.h:710
ScalarDof SD
Definition: genel_.h:218
ConstitutiveLawOwner< doublereal, doublereal > ConstitutiveLaw1DOwner
Definition: constltp.h:378
unsigned int uLabel
Definition: withlab.h:44
#define ASSERT(expression)
Definition: colamd.c:977
Genel(unsigned int uL, const DofOwner *pDO, flag fOut)
Definition: genel.cc:44
doublereal dVal
Definition: genel_.h:219
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
GenelSpringSupport::~GenelSpringSupport ( void  )
virtual

Definition at line 528 of file genel_.cc.

References ScalarDof::pNode, SAFEDELETE, and SD.

529 {
530  const Node2Scalar *pn2s;
531 
532  pn2s = dynamic_cast<const Node2Scalar *>(SD.pNode);
533  if (pn2s) {
534  SAFEDELETE(pn2s);
535  }
536 }
ScalarNode * pNode
Definition: node.h:708
ScalarDof SD
Definition: genel_.h:218
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

void GenelSpringSupport::AfterConvergence ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 546 of file genel_.cc.

References ConstitutiveLawOwner< T, Tder >::AfterConvergence(), and dVal.

548 {
550 }
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
doublereal dVal
Definition: genel_.h:219

Here is the call graph for this function:

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

Implements Elem.

Definition at line 569 of file genel_.cc.

References DEBUGCOUT, ConstitutiveLawOwner< T, Tder >::GetFDE(), Node::iGetFirstColIndex(), Node::iGetFirstRowIndex(), ScalarDof::pNode, FullSubMatrixHandler::PutCoef(), FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), SD, and VariableSubMatrixHandler::SetFull().

573 {
574  DEBUGCOUT("Entering GenelSpringSupport::AssJac()" << std::endl);
575 
576  FullSubMatrixHandler& WM = WorkMat.SetFull();
577  WM.ResizeReset(1, 1);
578 
579  integer iNodeRowIndex = SD.pNode->iGetFirstRowIndex() + 1;
580  integer iNodeColIndex = SD.pNode->iGetFirstColIndex() + 1;
581 
582  WM.PutRowIndex(1, iNodeRowIndex);
583  WM.PutColIndex(1, iNodeColIndex);
584 
585  WM.PutCoef(1, 1, GetFDE()*dCoef);
586 
587  return WorkMat;
588 }
ScalarNode * pNode
Definition: node.h:708
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const Tder & GetFDE(void) const
Definition: constltp.h:298
ScalarDof SD
Definition: genel_.h:218
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:672
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
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
virtual integer iGetFirstColIndex(void) const
Definition: node.cc:88

Here is the call graph for this function:

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

Implements Elem.

Definition at line 592 of file genel_.cc.

References DEBUGCOUT, ScalarNode::dGetX(), dInitVal, dVal, ConstitutiveLawOwner< T, Tder >::GetF(), Node::iGetFirstRowIndex(), ScalarDof::pNode, SubVectorHandler::PutItem(), VectorHandler::ResizeReset(), SD, and ConstitutiveLawOwner< T, Tder >::Update().

596 {
597  DEBUGCOUT("Entering GenelSpringSupport::AssRes()" << std::endl);
598 
599  WorkVec.ResizeReset(1);
600 
601  integer iNodeRowIndex = SD.pNode->iGetFirstRowIndex() + 1;
602 
603  dVal = SD.pNode->dGetX() - dInitVal;
605 
606  WorkVec.PutItem(1, iNodeRowIndex, -GetF());
607 
608  return WorkVec;
609 }
ScalarNode * pNode
Definition: node.h:708
doublereal dInitVal
Definition: genel_.h:220
virtual void ResizeReset(integer)
Definition: vh.cc:55
ScalarDof SD
Definition: genel_.h:218
virtual const doublereal & dGetX(void) const =0
virtual void PutItem(integer iSubRow, integer iRow, const doublereal &dCoef)
Definition: submat.h:1445
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
doublereal dVal
Definition: genel_.h:219
const T & GetF(void) const
Definition: constltp.h:293
long int integer
Definition: colamd.c:51
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283

Here is the call graph for this function:

doublereal GenelSpringSupport::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 640 of file genel_.cc.

References dVal, ConstitutiveLawOwner< T, Tder >::GetF(), WithLabel::GetLabel(), and MBDYN_EXCEPT_ARGS.

641 {
642  switch (i) {
643  case 1u:
644  return GetF();
645  case 2u:
646  return dVal;
647  default:
648  silent_cerr("genel(" << GetLabel() << "): private data index " << i << " out of range" << std::endl);
650  }
651 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
doublereal dVal
Definition: genel_.h:219
const T & GetF(void) const
Definition: constltp.h:293
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 615 of file genel_.cc.

References ScalarDof::pNode, and SD.

616  {
617  connectedNodes.resize(1);
618  connectedNodes[0] = SD.pNode;
619 }
ScalarNode * pNode
Definition: node.h:708
ScalarDof SD
Definition: genel_.h:218
Genel::Type GenelSpringSupport::GetGenelType ( void  ) const
virtual

Implements Genel.

Definition at line 554 of file genel_.cc.

References Genel::SPRINGSUPPORT.

555 {
556  return Genel::SPRINGSUPPORT;
557 }
unsigned int GenelSpringSupport::iGetNumPrivData ( void  ) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 621 of file genel_.cc.

622 {
623  return 2u;
624 }
unsigned int GenelSpringSupport::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 626 of file genel_.cc.

References WithLabel::GetLabel(), and MBDYN_EXCEPT_ARGS.

627 {
628  if (0 == strcmp(s, "F")) {
629  return 1u;
630  }
631 
632  if (0 == strcmp(s, "X")) {
633  return 2u;
634  }
635 
636  silent_cerr("genel(" << GetLabel() << "): private data \"" << s << "\" not available" << std::endl);
638 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 540 of file genel_.cc.

541 {
542  return out;
543 }
void GenelSpringSupport::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 561 of file genel_.cc.

562 {
563  *piNumRows = 1;
564  *piNumCols = 1;
565 }

Member Data Documentation

doublereal GenelSpringSupport::dInitVal
protected

Definition at line 220 of file genel_.h.

Referenced by AssRes().

doublereal GenelSpringSupport::dVal
protected

Definition at line 219 of file genel_.h.

Referenced by AfterConvergence(), AssRes(), and dGetPrivData().

ScalarDof GenelSpringSupport::SD
protected

Definition at line 218 of file genel_.h.

Referenced by AssJac(), AssRes(), GenelSpringSupport(), GetConnectedNodes(), and ~GenelSpringSupport().


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