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

Comparing trunk/OOPSE/libmdtools/DumpWriter.cpp (file contents):
Revision 951 by mmeineke, Fri Jan 16 21:51:51 2004 UTC vs.
Revision 1078 by tim, Tue Mar 2 20:32:40 2004 UTC

# Line 1 | Line 1
1 + #define _LARGEFILE_SOURCE64
2   #define _FILE_OFFSET_BITS 64
3  
4   #include <string.h>
# Line 95 | Line 96 | void DumpWriter::sortByGlobalIndex(){
96      indexArray.push_back(make_pair(i, atoms[i]->getGlobalIndex()));
97    
98    sort(indexArray.begin(), indexArray.end(), indexSortingCriterion);    
98
99  //for (int i = 0; i < mpiSim->getMyNlocal(); i++) {
100  //  printf("node %d has global %d at local %d\n", worldRank, indexArray[i].second, indexArray[i].first);
101  //}
102    
99   }
100  
101   #endif
# Line 110 | Line 106 | void DumpWriter::writeDump(double currentTime){
106    vector<ofstream*> fileStreams;
107  
108   #ifdef IS_MPI
113  printf("Hello from node %d\n", worldRank);
114  sortByGlobalIndex();
109    if(worldRank == 0 ){
110 <    
110 > #endif    
111      finalOut.open( entry_plug->finalName, ios::out | ios::trunc );
112      if( !finalOut ){
113        sprintf( painCave.errMsg,
# Line 122 | Line 116 | void DumpWriter::writeDump(double currentTime){
116        painCave.isFatal = 1;
117        simError();
118      }
119 + #ifdef IS_MPI
120    }
121   #endif // is_mpi
122  
# Line 396 | Line 391 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
391          haveError = 0;
392          which_atom = i;
393          
399        //local_index = -1;
400
401        //for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) {
402        //  if (atoms[j]->getGlobalIndex() == which_atom) local_index = j;
403        //}
404        
405        //if (local_index != -1) {
406          
394            local_index = indexArray[currentIndex].first;        
395            
396            if (which_atom == indexArray[currentIndex].second) {
# Line 532 | Line 519 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
519          }
520          which_atom = i;
521  
535        //local_index = -1;
536
537        //for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) {
538        // if (atoms[j]->getGlobalIndex() == which_atom) local_index = j;
539        //}
540        
541        //if (local_index != -1) {
542
522          local_index = indexArray[currentIndex].first;        
523                  
524          if (which_atom == indexArray[currentIndex].second) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines