ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/constraints/Shake.cpp
(Generate patch)

Comparing trunk/src/constraints/Shake.cpp (file contents):
Revision 1982 by gezelter, Tue Apr 15 12:12:23 2014 UTC vs.
Revision 1989 by gezelter, Fri Apr 18 20:07:09 2014 UTC

# Line 45 | Line 45 | namespace OpenMD {
45   #include "utils/simError.h"
46   namespace OpenMD {
47  
48 <  Shake::Shake(SimInfo* info) : info_(info), maxConsIteration_(10), consTolerance_(1.0e-6), doShake_(false) {
48 >  Shake::Shake(SimInfo* info) : info_(info), maxConsIteration_(10),
49 >                                consTolerance_(1.0e-6), doShake_(false),
50 >                                currConstraintTime_(0.0)  {
51      
52      if (info_->getNGlobalConstraints() > 0)
53        doShake_ = true;
54      
55 +    if (!doShake_) return;
56 +
57      Globals* simParams = info_->getSimParams();
58  
59      currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
# Line 59 | Line 63 | namespace OpenMD {
63        constraintTime_ = simParams->getStatusTime();
64      }
65  
66 <    constraintOutputFile_ = getPrefix(info_->getFinalConfigFileName()) + ".constraintForces";
66 >    constraintOutputFile_ = getPrefix(info_->getFinalConfigFileName()) +
67 >      ".constraintForces";
68  
69      // create ConstraintWriter  
70 <    constraintWriter_ = new ConstraintWriter(info_, constraintOutputFile_.c_str());  
70 >    constraintWriter_ = new ConstraintWriter(info_,
71 >                                             constraintOutputFile_.c_str());  
72  
73      if (!constraintWriter_){
74        sprintf(painCave.errMsg, "Failed to create ConstraintWriter\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines