MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
NodeDistDriveCaller Class Reference
Inheritance diagram for NodeDistDriveCaller:
Collaboration diagram for NodeDistDriveCaller:

Public Member Functions

 NodeDistDriveCaller (const DriveHandler *pDH, const StructNode *pNode1, const Vec3 &o1, const StructNode *pNode2, const Vec3 &o2, const Vec3 &e1)
 
virtual ~NodeDistDriveCaller (void)
 
virtual DriveCallerpCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
doublereal dGet (const doublereal &dVar) const
 
doublereal dGet (void) const
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal dGetP (void) const
 
virtual doublereal dGetP (const doublereal &dVar) const
 
- Public Member Functions inherited from DriveCaller
 DriveCaller (const DriveHandler *pDH)
 
virtual ~DriveCaller (void)
 
virtual void SetDrvHdl (const DriveHandler *pDH)
 
virtual const DriveHandlerpGetDrvHdl (void) const
 
virtual void Output (OutputHandler &OH) const
 
virtual void Trace (OutputHandler &OH) 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 ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
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 Traceable
 Traceable (flag fTrace=0)
 
virtual ~Traceable (void)
 
virtual flag fToBeTraced (void) const
 
virtual void SetTraceFlag (flag f=TRACE)
 

Private Attributes

const StructNode *const pNode1
 
const Vec3 o1
 
const StructNode *const pNode2
 
const Vec3 o2
 
const Vec3 e1
 

Additional Inherited Members

- Public Types inherited from DriveCaller
enum  OutputFlags { OUTPUT_VALUE = OUTPUT_PRIVATE << 0, OUTPUT_DERIVATIVE = OUTPUT_PRIVATE << 1 }
 
enum  TraceFlags { TRACE_VALUE = TRACE_PRIVATE << 0, TRACE_DERIVATIVE = TRACE_PRIVATE << 1 }
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 
- Public Types inherited from Traceable
enum  { TRACE = 0x01U, TRACE_PUBLIC_MASK = 0x0FU, TRACE_PRIVATE = 0x10U, TRACE_PRIVATE_MASK = ~TRACE_PUBLIC_MASK }
 
- Protected Attributes inherited from DriveCaller
DriveHandlerpDrvHdl
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Detailed Description

Definition at line 58 of file module-nodedistdrive.cc.

Constructor & Destructor Documentation

NodeDistDriveCaller::NodeDistDriveCaller ( const DriveHandler pDH,
const StructNode pNode1,
const Vec3 o1,
const StructNode pNode2,
const Vec3 o2,
const Vec3 e1 
)

Definition at line 208 of file module-nodedistdrive.cc.

References NO_OP.

Referenced by pCopy().

215 : DriveCaller(pDH),
216  pNode1(pNode1Arg), o1(o1Arg),
217  pNode2(pNode2Arg), o2(o2Arg),
218  e1(e1Arg)
219 {
220  NO_OP;
221 };
const StructNode *const pNode2
#define NO_OP
Definition: myassert.h:74
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
const StructNode *const pNode1
NodeDistDriveCaller::~NodeDistDriveCaller ( void  )
virtual

Definition at line 223 of file module-nodedistdrive.cc.

References NO_OP.

224 {
225  NO_OP;
226 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool NodeDistDriveCaller::bIsDifferentiable ( void  ) const
virtual

Reimplemented from DriveCaller.

Definition at line 181 of file module-nodedistdrive.cc.

182 {
183  return true;
184 }
doublereal NodeDistDriveCaller::dGet ( const doublereal dVar) const
inlinevirtual

Implements DriveCaller.

Definition at line 163 of file module-nodedistdrive.cc.

References dGetP().

164 {
165  return dGetP();
166 }
virtual doublereal dGetP(void) const

Here is the call graph for this function:

doublereal NodeDistDriveCaller::dGet ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 169 of file module-nodedistdrive.cc.

References Vec3::Dot(), e1, StructNode::GetRCurr(), StructDispNode::GetXCurr(), Mat3x3::MulTV(), o1, o2, pNode1, and pNode2.

170 {
171  const Vec3& X1 = pNode1->GetXCurr();
172  const Mat3x3& R1 = pNode1->GetRCurr();
173  const Vec3& X2 = pNode2->GetXCurr();
174  const Mat3x3& R2 = pNode2->GetRCurr();
175 
176  const doublereal dX = e1.Dot(R2.MulTV(X2 - X1 - R1 * o1) + o2);
177 
178  return dX;
179 }
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const StructNode *const pNode2
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
double doublereal
Definition: colamd.c:52
const StructNode *const pNode1

Here is the call graph for this function:

doublereal NodeDistDriveCaller::dGetP ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 186 of file module-nodedistdrive.cc.

References Vec3::Cross(), Vec3::Dot(), e1, StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), Mat3x3::MulTV(), o1, pNode1, and pNode2.

Referenced by dGet(), and dGetP().

187 {
188  const Vec3& X1 = pNode1->GetXCurr();
189  const Vec3& X1Dot = pNode1->GetVCurr();
190  const Mat3x3& R1 = pNode1->GetRCurr();
191  const Vec3& omega1 = pNode1->GetWCurr();
192 
193  const Vec3& X2 = pNode2->GetXCurr();
194  const Vec3& X2Dot = pNode2->GetVCurr();
195  const Mat3x3& R2 = pNode2->GetRCurr();
196  const Vec3& omega2 = pNode2->GetWCurr();
197 
198  const doublereal dXP = e1.Dot(R2.MulTV(-omega2.Cross(X2 - X1 - R1 * o1) + X2Dot - X1Dot - omega1.Cross(R1 * o1)));
199 
200  return dXP;
201 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const StructNode *const pNode2
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
double doublereal
Definition: colamd.c:52
const StructNode *const pNode1

Here is the call graph for this function:

doublereal NodeDistDriveCaller::dGetP ( const doublereal dVar) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 203 of file module-nodedistdrive.cc.

References dGetP().

204 {
205  return dGetP();
206 }
virtual doublereal dGetP(void) const

Here is the call graph for this function:

DriveCaller * NodeDistDriveCaller::pCopy ( void  ) const
virtual

Implements DriveCaller.

Definition at line 230 of file module-nodedistdrive.cc.

References e1, NodeDistDriveCaller(), o1, o2, DriveCaller::pDrvHdl, pNode1, pNode2, and SAFENEWWITHCONSTRUCTOR.

231 {
232  DriveCaller* pDC = NULL;
233 
237  pDrvHdl,
238  pNode1, o1,
239  pNode2, o2,
240  e1));
241 
242  return pDC;
243 }
NodeDistDriveCaller(const DriveHandler *pDH, const StructNode *pNode1, const Vec3 &o1, const StructNode *pNode2, const Vec3 &o2, const Vec3 &e1)
const StructNode *const pNode2
DriveHandler * pDrvHdl
Definition: drive.h:444
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
const StructNode *const pNode1

Here is the call graph for this function:

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

Implements DriveCaller.

Definition at line 248 of file module-nodedistdrive.cc.

References e1, WithLabel::GetLabel(), o1, o2, pNode1, and pNode2.

249 {
250  out << "node distance,"
251  << pNode1->GetLabel() << ","
252  << o1 << ","
253  << pNode2->GetLabel() << ","
254  << o2 << ","
255  << e1;
256 
257  return out;
258 }
const StructNode *const pNode2
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode *const pNode1

Here is the call graph for this function:

Member Data Documentation

const Vec3 NodeDistDriveCaller::e1
private

Definition at line 86 of file module-nodedistdrive.cc.

Referenced by dGet(), dGetP(), pCopy(), and Restart().

const Vec3 NodeDistDriveCaller::o1
private

Definition at line 83 of file module-nodedistdrive.cc.

Referenced by dGet(), dGetP(), pCopy(), and Restart().

const Vec3 NodeDistDriveCaller::o2
private

Definition at line 85 of file module-nodedistdrive.cc.

Referenced by dGet(), pCopy(), and Restart().

const StructNode* const NodeDistDriveCaller::pNode1
private

Definition at line 82 of file module-nodedistdrive.cc.

Referenced by dGet(), dGetP(), pCopy(), and Restart().

const StructNode* const NodeDistDriveCaller::pNode2
private

Definition at line 84 of file module-nodedistdrive.cc.

Referenced by dGet(), dGetP(), pCopy(), and Restart().


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