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

#include <drive.h>

Inheritance diagram for DriveCaller:
Collaboration diagram for DriveCaller:

Public Types

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 }
 

Public Member Functions

 DriveCaller (const DriveHandler *pDH)
 
virtual ~DriveCaller (void)
 
virtual DriveCallerpCopy (void) const =0
 
virtual std::ostream & Restart (std::ostream &out) const =0
 
virtual doublereal dGet (const doublereal &dVar) const =0
 
virtual doublereal dGet (void) const
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal dGetP (const doublereal &dVar) 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)
 

Protected Attributes

DriveHandlerpDrvHdl
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Detailed Description

Definition at line 442 of file drive.h.

Member Enumeration Documentation

Enumerator
OUTPUT_VALUE 
OUTPUT_DERIVATIVE 

Definition at line 447 of file drive.h.

Enumerator
TRACE_VALUE 
TRACE_DERIVATIVE 

Definition at line 452 of file drive.h.

Constructor & Destructor Documentation

DriveCaller::DriveCaller ( const DriveHandler pDH)

Definition at line 475 of file drive.cc.

References NO_OP.

476 : pDrvHdl(const_cast<DriveHandler *>(pDH))
477 {
478  NO_OP;
479 }
#define NO_OP
Definition: myassert.h:74
DriveHandler * pDrvHdl
Definition: drive.h:444
DriveCaller::~DriveCaller ( void  )
virtual

Definition at line 481 of file drive.cc.

References NO_OP.

482 {
483  NO_OP;
484 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

virtual doublereal DriveCaller::dGet ( const doublereal dVar) const
pure virtual

Implemented in PostponedDriveCaller, PeriodicDriveCaller, DriveArrayCaller, PiecewiseLinearDriveCaller, DirectDriveCaller, ClosestNextDriveCaller, MeterDriveCaller, RandDriveCaller, ExpDriveCaller, FreqSweepDriveCaller, ScalarFunctionDriveCaller, FourierSeriesDriveCaller, TanhDriveCaller, CosineDriveCaller, SineDriveCaller, DoubleRampDriveCaller, ConstDriveCaller, OneDriveCaller, RampDriveCaller, NullDriveCaller, DoubleStepDriveCaller, StepDriveCaller, CubicDriveCaller, ParabolicDriveCaller, LinearDriveCaller, MultDriveCaller, TimeStepDriveCaller, TimeDriveCaller, StringDriveCaller, FileDriveCaller, NodeDistDriveCaller, SwitchDriveCaller, GiNaCDriveCaller, MultiStepDrive, DriveDriveCaller, PrivDriveCaller, MinMaxDriveCaller, SHDriveCaller, DofDriveCaller, and DummyDriveCaller.

Referenced by TheodorsenAeroData::AfterConvergence(), DistanceJoint::AssJac(), DistanceJointWithOffset::AssJac(), Wheel4::AssJac(), ThermalSource::AssRes(), DistanceJoint::AssRes(), Control_valve::AssRes(), Wheel2::AssRes(), AbstractForce::AssRes(), DistanceJointWithOffset::AssRes(), TheodorsenAeroData::AssRes(), AbstractInternalForce::AssRes(), Dynamic_control_valve::AssRes(), Wheel4::AssRes(), Pressure_flow_control_valve::AssRes(), AxialRotationJoint::AssRes(), DofDriveCaller::dGet(), DriveDriveCaller::dGet(), PrivDriveCaller::dGet(), SwitchDriveCaller::dGet(), DriveOwner::dGet(), MultDriveCaller::dGet(), FreqSweepDriveCaller::dGet(), PeriodicDriveCaller::dGet(), ChangeStep::dGetNewStepTime(), MultDriveCaller::dGetP(), FreqSweepDriveCaller::dGetP(), ScalarDriveValue::dGetValue(), drive(), DrivenElem::DrivenElem(), StdAirProperties::GetAirProps(), DistanceJoint::InitialAssJac(), DistanceJointWithOffset::InitialAssJac(), DistanceJoint::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), AxialRotationJoint::InitialAssRes(), Motor::Motor(), DataManager::Output(), SolverDiagnostics::outputMeter(), AeroMemory::Predict(), Control_valve2::Prepare(), ReadVariableBody(), DistanceJoint::SetInitialValue(), DistanceJointWithOffset::SetInitialValue(), DistanceJoint::SetValue(), DistanceJointWithOffset::SetValue(), and BiStopCLWrapper< T, Tder >::Update().

doublereal DriveCaller::dGet ( void  ) const
inlinevirtual

Reimplemented in PostponedDriveCaller, PeriodicDriveCaller, DriveArrayCaller, ConstDriveCaller, OneDriveCaller, NullDriveCaller, MultDriveCaller, TimeStepDriveCaller, TimeDriveCaller, StringDriveCaller, NodeDistDriveCaller, DriveDriveCaller, PrivDriveCaller, SHDriveCaller, DofDriveCaller, MinMaxDriveCaller, and DummyDriveCaller.

Definition at line 489 of file drive.h.

References DriveHandler::dGetTime(), and Drive::pDrvHdl.

Referenced by Output(), and Trace().

490 {
491  return dGet(pDrvHdl->dGetTime());
492 }
DriveHandler * pDrvHdl
Definition: drive.h:444
virtual doublereal dGet(void) const
Definition: drive.h:489
doublereal dGetTime(void) const
Definition: drive.h:386

Here is the call graph for this function:

doublereal DriveCaller::dGetP ( void  ) const
inlinevirtual

Reimplemented in ConstDriveCaller, OneDriveCaller, NullDriveCaller, TimeDriveCaller, NodeDistDriveCaller, DriveDriveCaller, MinMaxDriveCaller, and DummyDriveCaller.

Definition at line 501 of file drive.h.

References DriveHandler::dGetTime(), and Drive::pDrvHdl.

Referenced by Output(), and Trace().

502 {
503  return dGetP(pDrvHdl->dGetTime());
504 }
DriveHandler * pDrvHdl
Definition: drive.h:444
virtual doublereal dGetP(void) const
Definition: drive.h:501
doublereal dGetTime(void) const
Definition: drive.h:386

Here is the call graph for this function:

void DriveCaller::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 506 of file drive.cc.

References ASSERT, bIsDifferentiable(), dGet(), dGetP(), OutputHandler::DRIVECALLERS, OutputHandler::DriveCallers(), ToBeOutput::fToBeOutput(), WithLabel::GetLabel(), OUTPUT_DERIVATIVE, OUTPUT_VALUE, and OutputHandler::UseText().

507 {
508  const flag fOut = fToBeOutput();
509 
510  if (fOut & flag(1)) {
512  std::ostream& os = OH.DriveCallers();
513 
514  os << GetLabel();
515 
516  if (fOut & OUTPUT_VALUE) {
517  os << ' ' << dGet();
518  }
519 
520  if (fOut & OUTPUT_DERIVATIVE) {
522 
523  os << ' ' << dGetP();
524  }
525 
526  os << std::endl;
527  }
528  }
529 }
long int flag
Definition: mbdyn.h:43
virtual bool bIsDifferentiable(void) const
Definition: drive.h:495
#define ASSERT(expression)
Definition: colamd.c:977
virtual doublereal dGet(void) const
Definition: drive.h:489
std::ostream & DriveCallers(void) const
Definition: output.h:601
virtual doublereal dGetP(void) const
Definition: drive.h:501
virtual flag fToBeOutput(void) const
Definition: output.cc:884
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:

virtual DriveCaller* DriveCaller::pCopy ( void  ) const
pure virtual
const DriveHandler * DriveCaller::pGetDrvHdl ( void  ) const
virtual

Definition at line 493 of file drive.cc.

References pDrvHdl.

Referenced by PostponedDriveCaller::Check(), MultiStepDrive::pCopy(), and SwitchDriveCaller::pCopy().

494 {
495  return pDrvHdl;
496 }
DriveHandler * pDrvHdl
Definition: drive.h:444
virtual std::ostream& DriveCaller::Restart ( std::ostream &  out) const
pure virtual

Implemented in PostponedDriveCaller, PeriodicDriveCaller, DriveArrayCaller, PiecewiseLinearDriveCaller, DirectDriveCaller, ClosestNextDriveCaller, MeterDriveCaller, RandDriveCaller, ExpDriveCaller, FreqSweepDriveCaller, ScalarFunctionDriveCaller, FourierSeriesDriveCaller, TanhDriveCaller, CosineDriveCaller, SineDriveCaller, DoubleRampDriveCaller, ConstDriveCaller, OneDriveCaller, RampDriveCaller, NullDriveCaller, DoubleStepDriveCaller, StepDriveCaller, CubicDriveCaller, ParabolicDriveCaller, LinearDriveCaller, MultDriveCaller, TimeStepDriveCaller, TimeDriveCaller, FileDriveCaller, StringDriveCaller, NodeDistDriveCaller, SwitchDriveCaller, MultiStepDrive, GiNaCDriveCaller, DriveDriveCaller, PrivDriveCaller, SHDriveCaller, MinMaxDriveCaller, DofDriveCaller, and DummyDriveCaller.

Referenced by Vec3DriveOwner::Restart(), DofDriveCaller::Restart(), SHDriveCaller::Restart(), DriveDriveCaller::Restart(), PrivDriveCaller::Restart(), DistanceJoint::Restart(), LinearVelocityJoint::Restart(), DrivenElem::Restart(), Gust1D::Restart(), VariableBody::Restart(), MusclePennestriCL::Restart(), PowerLawWindProfile::Restart(), BasicAirProperties::Restart(), HydrodynamicPlainBearing::Restart(), Motor::Restart(), asynchronous_machine::Restart(), SingleTplDriveCaller< T >::Restart(), LogarithmicWindProfile::Restart(), StdAirProperties::Restart(), AbstractForce::Restart(), AngularVelocityJoint::Restart(), DistanceJointWithOffset::Restart(), SingleTplDriveCaller< doublereal >::Restart(), AbstractInternalForce::Restart(), MultDriveCaller::Restart(), AerodynamicBody::Restart(), UniformRotor::Restart(), Solver::Restart(), AerodynamicBeam::Restart(), AxialRotationJoint::Restart(), GlauertRotor::Restart(), AerodynamicBeam2::Restart(), ManglerRotor::Restart(), FreqSweepDriveCaller::Restart(), ClosestNextDriveCaller::Restart(), LTVViscoElasticGenericConstitutiveLaw< T, Tder >::Restart(), PeriodicDriveCaller::Restart(), PostponedDriveCaller::Restart(), BiStopCLWrapper< T, Tder >::Restart(), SingleTplDriveCaller< T >::Restart_int(), SingleTplDriveCaller< doublereal >::Restart_int(), and MusclePennestriReflexiveCL::Restart_int().

void DriveCaller::Trace ( OutputHandler OH) const
virtual

Implements Traceable.

Definition at line 531 of file drive.cc.

References ASSERT, bIsDifferentiable(), dGet(), dGetP(), Traceable::fToBeTraced(), Traceable::fTrace, WithLabel::GetLabel(), TRACE_DERIVATIVE, TRACE_VALUE, OutputHandler::TRACES, OutputHandler::Traces(), and OutputHandler::UseText().

532 {
533  const flag fTrace = fToBeTraced();
534 
535  if (fTrace) {
536  if (OH.UseText(OutputHandler::TRACES)) {
537  std::ostream& os = OH.Traces();
538 
539  os << GetLabel();
540 
541  if (fTrace & TRACE_VALUE) {
542  os << ' ' << dGet();
543  }
544 
545  if (fTrace & TRACE_DERIVATIVE) {
547 
548  os << ' ' << dGetP();
549  }
550 
551  os << std::endl;
552  }
553  }
554 }
long int flag
Definition: mbdyn.h:43
std::ostream & Traces(void) const
Definition: output.h:608
virtual bool bIsDifferentiable(void) const
Definition: drive.h:495
flag fTrace
Definition: output.h:697
#define ASSERT(expression)
Definition: colamd.c:977
virtual flag fToBeTraced(void) const
Definition: output.cc:914
virtual doublereal dGet(void) const
Definition: drive.h:489
virtual doublereal dGetP(void) const
Definition: drive.h:501
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:

Member Data Documentation


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