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

#include <drive_.h>

Inheritance diagram for ExpDriveCaller:
Collaboration diagram for ExpDriveCaller:

Public Member Functions

 ExpDriveCaller (const DriveHandler *pDH, doublereal dA, doublereal dT, doublereal dS, doublereal dI)
 
virtual ~ExpDriveCaller (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 dAmplitude
 
doublereal dTimeConst
 
doublereal dStartTime
 
doublereal dInitialValue
 

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

Constructor & Destructor Documentation

ExpDriveCaller::ExpDriveCaller ( const DriveHandler pDH,
doublereal  dA,
doublereal  dT,
doublereal  dS,
doublereal  dI 
)

Definition at line 855 of file drive_.cc.

References NO_OP.

Referenced by pCopy().

858 : DriveCaller(pDH),
860 {
861  NO_OP;
862 }
doublereal dAmplitude
Definition: drive_.h:1157
#define NO_OP
Definition: myassert.h:74
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
doublereal dStartTime
Definition: drive_.h:1159
doublereal dInitialValue
Definition: drive_.h:1160
const doublereal dS
Definition: beamslider.cc:71
doublereal dTimeConst
Definition: drive_.h:1158
ExpDriveCaller::~ExpDriveCaller ( void  )
virtual

Definition at line 864 of file drive_.cc.

References NO_OP.

865 {
866  NO_OP;
867 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool ExpDriveCaller::bIsDifferentiable ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 1199 of file drive_.h.

1200 {
1201  return true;
1202 }
doublereal ExpDriveCaller::dGet ( const doublereal dVar) const
inlinevirtual

Implements DriveCaller.

Definition at line 1188 of file drive_.h.

References dAmplitude, dInitialValue, dStartTime, dTimeConst, and grad::exp().

1189 {
1190  if (dVar <= dStartTime) {
1191  return dInitialValue;
1192  }
1193 
1194  return dInitialValue
1195  + dAmplitude*(1. - exp((dStartTime - dVar)/dTimeConst));
1196 }
GradientExpression< UnaryExpr< FuncExp, Expr > > exp(const GradientExpression< Expr > &u)
Definition: gradient.h:2975
doublereal dAmplitude
Definition: drive_.h:1157
doublereal dStartTime
Definition: drive_.h:1159
doublereal dInitialValue
Definition: drive_.h:1160
doublereal dTimeConst
Definition: drive_.h:1158

Here is the call graph for this function:

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

Reimplemented from DriveCaller.

Definition at line 1205 of file drive_.h.

References dAmplitude, dStartTime, dTimeConst, and grad::exp().

1206 {
1207  if (dVar < dStartTime) {
1208  return 0.;
1209  }
1210 
1212  if (dVal == dStartTime) {
1213  dVal /= 2.;
1214  }
1215 
1216  return dVal;
1217 }
GradientExpression< UnaryExpr< FuncExp, Expr > > exp(const GradientExpression< Expr > &u)
Definition: gradient.h:2975
doublereal dAmplitude
Definition: drive_.h:1157
doublereal dStartTime
Definition: drive_.h:1159
doublereal dTimeConst
Definition: drive_.h:1158
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

DriveCaller * ExpDriveCaller::pCopy ( void  ) const
virtual

Implements DriveCaller.

Definition at line 871 of file drive_.cc.

References dAmplitude, dInitialValue, dStartTime, dTimeConst, ExpDriveCaller(), DriveCaller::pDrvHdl, and SAFENEWWITHCONSTRUCTOR.

872 {
873  DriveCaller* pDC = 0;
877  return pDC;
878 }
doublereal dAmplitude
Definition: drive_.h:1157
doublereal dStartTime
Definition: drive_.h:1159
ExpDriveCaller(const DriveHandler *pDH, doublereal dA, doublereal dT, doublereal dS, doublereal dI)
Definition: drive_.cc:855
DriveHandler * pDrvHdl
Definition: drive.h:444
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
doublereal dInitialValue
Definition: drive_.h:1160
doublereal dTimeConst
Definition: drive_.h:1158

Here is the call graph for this function:

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

Implements DriveCaller.

Definition at line 882 of file drive_.cc.

References dAmplitude, dInitialValue, dStartTime, and dTimeConst.

883 {
884  return out
885  << " exponential, " << dAmplitude
886  << ", " << dTimeConst
887  << ", " << dStartTime
888  << ", " << dInitialValue;
889 }
doublereal dAmplitude
Definition: drive_.h:1157
doublereal dStartTime
Definition: drive_.h:1159
doublereal dInitialValue
Definition: drive_.h:1160
doublereal dTimeConst
Definition: drive_.h:1158

Member Data Documentation

doublereal ExpDriveCaller::dAmplitude
private

Definition at line 1157 of file drive_.h.

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

doublereal ExpDriveCaller::dInitialValue
private

Definition at line 1160 of file drive_.h.

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

doublereal ExpDriveCaller::dStartTime
private

Definition at line 1159 of file drive_.h.

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

doublereal ExpDriveCaller::dTimeConst
private

Definition at line 1158 of file drive_.h.

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


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