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

#include <drive_.h>

Inheritance diagram for CubicDriveCaller:
Collaboration diagram for CubicDriveCaller:

Public Member Functions

 CubicDriveCaller (const DriveHandler *pDH, doublereal d0, doublereal d1, doublereal d2, doublereal d3)
 
virtual ~CubicDriveCaller (void)
 
virtual DriveCallerpCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
doublereal dGet (const doublereal &dVar) const
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal dGetP (const doublereal &dVar) const
 
- Public Member Functions inherited from DriveCaller
 DriveCaller (const DriveHandler *pDH)
 
virtual ~DriveCaller (void)
 
virtual doublereal dGet (void) const
 
virtual doublereal dGetP (void) const
 
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

doublereal dC0
 
doublereal dC1
 
doublereal dC2
 
doublereal dC3
 

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 381 of file drive_.h.

Constructor & Destructor Documentation

CubicDriveCaller::CubicDriveCaller ( const DriveHandler pDH,
doublereal  d0,
doublereal  d1,
doublereal  d2,
doublereal  d3 
)

Definition at line 350 of file drive_.cc.

References NO_OP.

Referenced by pCopy().

353 : DriveCaller(pDH), dC0(d0), dC1(d1), dC2(d2), dC3(d3)
354 {
355  NO_OP;
356 }
#define NO_OP
Definition: myassert.h:74
doublereal dC2
Definition: drive_.h:385
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
doublereal dC3
Definition: drive_.h:386
doublereal dC0
Definition: drive_.h:383
doublereal dC1
Definition: drive_.h:384
CubicDriveCaller::~CubicDriveCaller ( void  )
virtual

Definition at line 358 of file drive_.cc.

References NO_OP.

359 {
360  NO_OP;
361 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool CubicDriveCaller::bIsDifferentiable ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 420 of file drive_.h.

421 {
422  return true;
423 }
doublereal CubicDriveCaller::dGet ( const doublereal dVar) const
inlinevirtual

Implements DriveCaller.

Definition at line 414 of file drive_.h.

References dC0, dC1, dC2, and dC3.

415 {
416  return dC0 + dVar*(dC1 + dVar*(dC2 + dVar*dC3));
417 }
doublereal dC2
Definition: drive_.h:385
doublereal dC3
Definition: drive_.h:386
doublereal dC0
Definition: drive_.h:383
doublereal dC1
Definition: drive_.h:384
doublereal CubicDriveCaller::dGetP ( const doublereal dVar) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 426 of file drive_.h.

References dC1, dC2, and dC3.

427 {
428  return dC1 + dVar*(2*dC2 + dVar*3*dC3);
429 }
doublereal dC2
Definition: drive_.h:385
doublereal dC3
Definition: drive_.h:386
doublereal dC1
Definition: drive_.h:384
DriveCaller * CubicDriveCaller::pCopy ( void  ) const
virtual

Implements DriveCaller.

Definition at line 365 of file drive_.cc.

References CubicDriveCaller(), dC0, dC1, dC2, dC3, DriveCaller::pDrvHdl, and SAFENEWWITHCONSTRUCTOR.

366 {
367  DriveCaller* pDC = 0;
369  return pDC;
370 }
CubicDriveCaller(const DriveHandler *pDH, doublereal d0, doublereal d1, doublereal d2, doublereal d3)
Definition: drive_.cc:350
doublereal dC2
Definition: drive_.h:385
doublereal dC3
Definition: drive_.h:386
DriveHandler * pDrvHdl
Definition: drive.h:444
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
doublereal dC0
Definition: drive_.h:383
doublereal dC1
Definition: drive_.h:384

Here is the call graph for this function:

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

Implements DriveCaller.

Definition at line 374 of file drive_.cc.

References dC0, dC1, dC2, and dC3.

375 {
376  return out << " cubic, "
377  << dC0 << ", " << dC1 << ", " << dC2 << ", " << dC3;
378 }
doublereal dC2
Definition: drive_.h:385
doublereal dC3
Definition: drive_.h:386
doublereal dC0
Definition: drive_.h:383
doublereal dC1
Definition: drive_.h:384

Member Data Documentation

doublereal CubicDriveCaller::dC0
private

Definition at line 383 of file drive_.h.

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

doublereal CubicDriveCaller::dC1
private

Definition at line 384 of file drive_.h.

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

doublereal CubicDriveCaller::dC2
private

Definition at line 385 of file drive_.h.

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

doublereal CubicDriveCaller::dC3
private

Definition at line 386 of file drive_.h.

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


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