ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NVT.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/NVT.cpp (file contents):
Revision 1125 by gezelter, Mon Apr 19 22:13:01 2004 UTC vs.
Revision 1268 by tim, Fri Jun 11 17:16:21 2004 UTC

# Line 50 | Line 50 | template<typename T> NVT<T>::NVT ( SimInfo *theInfo, F
50      }
51    }
52  
53
54  std::cerr << "building oldVel with \t" << integrableObjects.size() << "\n";
53    oldVel = new double[3*integrableObjects.size()];
54    oldJi = new double[3*integrableObjects.size()];
55   }
# Line 113 | Line 111 | template<typename T> void NVT<T>::moveA() {
111      }
112    }
113  
114 <  if (nConstrained){
117 <    constrainA();
118 <  }
114 >  consFramework->doConstrainA();
115  
116    // Finally, evolve chi a half step (just like a velocity) using
117    // temperature at time t, not time t+dt/2
118  
119 <  std::cerr << "targetTemp = " << targetTemp << " instTemp = " << instTemp << " tauThermostat = " << tauThermostat << " integral of Chi = " << integralOfChidt << "\n";
119 >  //std::cerr << "targetTemp = " << targetTemp << " instTemp = " << instTemp << " tauThermostat = " << tauThermostat << " integral of Chi = " << integralOfChidt << "\n";
120    
121    chi += dt2 * ( instTemp / targetTemp - 1.0) / (tauThermostat*tauThermostat);
122    integralOfChidt += chi*dt2;
# Line 195 | Line 191 | template<typename T> void NVT<T>::moveB( void ){
191        }
192      }
193  
194 <    if (nConstrained){
199 <      constrainB();
200 <    }
194 >    consFramework->doConstrainB();
195  
196      if (fabs(prevChi - chi) <= chiTolerance) break;
197    }
# Line 222 | Line 216 | template<typename T> int NVT<T>::readyCheck() {
216  
217    if (!have_target_temp) {
218      sprintf( painCave.errMsg,
219 <             "NVT error: You can't use the NVT integrator without a targetTemp!\n"
219 >             "You can't use the NVT integrator without a targetTemp!\n"
220               );
221      painCave.isFatal = 1;
222 +    painCave.severity = OOPSE_ERROR;
223      simError();
224      return -1;
225    }
# Line 233 | Line 228 | template<typename T> int NVT<T>::readyCheck() {
228  
229    if (!have_tau_thermostat) {
230      sprintf( painCave.errMsg,
231 <             "NVT error: If you use the constant temperature\n"
232 <             "   integrator, you must set tauThermostat.\n");
231 >             "If you use the constant temperature\n"
232 >             "\tintegrator, you must set tauThermostat.\n");
233 >    painCave.severity = OOPSE_ERROR;
234      painCave.isFatal = 1;
235      simError();
236      return -1;
# Line 242 | Line 238 | template<typename T> int NVT<T>::readyCheck() {
238  
239    if (!have_chi_tolerance) {
240      sprintf( painCave.errMsg,
241 <             "NVT warning: setting chi tolerance to 1e-6\n");
241 >             "In NVT integrator: setting chi tolerance to 1e-6\n");
242      chiTolerance = 1e-6;
243      have_chi_tolerance = 1;
244 +    painCave.severity = OOPSE_INFO;
245      painCave.isFatal = 0;
246      simError();
247    }
# Line 261 | Line 258 | template<typename T> double NVT<T>::getConservedQuanti
258    double thermostat_kinetic;
259    double thermostat_potential;
260  
261 <  fkBT = (double)(info->getNDF()    ) * kB * targetTemp;
261 >  fkBT = (double)(info->ndf) * kB * targetTemp;
262  
263    Energy = tStats->getTotalE();
264  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines