MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
TimeStepControl.h File Reference
#include "mbconfig.h"
#include <map>
#include "solver.h"
#include "drive_.h"
Include dependency graph for TimeStepControl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TimeStepControl
 
class  TimeStepRead
 
class  NoChange
 
class  ChangeStep
 
class  Factor
 

Functions

void InitTimeStepData (void)
 
void DestroyTimeStepData (void)
 
TimeStepControlReadTimeStepData (Solver *s, MBDynParser &HP)
 

Function Documentation

void DestroyTimeStepData ( void  )

Definition at line 371 of file TimeStepControl.cc.

References TimeStepReadMap.

Referenced by Solver::~Solver().

372 {
373  for (TimeStepFuncMapType::iterator it = TimeStepReadMap.begin(); it != TimeStepReadMap.end(); ++it) {
374  delete it->second;
375  }
376  TimeStepReadMap.clear();
377 }
TimeStepFuncMapType TimeStepReadMap
void InitTimeStepData ( void  )

Definition at line 363 of file TimeStepControl.cc.

References SetTimeStepData().

Referenced by Solver::Solver().

364 {
365  SetTimeStepData("no" "change", new NoChangeTSR);
366  SetTimeStepData("change", new ChangeStepTSR);
367  SetTimeStepData("factor", new FactorTSR);
368 }
bool SetTimeStepData(const char *name, TimeStepRead *sr)

Here is the call graph for this function:

TimeStepControl* ReadTimeStepData ( Solver s,
MBDynParser HP 
)

Definition at line 380 of file TimeStepControl.cc.

References ASSERT, func(), HighParser::IsWord(), and TimeStepReadMap.

Referenced by InverseSolver::ReadData(), and Solver::ReadData().

381 {
382  const char *str = HP.IsWord(TimeStepWordSet);
383  TimeStepFuncMapType::iterator func = TimeStepReadMap.find(std::string(str));
384  if (func == TimeStepReadMap.end()) {
385  silent_cerr("unknown TimeStepControl type " << s << "; using \"no change\"" << std::endl);
386  func = TimeStepReadMap.find(std::string("no" "change"));
387  }
388  ASSERT(func != TimeStepReadMap.end());
389  return func->second->Read(s, HP);
390 }
virtual const char * IsWord(const HighParser::WordSet &ws)
Definition: parser.cc:977
TimeStepFuncMapType TimeStepReadMap
void func(const T &u, const T &v, const T &w, doublereal e, T &f)
#define ASSERT(expression)
Definition: colamd.c:977
TimeStepWordSetType TimeStepWordSet

Here is the call graph for this function: