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

#include <TimeStepControl.h>

Inheritance diagram for NoChange:
Collaboration diagram for NoChange:

Public Member Functions

 NoChange (Solver *s)
 
 ~NoChange (void)
 
doublereal dGetNewStepTime (StepIntegrator::StepChange currStep, doublereal iPerformedIters)
 
void SetDriveHandler (const DriveHandler *driveHandler)
 
void Init (integer iMaxIterations, doublereal dMinTimeStep, const DriveOwner &MaxTimeStep, doublereal dInitialTimeStep)
 
- Public Member Functions inherited from TimeStepControl
 TimeStepControl (void)
 
virtual ~TimeStepControl (void)
 

Private Attributes

Solvers
 

Additional Inherited Members

- Protected Attributes inherited from TimeStepControl
doublereal dCurrTimeStep
 

Detailed Description

Definition at line 72 of file TimeStepControl.h.

Constructor & Destructor Documentation

NoChange::NoChange ( Solver s)

Definition at line 58 of file TimeStepControl.cc.

References NO_OP.

58  : s(s) {
59  NO_OP;
60 }
#define NO_OP
Definition: myassert.h:74
Solver * s
NoChange::~NoChange ( void  )
inline

Definition at line 78 of file TimeStepControl.h.

References NO_OP.

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

Member Function Documentation

doublereal NoChange::dGetNewStepTime ( StepIntegrator::StepChange  currStep,
doublereal  iPerformedIters 
)
virtual

Implements TimeStepControl.

Definition at line 63 of file TimeStepControl.cc.

References TimeStepControl::dCurrTimeStep.

64 {
65  return dCurrTimeStep;
66 }
doublereal dCurrTimeStep
void NoChange::Init ( integer  iMaxIterations,
doublereal  dMinTimeStep,
const DriveOwner MaxTimeStep,
doublereal  dInitialTimeStep 
)
virtual

Implements TimeStepControl.

Definition at line 69 of file TimeStepControl.cc.

References TimeStepControl::dCurrTimeStep, DriveOwner::dGet(), and DriveOwner::pGetDriveCaller().

70 {
71  dCurrTimeStep = dInitialTimeStep;
72 
73  doublereal dInitialMaxTimeStep;
74  if (typeid(*MaxTimeStep.pGetDriveCaller()) == typeid(PostponedDriveCaller)) {
75  dInitialMaxTimeStep = std::numeric_limits<doublereal>::max();
76 
77  } else{
78  dInitialMaxTimeStep = MaxTimeStep.dGet();
79  }
80 
81  if (dMinTimeStep > dInitialMaxTimeStep) {
82  silent_cerr("warning: minimum time step " << dMinTimeStep << " greater than maximum (initial) time step " << dInitialMaxTimeStep << " (ignored)" << std::endl);
83  }
84 
85  if (dInitialTimeStep < dMinTimeStep) {
86  silent_cerr("warning: (constant) time step " << dInitialTimeStep << " less than minimum time step " << dMinTimeStep << " (ignored)" << std::endl);
87  }
88 
89  if (dInitialTimeStep > dInitialMaxTimeStep) {
90  silent_cerr("warning: (constant) time step " << dInitialTimeStep << " greater than maximum (initial) time step " << dInitialMaxTimeStep << " (ignored)" << std::endl);
91  }
92 }
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
doublereal dCurrTimeStep
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

void NoChange::SetDriveHandler ( const DriveHandler driveHandler)
inlinevirtual

Implements TimeStepControl.

Definition at line 80 of file TimeStepControl.h.

References NO_OP.

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

Member Data Documentation

Solver* NoChange::s
private

Definition at line 74 of file TimeStepControl.h.


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