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 843 by mmeineke, Wed Oct 29 20:41:39 2003 UTC vs.
Revision 1057 by tim, Tue Feb 17 19:23:44 2004 UTC

# Line 7 | Line 7
7   #include <unistd.h>
8   #endif //is_mpi
9  
10 + #ifdef PROFILE
11 + #include "mdProfile.hpp"
12 + #endif // profile
13 +
14   #include "Integrator.hpp"
15   #include "simError.h"
16  
# Line 64 | Line 68 | template<typename T> void Integrator<T>::checkConstrai
68  
69    SRI** theArray;
70    for (int i = 0; i < nMols; i++){
71 <    theArray = (SRI * *) molecules[i].getMyBonds();
71 >
72 >          theArray = (SRI * *) molecules[i].getMyBonds();
73      for (int j = 0; j < molecules[i].getNBonds(); j++){
74        constrained = theArray[j]->is_constrained();
75  
# Line 110 | Line 115 | template<typename T> void Integrator<T>::checkConstrai
115      }
116    }
117  
118 +
119    if (nConstrained > 0){
120      isConstrained = 1;
121  
# Line 131 | Line 137 | template<typename T> void Integrator<T>::checkConstrai
137      }
138  
139  
140 <    // save oldAtoms to check for lode balanceing later on.
140 >    // save oldAtoms to check for lode balancing later on.
141  
142      oldAtoms = nAtoms;
143  
# Line 176 | Line 182 | template<typename T> void Integrator<T>::integrate(voi
182  
183    calcForce(1, 1);
184  
185 +  //temp test
186 +  tStats->getPotential();
187 +  
188    if (nConstrained){
189      preMove();
190      constrainA();
# Line 209 | Line 218 | template<typename T> void Integrator<T>::integrate(voi
218        calcStress = 1;
219      }
220  
221 + #ifdef PROFILE
222 +    startProfile( pro1 );
223 + #endif
224 +    
225      integrateStep(calcPot, calcStress);
226  
227 + #ifdef PROFILE
228 +    endProfile( pro1 );
229 +
230 +    startProfile( pro2 );
231 + #endif // profile
232 +
233      info->incrTime(dt);
234  
235      if (info->setTemp){
# Line 238 | Line 257 | template<typename T> void Integrator<T>::integrate(voi
257          currReset += resetTime;
258        }
259      }
260 +    
261 + #ifdef PROFILE
262 +    endProfile( pro2 );
263 + #endif //profile
264  
265   #ifdef IS_MPI
266      strcpy(checkPointMsg, "successfully took a time step.");
# Line 245 | Line 268 | template<typename T> void Integrator<T>::integrate(voi
268   #endif // is_mpi
269    }
270  
248
249  // write the last frame
250  dumpOut->writeDump(info->getTime());
251
271    delete dumpOut;
272    delete statOut;
273   }
# Line 256 | Line 275 | template<typename T> void Integrator<T>::integrateStep
275   template<typename T> void Integrator<T>::integrateStep(int calcPot,
276                                                         int calcStress){
277    // Position full step, and velocity half step
278 +
279 + #ifdef PROFILE
280 +  startProfile(pro3);
281 + #endif //profile
282 +
283    preMove();
284  
285 <  moveA();
285 > #ifdef PROFILE
286 >  endProfile(pro3);
287  
288 +  startProfile(pro4);
289 + #endif // profile
290 +
291 +  moveA();
292  
293 + #ifdef PROFILE
294 +  endProfile(pro4);
295 +  
296 +  startProfile(pro5);
297 + #endif//profile
298  
299  
300   #ifdef IS_MPI
# Line 277 | Line 311 | template<typename T> void Integrator<T>::integrateStep
311    strcpy(checkPointMsg, "Succesful doForces\n");
312    MPIcheckPoint();
313   #endif // is_mpi
314 +
315 + #ifdef PROFILE
316 +  endProfile( pro5 );
317  
318 +  startProfile( pro6 );
319 + #endif //profile
320  
321    // finish the velocity  half step
322  
323    moveB();
285
324  
325 + #ifdef PROFILE
326 +  endProfile(pro6);
327 + #endif // profile
328  
329   #ifdef IS_MPI
330    strcpy(checkPointMsg, "Succesful moveB\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines