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

Comparing trunk/OOPSE/libmdtools/NPTfm.cpp (file contents):
Revision 762 by mmeineke, Thu Sep 4 21:48:35 2003 UTC vs.
Revision 763 by tim, Mon Sep 15 16:52:02 2003 UTC

# Line 29 | Line 29 | template<typename T> NPTfm<T>::NPTfm ( SimInfo *theInf
29   {
30    int i, j;
31    chi = 0.0;
32 <
32 >  integralOfChidt = 0.0;
33 >  
34    for(i = 0; i < 3; i++)
35      for (j = 0; j < 3; j++)
36        eta[i][j] = 0.0;
# Line 396 | Line 397 | template<typename T> int NPTfm<T>::readyCheck() {
397  
398    return 1;
399   }
400 +
401 + template<typename T> double NPTfm<T>::getConservedQuantity(void){
402 +
403 +  double conservedQuantity;
404 +  double tb2;
405 +  double trEta;
406 +
407 +  //HNVE
408 +  conservedQuantity = tStats->getTotalE();
409 +
410 +  //HNVT
411 +  conservedQuantity += (info->getNDF() * kB * targetTemp *
412 +                        (integralOfChidt + tauThermostat * tauThermostat * chi * chi / 2.0)) / eConvert ;
413 +
414 +  //HNPT
415 +  tb2 = tauBarostat *tauBarostat;
416 +
417 +  trEta = info->matTrace3(eta);
418 +  
419 +  conservedQuantity += (targetPressure * tStats->getVolume() / p_convert +
420 +                        3*NkBT/2 * tb2 * trEta * trEta) / eConvert;
421 +  
422 +  return conservedQuantity;
423 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines