ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/Symplectic.cpp
(Generate patch)

Comparing trunk/mdtools/md_code/Symplectic.cpp (file contents):
Revision 11 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
Revision 184 by mmeineke, Thu Nov 21 20:33:06 2002 UTC

# Line 4 | Line 4
4   #include "Integrator.hpp"
5   #include "Thermo.hpp"
6   #include "ReadWrite.hpp"
7 + #include "simError.h"
8  
8
9   extern "C"{
10    
11    void v_constrain_a_( double &dt, int &n_atoms, double* mass,
# Line 120 | Line 120 | void Symplectic::integrate( void ){
120    double dt2;                       // half the dt
121  
122    double vx, vy, vz;    // the velocities
123 <  double vx2, vy2, vz2; // the square of the velocities
123 > //  double vx2, vy2, vz2; // the square of the velocities
124    double rx, ry, rz;    // the postitions
125    
126    double ji[3];   // the body frame angular momentum
# Line 129 | Line 129 | void Symplectic::integrate( void ){
129    double angle;   // the angle through which to rotate the rotation matrix
130    double A[3][3]; // the rotation matrix
131  
132 +  int time;
133  
134    double dt          = entry_plug->dt;
135    double runTime     = entry_plug->run_time;
# Line 146 | Line 147 | void Symplectic::integrate( void ){
147    StatWriter*  e_out    = new StatWriter( entry_plug );
148    DumpWriter*  dump_out = new DumpWriter( entry_plug );
149  
150 +  strcpy( checkPointMsg, "Fast foward!" );
151 +  MPIcheckPoint();
152  
153 +  strcpy( checkPointMsg, "Fast fowarding!" );
154 +  MPIcheckPoint();
155 +
156    Atom** atoms = entry_plug->atoms;
157    DirectionalAtom* dAtom;
158    dt2 = 0.5 * dt;
# Line 170 | Line 176 | void Symplectic::integrate( void ){
176      tStats->velocitize();
177    }
178    
179 +  dump_out->writeDump( 0.0 );
180 +  e_out->writeStat( 0.0 );
181 +
182    if( n_constrained ){
183  
184      double *Rx = new double[nAtoms];
# Line 358 | Line 367 | void Symplectic::integrate( void ){
367            dAtom->setJz( ji[2] );
368          }
369        }
370 <    
370 >    
371 >      time = tl + 1;
372 >      
373        if( entry_plug->setTemp ){
374 <        if( !(tl % vel_n) ) tStats->velocitize();
374 >        if( !(time % vel_n) ) tStats->velocitize();
375        }
376 <      if( !(tl % sample_n) ) dump_out->writeDump( tl * dt );
377 <      if( !(tl % status_n) ) e_out->writeStat( tl * dt );
376 >      if( !(time % sample_n) ) dump_out->writeDump( time * dt );
377 >      if( !(time % status_n) ) e_out->writeStat( time * dt );
378      }
379    }
380    else{
# Line 486 | Line 497 | void Symplectic::integrate( void ){
497          atoms[i]->set_vy( vy );
498          atoms[i]->set_vz( vz );
499          
500 <        vx2 = vx * vx;
501 <        vy2 = vy * vy;
502 <        vz2 = vz * vz;
500 > //      vx2 = vx * vx;
501 > //      vy2 = vy * vy;
502 > //      vz2 = vz * vz;
503          
504          if( atoms[i]->isDirectional() ){
505  
# Line 521 | Line 532 | void Symplectic::integrate( void ){
532            dAtom->setJz( ji[2] );
533          }
534        }
535 <    
535 >      
536 >      time = tl + 1;
537 >      
538        if( entry_plug->setTemp ){
539 <        if( !(tl % vel_n) ) tStats->velocitize();
539 >        if( !(time % vel_n) ) tStats->velocitize();
540        }
541 <      if( !(tl % sample_n) ) dump_out->writeDump( tl * dt );
542 <      if( !(tl % status_n) ) e_out->writeStat( tl * dt );
541 >      if( !(time % sample_n) ) dump_out->writeDump( time * dt );
542 >      if( !(time % status_n) ) e_out->writeStat( time * dt );
543      }
544    }
545  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines