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

#include <autostr.h>

Inheritance diagram for AutomaticStructDispElem:
Collaboration diagram for AutomaticStructDispElem:

Public Member Functions

 AutomaticStructDispElem (const DynamicStructDispNode *pN)
 
virtual ~AutomaticStructDispElem (void)
 
void Init (const Vec3 &b, const Vec3 &bp)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual Elem::Type GetElemType (void) const
 
virtual void AddInertia (const doublereal &dm)
 
virtual doublereal dGetM (void) const
 
virtual const Vec3GetS (void) const
 
virtual const Mat3x3GetJ (void) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
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 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 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 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))
 

Protected Member Functions

virtual const Vec3GetBCurr (void) const
 
virtual const Vec3GetGCurr (void) const
 
virtual const Vec3GetBPCurr (void) const
 
virtual const Vec3GetGPCurr (void) const
 
virtual void ComputeAccelerations (Vec3 &XPP) const
 

Protected Attributes

DynamicStructDispNodepNode
 
Vec3 B
 
Vec3 BP
 
doublereal m
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Friends

class DynamicStructDispNode
 
class DynamicStructNode
 

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 }
 

Detailed Description

Definition at line 43 of file autostr.h.

Constructor & Destructor Documentation

AutomaticStructDispElem::AutomaticStructDispElem ( const DynamicStructDispNode pN)

Definition at line 42 of file autostr.cc.

References pNode, and DynamicStructDispNode::SetAutoStr().

43 : Elem(pN->GetLabel(), pN->fToBeOutput()),
44 pNode(const_cast<DynamicStructDispNode *>(pN)), B(Zero3), BP(Zero3),
45 m(0.)
46 {
47  pNode->SetAutoStr(this);
48 }
const Vec3 Zero3(0., 0., 0.)
virtual void SetAutoStr(const AutomaticStructDispElem *p)
Definition: strnode.h:582
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual flag fToBeOutput(void) const
Definition: output.cc:884
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

virtual AutomaticStructDispElem::~AutomaticStructDispElem ( void  )
inlinevirtual

Definition at line 73 of file autostr.h.

References NO_OP.

73  {
74  NO_OP;
75  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void AutomaticStructDispElem::AddInertia ( const doublereal dm)
virtual

Definition at line 62 of file autostr.cc.

References m.

Referenced by DynamicStructDispNode::AddInertia().

63 {
64  m += dm;
65 }
VariableSubMatrixHandler & AutomaticStructDispElem::AssJac ( VariableSubMatrixHandler WorkMat,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Reimplemented in AutomaticStructElem.

Definition at line 90 of file autostr.cc.

References DEBUGCOUTFNAME, RigidBodyKinematics::GetW(), DynamicStructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), StructDispNode::pGetRBK(), pNode, SparseSubMatrixHandler::PutCross(), SparseSubMatrixHandler::PutItem(), SparseSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetSparse().

94 {
95  DEBUGCOUTFNAME("AutomaticStructElem::AssJac");
96 
97  /* Casting di WorkMat */
98  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
99 
100  /* Dimensiona e resetta la matrice di lavoro */
101  integer iCoefs = 6;
102  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
103  if (pRBK) {
104  iCoefs += 6;
105  }
106  WM.ResizeReset(iCoefs, 0);
107 
108  /* Setta gli indici della matrice - le incognite sono ordinate come:
109  * - posizione (3)
110  * - parametri di rotazione (3)
111  * - quantita' di moto (3)
112  * - momento della quantita' di moto
113  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
114  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
115  * e' dato da iGetFirstPositionIndex()+i
116  */
117  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
118  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
119 
120  for (int iCnt = 1; iCnt <= 3; iCnt++) {
121  WM.PutItem(iCnt, iFirstPositionIndex + iCnt,
122  iFirstMomentumIndex + iCnt, -dCoef);
123  WM.PutItem(3 + iCnt, iFirstMomentumIndex + iCnt,
124  iFirstMomentumIndex + iCnt, 1.);
125  }
126 
127  // relative frame dynamics contribution
128  // (see tecman, "Dynamics in a Relative Reference Frame")
129  if (pRBK) {
130  const Vec3& W0 = pRBK->GetW();
131 
132  WM.PutCross(7, iFirstMomentumIndex,
133  iFirstMomentumIndex, W0*(2.*dCoef));
134  }
135 
136  return WorkMat;
137 }
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
void ResizeReset(integer iNewRow, integer iNewCol)
Definition: submat.cc:1084
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
Definition: submat.cc:1236
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:997
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual const Vec3 & GetW(void) const =0
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
long int integer
Definition: colamd.c:51
virtual integer iGetFirstMomentumIndex(void) const
Definition: strnode.h:602

Here is the call graph for this function:

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

Reimplemented from Elem.

Reimplemented in AutomaticStructElem.

Definition at line 142 of file autostr.cc.

References DEBUGCOUTFNAME, DynamicStructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), pNode, SparseSubMatrixHandler::PutItem(), SparseSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetSparse().

146 {
147  DEBUGCOUTFNAME("AutomaticStructElem::AssMats");
148 
149  /* Casting di WorkMat */
150  SparseSubMatrixHandler& WMA = WorkMatA.SetSparse();
151  SparseSubMatrixHandler& WMB = WorkMatB.SetSparse();
152 
153  /* Dimensiona e resetta la matrice di lavoro */
154  WMA.ResizeReset(3, 0);
155  WMB.ResizeReset(3, 0);
156 
157  /* Setta gli indici della matrice - le incognite sono ordinate come:
158  * - posizione (3)
159  * - parametri di rotazione (3)
160  * - quantita' di moto (3)
161  * - momento della quantita' di moto
162  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
163  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
164  * e' dato da iGetFirstPositionIndex()+i
165  */
166  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
167  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
168 
169  for (int iCnt = 1; iCnt <= 3; iCnt++) {
170  WMA.PutItem(iCnt, iFirstPositionIndex + iCnt,
171  iFirstMomentumIndex + iCnt, -1.);
172  WMB.PutItem(iCnt, iFirstMomentumIndex + iCnt,
173  iFirstMomentumIndex + iCnt, 1.);
174  }
175 }
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
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
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
DynamicStructDispNode * pNode
Definition: autostr.h:48
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
long int integer
Definition: colamd.c:51
virtual integer iGetFirstMomentumIndex(void) const
Definition: strnode.h:602

Here is the call graph for this function:

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

Implements Elem.

Reimplemented in AutomaticStructElem.

Definition at line 180 of file autostr.cc.

References VectorHandler::Add(), B, BP, Vec3::Cross(), DEBUGCOUTFNAME, RigidBodyKinematics::GetW(), DynamicStructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), m, StructDispNode::pGetRBK(), pNode, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and VectorHandler::Sub().

184 {
185  DEBUGCOUTFNAME("AutomaticStructElem::AssRes");
186 
187  WorkVec.ResizeReset(6);
188 
189  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
190  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
191  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
192  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
193  WorkVec.PutRowIndex(3 + iCnt, iFirstMomentumIndex + iCnt);
194  }
195 
196  /* Collects data */
197  B = Vec3(XCurr, iFirstMomentumIndex + 1);
198  BP = Vec3(XPrimeCurr, iFirstMomentumIndex + 1);
199 
200  /*
201  * Momentum and momenta moment (about node):
202  *
203  * B = m V + W /\ S
204  *
205  * G = S /\ V + J W
206  *
207  * Bp = F
208  *
209  * Gp + V /\ B = M
210  */
211  WorkVec.Add(1, B);
212  WorkVec.Sub(4, BP);
213 
214  // relative frame dynamics contribution
215  // (see tecman, "Dynamics in a Relative Reference Frame")
216  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
217  if (pRBK) {
218  const Vec3& W0 = pRBK->GetW();
219 
220  WorkVec.Sub(4, W0.Cross(B*2.));
221  }
222 
223  // reset instantaneous inertia properties
224  m = 0.;
225 
226  return WorkVec;
227 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
virtual const Vec3 & GetW(void) const =0
long int integer
Definition: colamd.c:51
virtual integer iGetFirstMomentumIndex(void) const
Definition: strnode.h:602

Here is the call graph for this function:

void AutomaticStructDispElem::ComputeAccelerations ( Vec3 XPP) const
protectedvirtual

Definition at line 51 of file autostr.cc.

References BP, m, and Zero3.

Referenced by DynamicStructDispNode::AfterConvergence(), DynamicStructDispNode::dGetDofValue(), and DynamicStructDispNode::Update().

52 {
53  if (m == 0.) {
54  XPP = Zero3;
55  return;
56  }
57 
58  XPP = BP/m;
59 }
const Vec3 Zero3(0., 0., 0.)
virtual doublereal AutomaticStructDispElem::dGetM ( void  ) const
inlinevirtual

Definition at line 95 of file autostr.h.

References m.

95  {
96  return m;
97  };
doublereal AutomaticStructDispElem::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Reimplemented in AutomaticStructElem.

Definition at line 358 of file autostr.cc.

References B, BP, StructDispNode::GetVCurr(), and pNode.

359 {
360  if (i == 13) {
361  return (B*pNode->GetVCurr())/2;
362  }
363 
364  unsigned int der = (i - 1)/6;
365  i -= 6*der;
366  unsigned int type = (i - 1)/3;
367  i -= 3*type;
368 
369  if (der) {
370  if (type) {
371  return 0.;
372  }
373  return BP(i);
374 
375  } else {
376  if (type) {
377  return 0.;
378  }
379  return B(i);
380  }
381 }
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322

Here is the call graph for this function:

virtual const Vec3& AutomaticStructDispElem::GetBCurr ( void  ) const
inlineprotectedvirtual

Definition at line 54 of file autostr.h.

References B.

Referenced by DynamicStructDispNode::GetBCurr().

54 { return B; };
virtual const Vec3& AutomaticStructDispElem::GetBPCurr ( void  ) const
inlineprotectedvirtual

Definition at line 56 of file autostr.h.

References BP.

Referenced by DynamicStructDispNode::GetBPCurr().

56 { return BP; };
virtual void AutomaticStructDispElem::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Reimplemented in AutomaticStructElem.

Definition at line 168 of file autostr.h.

References pNode.

168  {
169  connectedNodes.resize(1);
170  connectedNodes[0] = pNode;
171  };
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual Elem::Type AutomaticStructDispElem::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 84 of file autostr.h.

References Elem::AUTOMATICSTRUCTURAL.

84  {
86  };
virtual const Vec3& AutomaticStructDispElem::GetGCurr ( void  ) const
inlineprotectedvirtual

Reimplemented in AutomaticStructElem.

Definition at line 55 of file autostr.h.

References Zero3.

Referenced by DynamicStructNode::GetGCurr().

55 { return ::Zero3; };
const Vec3 Zero3(0., 0., 0.)
virtual const Vec3& AutomaticStructDispElem::GetGPCurr ( void  ) const
inlineprotectedvirtual

Reimplemented in AutomaticStructElem.

Definition at line 57 of file autostr.h.

Referenced by DynamicStructNode::GetGPCurr().

57 { return ::Zero3; };
const Vec3 Zero3(0., 0., 0.)
virtual const Mat3x3& AutomaticStructDispElem::GetJ ( void  ) const
inlinevirtual

Reimplemented in AutomaticStructElem.

Definition at line 105 of file autostr.h.

References Zero3x3.

105  {
107  };
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual const Vec3& AutomaticStructDispElem::GetS ( void  ) const
inlinevirtual

Reimplemented in AutomaticStructElem.

Definition at line 100 of file autostr.h.

References Zero3.

100  {
102  };
const Vec3 Zero3(0., 0., 0.)
unsigned int AutomaticStructDispElem::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Reimplemented in AutomaticStructElem.

Definition at line 290 of file autostr.cc.

291 {
292  return 13;
293 }
unsigned int AutomaticStructDispElem::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Reimplemented in AutomaticStructElem.

Definition at line 296 of file autostr.cc.

References STRLENOF.

297 {
298  /*
299  * beta[1]
300  * beta[2]
301  * beta[3]
302  * gamma[1]
303  * gamma[2]
304  * gamma[3]
305  * betaP[1]
306  * betaP[2]
307  * betaP[3]
308  * gammaP[1]
309  * gammaP[2]
310  * gammaP[3]
311  * KE
312  */
313  unsigned int idx = 0;
314  if (strcmp(s, "KE") == 0) {
315  return 13;
316 
317  } else if (strncmp(s, "beta", STRLENOF("beta")) == 0) {
318  s += STRLENOF("beta");
319 
320  } else if (strncmp(s, "gamma", STRLENOF("gamma")) == 0) {
321  s += STRLENOF("gamma");
322  idx += 3;
323 
324  } else {
325  return 0;
326  }
327 
328  if (s[0] == 'P') {
329  s++;
330  idx += 6;
331  }
332 
333  if (s[0] != '[') {
334  return 0;
335  }
336  s++;
337 
338  switch (s[0]) {
339  case '1':
340  case '2':
341  case '3':
342  idx += s[0] - '0';
343  s++;
344  break;
345 
346  default:
347  return 0;
348  }
349 
350  if (s[0] != ']' && s[1] != '\0') {
351  return 0;
352  }
353 
354  return idx;
355 }
#define STRLENOF(s)
Definition: mbdyn.h:166
void AutomaticStructDispElem::Init ( const Vec3 b,
const Vec3 bp 
)

Definition at line 69 of file autostr.cc.

References B, and BP.

Referenced by DataManager::ReadElems().

70 {
71  B = b;
72  BP = bp;
73 }
void AutomaticStructDispElem::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Reimplemented in AutomaticStructElem.

Definition at line 253 of file autostr.cc.

References B, BP, ToBeOutput::bToBeOutput(), OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), OutputHandler::INERTIA, OutputHandler::Inertia(), Vec3::pGetVec(), OutputHandler::UseNetCDF(), OutputHandler::UseText(), and Zero3.

254 {
255  if (bToBeOutput()) {
256 #ifdef USE_NETCDF
258  Var_B->put_rec(B.pGetVec(), OH.GetCurrentStep());
259  Var_G->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
260  Var_BP->put_rec(BP.pGetVec(), OH.GetCurrentStep());
261  Var_GP->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
262  }
263 #endif /* USE_NETCDF */
264 
266  OH.Inertia() << std::setw(8) << GetLabel()
267  << " " << B
268  << " " << ::Zero3
269  << " " << BP
270  << " " << ::Zero3
271  << std::endl;
272  }
273  }
274 }
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
Definition: output.cc:890
bool UseNetCDF(int out) const
Definition: output.cc:491
std::ostream & Inertia(void) const
Definition: output.h:436
long GetCurrentStep(void) const
Definition: output.h:116
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
unsigned int GetLabel(void) const
Definition: withlab.cc:62
bool UseText(int out) const
Definition: output.cc:446

Here is the call graph for this function:

void AutomaticStructDispElem::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Reimplemented in AutomaticStructElem.

Definition at line 231 of file autostr.cc.

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

232 {
233  if (bToBeOutput()) {
234 #ifdef USE_NETCDF
237 
238  std::ostringstream os;
239  os << "node.struct." << GetLabel() << ".";
240 
241  std::string name(os.str());
242 
243  Var_B = OH.CreateVar<Vec3>(name + "B", "kg m/s", "momentum (X, Y, Z)");
244  Var_G = OH.CreateVar<Vec3>(name + "G", "kg m^2/s", "momenta moment (X, Y, Z)");
245  Var_BP = OH.CreateVar<Vec3>(name + "BP", "kg m/s^2", "momentum derivative (X, Y, Z)");
246  Var_GP = OH.CreateVar<Vec3>(name + "GP", "kg m^2/s^2", "momenta moment derivative (X, Y, Z)");
247  }
248 #endif // USE_NETCDF
249  }
250 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
bool UseNetCDF(int out) const
Definition: output.cc:491
bool IsOpen(int out) const
Definition: output.cc:395
#define ASSERT(expression)
Definition: colamd.c:977
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Reimplemented in AutomaticStructElem.

Definition at line 78 of file autostr.cc.

References B, BP, WithLabel::GetLabel(), and Vec3::Write().

79 {
80  out << "automatic structural displacement: " << GetLabel() << ", "
81  "reference, global, ", B.Write(out, ", ") << ", "
82  "reference, global, ", BP.Write(out, ", ") << ";" << std::endl;
83 
84  return out;
85 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Reimplemented in AutomaticStructElem.

Definition at line 279 of file autostr.cc.

References BP, DynamicStructDispNode::iGetFirstMomentumIndex(), pNode, and VectorHandler::Put().

282 {
284 
285  XP.Put(iIndex + 1, BP);
286 }
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
long int integer
Definition: colamd.c:51
virtual integer iGetFirstMomentumIndex(void) const
Definition: strnode.h:602

Here is the call graph for this function:

virtual void AutomaticStructDispElem::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Reimplemented in AutomaticStructElem.

Definition at line 129 of file autostr.h.

129  {
130  *piNumRows = 6;
131  *piNumCols = 3;
132  };

Friends And Related Function Documentation

friend class DynamicStructDispNode
friend

Definition at line 44 of file autostr.h.

friend class DynamicStructNode
friend

Definition at line 45 of file autostr.h.

Member Data Documentation


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