| 47 |  |  | 
| 48 |  | Rattle::Rattle(SimInfo* info) : info_(info), maxConsIteration_(10), consTolerance_(1.0e-6), doRattle_(false) { | 
| 49 |  |  | 
| 50 | < | if (info_->getNConstraints() > 0) | 
| 50 | > | if (info_->getNGlobalConstraints() > 0) | 
| 51 |  | doRattle_ = true; | 
| 52 |  |  | 
| 53 |  | Globals* simParams = info_->getSimParams(); | 
| 56 |  | dt_ = simParams->getDt(); | 
| 57 |  | } else { | 
| 58 |  | sprintf(painCave.errMsg, | 
| 59 | < | "Integrator Error: dt is not set\n"); | 
| 59 | > | "Rattle Error: dt is not set\n"); | 
| 60 |  | painCave.isFatal = 1; | 
| 61 |  | simError(); | 
| 62 |  | } | 
| 63 | + |  | 
| 64 |  | currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot(); | 
| 65 |  | if (simParams->haveConstraintTime()){ | 
| 66 |  | constraintTime_ = simParams->getConstraintTime(); |