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

#include <driven.h>

Inheritance diagram for DrivenElem:
Collaboration diagram for DrivenElem:

Public Member Functions

 DrivenElem (DataManager *pDM, const DriveCaller *pDC, const Elem *pE, SimulationEntity::Hints *ph=0)
 
 ~DrivenElem (void)
 
virtual bool bIsActive (void) const
 
virtual void Output (OutputHandler &OH) const
 
virtual void SetValue (DataManager *pdm, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void BeforePredict (VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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)
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
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 void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
virtual doublereal dGetM (void) const
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
virtual void SetInitialValue (VectorHandler &X)
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (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 HintParseHint (DataManager *pDM, const char *s) const
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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
 
- Public Member Functions inherited from NestedElem
 NestedElem (const Elem *pE)
 
 ~NestedElem (void)
 
virtual ElempGetElem (void) const
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void SetOutputFlag (flag f)
 
virtual Elem::Type GetElemType (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 DofOrder::Order GetEqType (unsigned int i) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual int GetNumConnectedNodes (void) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
virtual bool bInverseDynamics (void) const
 
virtual AerodynamicElem::Type GetAerodynamicElemType (void) const
 
virtual bool NeedsAirProperties (void) const
 
virtual const InducedVelocitypGetInducedVelocity (void) const
 
virtual void PutAirProperties (const AirProperties *pAP)
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (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)
 
- Public Member Functions inherited from AerodynamicElem
 AerodynamicElem (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~AerodynamicElem (void)
 
- 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 ()
 
- Public Member Functions inherited from AirPropOwner
 AirPropOwner (void)
 
virtual ~AirPropOwner (void)
 
virtual flag fGetAirVelocity (Vec3 &Velocity, const Vec3 &X) const
 
virtual doublereal dGetAirDensity (const Vec3 &X) const
 
virtual doublereal dGetAirPressure (const Vec3 &X) const
 
virtual doublereal dGetAirTemperature (const Vec3 &X) const
 
virtual doublereal dGetSoundSpeed (const Vec3 &X) const
 
virtual bool GetAirProps (const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
 
- Public Member Functions inherited from ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
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
 

Protected Member Functions

virtual Vec3 GetS_int (void) const
 
virtual Mat3x3 GetJ_int (void) const
 
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 
- Protected Member Functions inherited from DriveOwner
 DriveOwner (const DriveCaller *pDC=0)
 
 DriveOwner (const DriveOwner &drive)
 
virtual ~DriveOwner (void)
 
void Set (const DriveCaller *pDC)
 
DriveCallerpGetDriveCaller (void) const
 
doublereal dGet (const doublereal &dVar) const
 
doublereal dGet (void) const
 
bool bIsDifferentiable (void) const
 
doublereal dGetP (const doublereal &dVar) const
 
doublereal dGetP (void) const
 

Protected Attributes

DataManagerpDM
 
SimulationEntity::HintspHints
 
bool bActive
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from NestedElem
ElempElem
 
- Protected Attributes inherited from AirPropOwner
const AirPropertiespAirProperties
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 
- Protected Attributes inherited from DriveOwner
DriveCallerpDriveCaller
 

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 AerodynamicElem
enum  Type {
  UNKNOWN = -1, INDUCEDVELOCITY = 0, AEROMODAL, AERODYNAMICBODY,
  AERODYNAMICBEAM, AERODYNAMICEXTERNAL, AERODYNAMICEXTERNALMODAL, AERODYNAMICLOADABLE,
  AIRCRAFTINSTRUMENTS, GENERICFORCE, LASTAEROTYPE
}
 

Detailed Description

Definition at line 47 of file driven.h.

Constructor & Destructor Documentation

DrivenElem::DrivenElem ( DataManager pDM,
const DriveCaller pDC,
const Elem pE,
SimulationEntity::Hints ph = 0 
)

Definition at line 44 of file driven.cc.

References ASSERT, bActive, and DriveCaller::dGet().

47 : Elem(pE->GetLabel(), pE->fToBeOutput()),
48 NestedElem(pE),
49 DriveOwner(pDC),
50 pDM(pdm),
51 pHints(ph),
52 bActive(false)
53 {
54  ASSERT(pDC != 0);
55 
56  bActive = (pDC->dGet() != 0.);
57 }
bool bActive
Definition: driven.h:52
SimulationEntity::Hints * pHints
Definition: driven.h:51
#define ASSERT(expression)
Definition: colamd.c:977
virtual doublereal dGet(const doublereal &dVar) const =0
NestedElem(const Elem *pE)
Definition: nestedelem.cc:39
virtual flag fToBeOutput(void) const
Definition: output.cc:884
DataManager * pDM
Definition: driven.h:50
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
unsigned int GetLabel(void) const
Definition: withlab.cc:62
DriveOwner(const DriveCaller *pDC=0)
Definition: drive.cc:627

Here is the call graph for this function:

DrivenElem::~DrivenElem ( void  )

Definition at line 60 of file driven.cc.

References ASSERT, NestedElem::pElem, and pHints.

61 {
62  ASSERT(pElem != 0);
63 
64  if (pHints != 0) {
65  for (unsigned i = 0; i < pHints->size(); i++) {
66  delete (*pHints)[i];
67  }
68  delete pHints;
69  pHints = 0;
70  }
71 }
SimulationEntity::Hints * pHints
Definition: driven.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50

Member Function Documentation

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

Reimplemented from NestedElem.

Definition at line 242 of file driven.cc.

References SimulationEntity::AfterConvergence(), ASSERT, DriveOwner::dGet(), and NestedElem::pElem.

243 {
244  ASSERT(pElem != 0);
245  if (dGet() != 0.) {
246  pElem->AfterConvergence(X, XP);
247  }
248 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: simentity.cc:120

Here is the call graph for this function:

void DrivenElem::AfterConvergence ( const VectorHandler X,
const VectorHandler XP,
const VectorHandler XPP 
)
virtual

Reimplemented from NestedElem.

Definition at line 232 of file driven.cc.

References SimulationEntity::AfterConvergence(), ASSERT, DriveOwner::dGet(), and NestedElem::pElem.

234 {
235  ASSERT(pElem != 0);
236  if (dGet() != 0.) {
237  pElem->AfterConvergence(X, XP, XPP);
238  }
239 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: simentity.cc:120

Here is the call graph for this function:

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

Reimplemented from NestedElem.

Definition at line 129 of file driven.cc.

References SimulationEntity::AfterPredict(), ASSERT, bActive, DriveOwner::dGet(), pDM, NestedElem::pElem, pHints, and SimulationEntity::SetValue().

130 {
131  ASSERT(pElem != 0);
132  if (dGet() != 0.) {
133  if (!bActive) {
134  bActive = true;
135  pElem->SetValue(pDM, X, XP, pHints);
136  }
137  pElem->AfterPredict(X, XP);
138 
139  } else {
140  if (bActive) {
141  bActive = false;
142  }
143  }
144 }
bool bActive
Definition: driven.h:52
doublereal dGet(void) const
Definition: drive.cc:671
SimulationEntity::Hints * pHints
Definition: driven.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: simentity.cc:91
DataManager * pDM
Definition: driven.h:50
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
Definition: simentity.cc:63

Here is the call graph for this function:

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

Implements Elem.

Definition at line 252 of file driven.cc.

References DofOrder::ALGEBRAIC, ASSERT, Elem::AssJac(), DriveOwner::dGet(), DofOrder::DIFFERENTIAL, Elem::GetDofType(), NestedElem::iGetFirstIndex(), Elem::iGetNumDof(), MBDYN_EXCEPT_ARGS, NestedElem::pElem, SparseSubMatrixHandler::PutItem(), SparseSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetNullMatrix(), and VariableSubMatrixHandler::SetSparse().

256 {
257  ASSERT(pElem != 0);
258 
259  if (dGet() != 0.) {
260  return pElem->AssJac(WorkMat, dCoef, XCurr, XPrimeCurr);
261  }
262 
263  unsigned int iNumDofs = pElem->iGetNumDof();
264  if (iNumDofs == 0) {
265  WorkMat.SetNullMatrix();
266 
267  } else {
268  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
269  WM.ResizeReset(iNumDofs, 0);
270 
271  /* NOTE: must not fail, since iNumDofs != 0 */
272  integer iFirstIndex = dynamic_cast<ElemWithDofs *>(pElem)->iGetFirstIndex();
273 
274  for (unsigned int iCnt = 1; iCnt <= iNumDofs; iCnt++) {
275  doublereal J;
276 
277  switch (pElem->GetDofType(iCnt - 1)) {
278  case DofOrder::ALGEBRAIC:
279  J = 1.;
280  break;
282  J = dCoef;
283  break;
284  default:
285  ASSERT(0);
287  }
288 
289  WM.PutItem(iCnt, iFirstIndex+iCnt,
290  iFirstIndex+iCnt, J);
291  }
292  }
293 
294  return WorkMat;
295 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual integer iGetFirstIndex(void) const
Definition: nestedelem.cc:536
doublereal dGet(void) const
Definition: drive.cc:671
void ResizeReset(integer iNewRow, integer iNewCol)
Definition: submat.cc:1084
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:997
void SetNullMatrix(void)
Definition: submat.h:1159
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumDof(void) const
Definition: elem.cc:118
Elem * pElem
Definition: nestedelem.h:50
virtual DofOrder::Order GetDofType(unsigned int) const
Definition: elem.cc:150
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0

Here is the call graph for this function:

VariableSubMatrixHandler & DrivenElem::AssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from Elem.

Definition at line 194 of file driven.cc.

References ASSERT, Elem::AssJac(), Elem::bIsErgonomy(), DriveOwner::dGet(), and NestedElem::pElem.

196 {
197  ASSERT(pElem != 0);
198 
199  // must be a joint
200  ASSERT(dynamic_cast<const Joint *>(pElem) != 0);
201  // must either be torque, prescribed motion or ergonomy
202  ASSERT(dynamic_cast<const Joint *>(pElem)->bIsTorque()
203  || dynamic_cast<const Joint *>(pElem)->bIsPrescribedMotion()
204  || dynamic_cast<const Joint *>(pElem)->bIsErgonomy());
205  // dGet() must not be zero, otherwise AssJac() would not be called
206  ASSERT(dGet() != 0.);
207 
208  return pElem->AssJac(WorkMat, XCurr);
209 }
bool bIsErgonomy(void) const
Definition: elem.cc:83
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0

Here is the call graph for this function:

void DrivenElem::AssMats ( VariableSubMatrixHandler WorkMatA,
VariableSubMatrixHandler WorkMatB,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Reimplemented from Elem.

Definition at line 298 of file driven.cc.

References ASSERT, Elem::AssMats(), DriveOwner::dGet(), NestedElem::iGetFirstIndex(), Elem::iGetNumDof(), NestedElem::pElem, SparseSubMatrixHandler::PutItem(), SparseSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetNullMatrix(), and VariableSubMatrixHandler::SetSparse().

302 {
303  ASSERT(pElem != 0);
304 
305  if (dGet() != 0.) {
306  pElem->AssMats(WorkMatA, WorkMatB, XCurr, XPrimeCurr);
307  return;
308  }
309 
310  WorkMatA.SetNullMatrix();
311 
312  unsigned int iNumDofs = pElem->iGetNumDof();
313  if (iNumDofs == 0) {
314  WorkMatB.SetNullMatrix();
315  } else {
316  SparseSubMatrixHandler& WM = WorkMatB.SetSparse();
317  WM.ResizeReset(iNumDofs, 0);
318 
319  /* NOTE: must not fail, since iNumDofs != 0 */
320  integer iFirstIndex = dynamic_cast<ElemWithDofs *>(pElem)->iGetFirstIndex();
321 
322  for (unsigned int iCnt = 1; iCnt <= iNumDofs; iCnt++) {
323  WM.PutItem(iCnt, iFirstIndex+iCnt,
324  iFirstIndex+iCnt, 1.);
325  }
326  }
327 };
virtual integer iGetFirstIndex(void) const
Definition: nestedelem.cc:536
doublereal dGet(void) const
Definition: drive.cc:671
void ResizeReset(integer iNewRow, integer iNewCol)
Definition: submat.cc:1084
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:997
void SetNullMatrix(void)
Definition: submat.h:1159
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumDof(void) const
Definition: elem.cc:118
Elem * pElem
Definition: nestedelem.h:50
virtual void AssMats(VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: elem.cc:55
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Elem.

Definition at line 331 of file driven.cc.

References ASSERT, Elem::AssRes(), DriveOwner::dGet(), NestedElem::iGetFirstIndex(), Elem::iGetNumDof(), NestedElem::pElem, VectorHandler::PutCoef(), SubVectorHandler::PutRowIndex(), VectorHandler::Resize(), and VectorHandler::ResizeReset().

335 {
336  ASSERT(pElem != 0);
337  if (dGet() != 0.) {
338  return pElem->AssRes(WorkVec, dCoef, XCurr, XPrimeCurr);
339  }
340 
341  unsigned int iNumDofs = pElem->iGetNumDof();
342  if (iNumDofs == 0) {
343  WorkVec.Resize(0);
344  } else {
345  WorkVec.ResizeReset(iNumDofs);
346 
347  /* NOTE: must not fail, since iNumDofs != 0 */
348  integer iFirstIndex = dynamic_cast<ElemWithDofs *>(pElem)->iGetFirstIndex();
349 
350  for (unsigned int iCnt = 1; iCnt <= iNumDofs; iCnt++) {
351  WorkVec.PutRowIndex(iCnt, iFirstIndex+iCnt);
352  WorkVec.PutCoef(iCnt, -XCurr(iFirstIndex+iCnt));
353  }
354  }
355 
356  return WorkVec;
357 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual integer iGetFirstIndex(void) const
Definition: nestedelem.cc:536
doublereal dGet(void) const
Definition: drive.cc:671
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define ASSERT(expression)
Definition: colamd.c:977
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
virtual unsigned int iGetNumDof(void) const
Definition: elem.cc:118
Elem * pElem
Definition: nestedelem.h:50
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
long int integer
Definition: colamd.c:51
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

SubVectorHandler & DrivenElem::AssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr,
const VectorHandler XPrimePrimeCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from Elem.

Definition at line 213 of file driven.cc.

References ASSERT, Elem::AssRes(), DriveOwner::dGet(), NestedElem::pElem, and VectorHandler::Resize().

218 {
219  ASSERT(pElem != 0);
220 
221  if (dGet() != 0.) {
222  return pElem->AssRes(WorkVec, XCurr, XPrimeCurr, XPrimePrimeCurr, iOrder);
223  }
224 
225  WorkVec.Resize(0);
226 
227  return WorkVec;
228 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

void DrivenElem::BeforePredict ( VectorHandler X,
VectorHandler XP,
VectorHandler XPrev,
VectorHandler XPPrev 
) const
virtual

Reimplemented from NestedElem.

Definition at line 117 of file driven.cc.

References ASSERT, SimulationEntity::BeforePredict(), DriveOwner::dGet(), and NestedElem::pElem.

121 {
122  ASSERT(pElem != 0);
123  if (dGet() != 0.) {
124  pElem->BeforePredict(X, XP, XPrev, XPPrev);
125  }
126 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
virtual void BeforePredict(VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
Definition: simentity.cc:82
Elem * pElem
Definition: nestedelem.h:50

Here is the call graph for this function:

bool DrivenElem::bIsActive ( void  ) const
virtual

Definition at line 74 of file driven.cc.

References DriveOwner::dGet().

Referenced by LoadIncForce::AssJac(), LoadIncForce::AssRes(), and DataManager::Cast().

75 {
76  return (dGet() != 0.);
77 }
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

doublereal DrivenElem::dGetM ( void  ) const
virtual

Reimplemented from NestedElem.

Definition at line 461 of file driven.cc.

References DriveOwner::dGet(), and NestedElem::dGetM().

462 {
463  if (dGet() != 0.) {
464  return NestedElem::dGetM();
465  }
466 
467  return 0.;
468 }
virtual doublereal dGetM(void) const
Definition: nestedelem.cc:486
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

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

Reimplemented from NestedElem.

Definition at line 364 of file driven.cc.

References DriveOwner::dGet(), SimulationEntity::dGetPrivData(), and NestedElem::pElem.

365 {
366  if (dGet() != 0.) {
367  return pElem->dGetPrivData(i);
368  }
369 
370  /* safe default */
371  return 0.;
372 }
doublereal dGet(void) const
Definition: drive.cc:671
virtual doublereal dGetPrivData(unsigned int i) const
Definition: simentity.cc:149
Elem * pElem
Definition: nestedelem.h:50

Here is the call graph for this function:

Vec3 DrivenElem::GetB_int ( void  ) const
protectedvirtual

Reimplemented from NestedElem.

Definition at line 439 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetB_int(), and Zero3.

440 {
441  if (dGet() != 0.) {
442  return NestedElem::GetB_int();
443  }
444 
445  return Zero3;
446 }
const Vec3 Zero3(0., 0., 0.)
doublereal dGet(void) const
Definition: drive.cc:671
virtual Vec3 GetB_int(void) const
Definition: nestedelem.cc:460

Here is the call graph for this function:

Vec3 DrivenElem::GetG_int ( void  ) const
protectedvirtual

Reimplemented from NestedElem.

Definition at line 451 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetG_int(), and Zero3.

452 {
453  if (dGet() != 0.) {
454  return NestedElem::GetG_int();
455  }
456 
457  return Zero3;
458 }
virtual Vec3 GetG_int(void) const
Definition: nestedelem.cc:474
const Vec3 Zero3(0., 0., 0.)
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

Mat3x3 DrivenElem::GetJ ( void  ) const

Definition at line 481 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetJ(), and Zero3x3.

482 {
483  if (dGet() != 0.) {
484  return NestedElem::GetJ();
485  }
486 
487  return Zero3x3;
488 }
doublereal dGet(void) const
Definition: drive.cc:671
Mat3x3 GetJ(void) const
Definition: nestedelem.cc:510
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)

Here is the call graph for this function:

Mat3x3 DrivenElem::GetJ_int ( void  ) const
protectedvirtual

Reimplemented from NestedElem.

Definition at line 429 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetJ_int(), and Zero3x3.

430 {
431  if (dGet() != 0.) {
432  return NestedElem::GetJ_int();
433  }
434 
435  return Zero3x3;
436 }
virtual Mat3x3 GetJ_int(void) const
Definition: nestedelem.cc:448
doublereal dGet(void) const
Definition: drive.cc:671
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)

Here is the call graph for this function:

Vec3 DrivenElem::GetS ( void  ) const

Definition at line 471 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetS(), and Zero3.

472 {
473  if (dGet() != 0.) {
474  return NestedElem::GetS();
475  }
476 
477  return Zero3;
478 }
const Vec3 Zero3(0., 0., 0.)
doublereal dGet(void) const
Definition: drive.cc:671
Vec3 GetS(void) const
Definition: nestedelem.cc:498

Here is the call graph for this function:

Vec3 DrivenElem::GetS_int ( void  ) const
protectedvirtual

Reimplemented from NestedElem.

Definition at line 419 of file driven.cc.

References DriveOwner::dGet(), NestedElem::GetS_int(), and Zero3.

420 {
421  if (dGet() != 0.) {
422  return NestedElem::GetS_int();
423  }
424 
425  return Zero3;
426 }
const Vec3 Zero3(0., 0., 0.)
virtual Vec3 GetS_int(void) const
Definition: nestedelem.cc:436
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

unsigned int DrivenElem::iGetInitialNumDof ( void  ) const
virtual

Reimplemented from NestedElem.

Definition at line 376 of file driven.cc.

References DriveOwner::dGet(), and NestedElem::iGetInitialNumDof().

377 {
378  if (dGet() != 0.) {
380  }
381 
382  return 0;
383 }
doublereal dGet(void) const
Definition: drive.cc:671
virtual unsigned int iGetInitialNumDof(void) const
Definition: nestedelem.cc:337

Here is the call graph for this function:

VariableSubMatrixHandler & DrivenElem::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from NestedElem.

Definition at line 394 of file driven.cc.

References DriveOwner::dGet(), NestedElem::InitialAssJac(), and VariableSubMatrixHandler::SetNullMatrix().

396 {
397  if (dGet() != 0.) {
398  return NestedElem::InitialAssJac(WorkMat, XCurr);
399  }
400 
401  WorkMat.SetNullMatrix();
402  return WorkMat;
403 }
doublereal dGet(void) const
Definition: drive.cc:671
void SetNullMatrix(void)
Definition: submat.h:1159
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: nestedelem.cc:358

Here is the call graph for this function:

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

Reimplemented from NestedElem.

Definition at line 406 of file driven.cc.

References DriveOwner::dGet(), NestedElem::InitialAssRes(), and VectorHandler::Resize().

408 {
409  if (dGet() != 0.) {
410  return NestedElem::InitialAssRes(WorkVec, XCurr);
411  }
412 
413  WorkVec.Resize(0);
414  return WorkVec;
415 }
doublereal dGet(void) const
Definition: drive.cc:671
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: nestedelem.cc:373
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

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

Reimplemented from NestedElem.

Definition at line 386 of file driven.cc.

References DriveOwner::dGet(), and NestedElem::InitialWorkSpaceDim().

387 {
388  if (dGet() != 0.) {
389  NestedElem::InitialWorkSpaceDim(piNumRows, piNumCols);
390  }
391 }
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: nestedelem.cc:348
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

void DrivenElem::Output ( OutputHandler OH) const
virtual

Reimplemented from NestedElem.

Definition at line 80 of file driven.cc.

References ASSERT, DriveOwner::dGet(), ToBeOutput::Output(), and NestedElem::pElem.

81 {
82  ASSERT(pElem != 0);
83  if (dGet() != 0.) {
84  pElem->Output(OH);
85  }
86 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
virtual void Output(OutputHandler &OH) const
Definition: output.cc:870
Elem * pElem
Definition: nestedelem.h:50

Here is the call graph for this function:

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

Implements Elem.

Definition at line 90 of file driven.cc.

References ASSERT, WithLabel::GetLabel(), NestedElem::pElem, DriveOwner::pGetDriveCaller(), pHints, Elem::Restart(), and DriveCaller::Restart().

91 {
92  ASSERT(pElem != 0);
93 
94  out << "driven: " << GetLabel() << ", ",
95  pGetDriveCaller()->Restart(out) << ", ";
96 
97  if (pHints) {
98  for (unsigned i = 0; i < pHints->size(); i++) {
99  out << "hint, \"";
100 
101  // TODO
102 
103  out << "\", ";
104  }
105  }
106 
107  pElem->Restart(out);
108 
109  return out;
110 }
virtual std::ostream & Restart(std::ostream &out) const =0
virtual std::ostream & Restart(std::ostream &out) const =0
SimulationEntity::Hints * pHints
Definition: driven.h:51
#define ASSERT(expression)
Definition: colamd.c:977
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
Elem * pElem
Definition: nestedelem.h:50
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void DrivenElem::SetInitialValue ( VectorHandler X)
virtual

Initialize state vector used in initial assembly. May set internal states of the element. Do not rely on being always called, because initial assembly could be implicitly or explicitly skipped

Reimplemented from NestedElem.

Definition at line 492 of file driven.cc.

References DriveOwner::dGet(), and NestedElem::SetInitialValue().

493 {
494  if (dGet() != 0.) {
495  return NestedElem::SetInitialValue(X);
496  }
497 }
virtual void SetInitialValue(VectorHandler &X)
Definition: nestedelem.cc:548
doublereal dGet(void) const
Definition: drive.cc:671

Here is the call graph for this function:

void DrivenElem::SetValue ( DataManager pdm,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
virtual

Reimplemented from NestedElem.

Definition at line 147 of file driven.cc.

References ASSERT, DriveOwner::dGet(), NestedElem::pElem, and SimulationEntity::SetValue().

150 {
151  ASSERT(pElem != 0);
152 
153  if (dGet() != 0.) {
154  pElem->SetValue(pdm, X, XP, ph);
155  }
156 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
Definition: simentity.cc:63

Here is the call graph for this function:

void DrivenElem::Update ( const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Reimplemented from NestedElem.

Definition at line 174 of file driven.cc.

References ASSERT, DriveOwner::dGet(), NestedElem::pElem, and SimulationEntity::Update().

175 {
176  ASSERT(pElem != 0);
177  if (dGet() != 0.) {
178  pElem->Update(XCurr, XPrimeCurr);
179  }
180 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void Update(const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: simentity.cc:98

Here is the call graph for this function:

void DrivenElem::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder 
)
virtual

Reimplemented from NestedElem.

Definition at line 184 of file driven.cc.

References ASSERT, DriveOwner::dGet(), NestedElem::pElem, and SimulationEntity::Update().

185 {
186  ASSERT(pElem != 0);
187  if (dGet() != 0.) {
188  pElem->Update(XCurr, iOrder);
189  }
190 }
doublereal dGet(void) const
Definition: drive.cc:671
#define ASSERT(expression)
Definition: colamd.c:977
Elem * pElem
Definition: nestedelem.h:50
virtual void Update(const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: simentity.cc:98

Here is the call graph for this function:

Member Data Documentation

bool DrivenElem::bActive
protected

Definition at line 52 of file driven.h.

Referenced by AfterPredict(), and DrivenElem().

DataManager* DrivenElem::pDM
protected

Definition at line 50 of file driven.h.

Referenced by AfterPredict().

SimulationEntity::Hints* DrivenElem::pHints
protected

Definition at line 51 of file driven.h.

Referenced by AfterPredict(), Restart(), and ~DrivenElem().


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