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

Comparing trunk/OOPSE/libmdtools/Integrator.cpp (file contents):
Revision 600 by gezelter, Mon Jul 14 22:38:13 2003 UTC vs.
Revision 641 by mmeineke, Mon Jul 21 16:23:10 2003 UTC

# Line 27 | Line 27 | Integrator::Integrator( SimInfo *theInfo, ForceFields*
27  
28    nAtoms = info->n_atoms;
29  
30  std::cerr << "integ nAtoms = "  << nAtoms << "\n";
31
30    // check for constraints
31    
32    constrainedA    = NULL;
# Line 75 | Line 73 | void Integrator::checkConstraints( void ){
73        
74        constrained = theArray[j]->is_constrained();
75  
78      std::cerr << "Is the folowing bond constrained \n";
79      theArray[j]->printMe();
80      
76        if(constrained){
82        
83        std::cerr << "Yes\n";
77  
78          dummy_plug = theArray[j]->get_constraint();
79          temp_con[nConstrained].set_a( dummy_plug->get_a() );
# Line 90 | Line 83 | void Integrator::checkConstraints( void ){
83          nConstrained++;
84          constrained = 0;
85        }
93      else std::cerr << "No.\n";
86      }
87  
88      theArray = (SRI**) molecules[i].getMyBends();
# Line 175 | Line 167 | void Integrator::integrate( void ){
167    double currSample;
168    double currThermal;
169    double currStatus;
178  double currTime;
170  
171    int calcPot, calcStress;
172    int isError;
# Line 199 | Line 190 | void Integrator::integrate( void ){
190      tStats->velocitize();
191    }
192    
202  dumpOut->writeDump( 0.0 );
203  statOut->writeStat( 0.0 );
204  
193    calcPot     = 0;
194    calcStress  = 0;
195    currSample  = sampleTime;
196    currThermal = thermalTime;
197    currStatus  = statusTime;
210  currTime    = 0.0;;
198  
199 +  dumpOut->writeDump( info->currTime );
200 +  statOut->writeStat( info->currTime );
201  
202    readyCheck();
203  
# Line 218 | Line 207 | void Integrator::integrate( void ){
207    MPIcheckPoint();
208   #endif // is_mpi
209  
210 <  while( currTime < runTime ){
210 >  while( info->currTime < runTime ){
211  
212 <    if( (currTime+dt) >= currStatus ){
212 >    if( (info->currTime+dt) >= currStatus ){
213        calcPot = 1;
214        calcStress = 1;
215      }
216  
228    std::cerr << currTime << "\n";
229
217      integrateStep( calcPot, calcStress );
218        
219 <    currTime += dt;
219 >    info->currTime += dt;
220 >    info->setTime(info->currTime);
221  
222      if( info->setTemp ){
223 <      if( currTime >= currThermal ){
223 >      if( info->currTime >= currThermal ){
224          tStats->velocitize();
225          currThermal += thermalTime;
226        }
227      }
228  
229 <    if( currTime >= currSample ){
230 <      dumpOut->writeDump( currTime );
229 >    if( info->currTime >= currSample ){
230 >      dumpOut->writeDump( info->currTime );
231        currSample += sampleTime;
232      }
233  
234 <    if( currTime >= currStatus ){
235 <      statOut->writeStat( currTime );
234 >    if( info->currTime >= currStatus ){
235 >      statOut->writeStat( info->currTime );
236        calcPot = 0;
237        calcStress = 0;
238        currStatus += statusTime;
# Line 258 | Line 246 | void Integrator::integrate( void ){
246  
247    }
248  
249 <  dumpOut->writeFinal(currTime);
249 >  dumpOut->writeFinal(info->currTime);
250  
251    delete dumpOut;
252    delete statOut;
# Line 273 | Line 261 | void Integrator::integrateStep( int calcPot, int calcS
261    preMove();
262    moveA();
263    if( nConstrained ) constrainA();
264 +
265 +  
266 + #ifdef IS_MPI
267 +  strcpy( checkPointMsg, "Succesful moveA\n" );
268 +  MPIcheckPoint();
269 + #endif // is_mpi
270 +  
271  
272    // calc forces
273  
274    myFF->doForces(calcPot,calcStress);
275  
276 + #ifdef IS_MPI
277 +  strcpy( checkPointMsg, "Succesful doForces\n" );
278 +  MPIcheckPoint();
279 + #endif // is_mpi
280 +  
281 +
282    // finish the velocity  half step
283    
284    moveB();
285    if( nConstrained ) constrainB();
286 <  
286 >  
287 > #ifdef IS_MPI
288 >  strcpy( checkPointMsg, "Succesful moveB\n" );
289 >  MPIcheckPoint();
290 > #endif // is_mpi
291 >  
292 >
293   }
294  
295  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines