ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/io/ZConsWriter.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/io/ZConsWriter.cpp (file contents):
Revision 1829 by tim, Thu Dec 2 05:06:26 2004 UTC vs.
Revision 1830 by tim, Thu Dec 2 05:17:10 2004 UTC

# Line 23 | Line 23 | ZConsWriter::ZConsWriter(const char* filename,  std::v
23       painCave.isFatal = 1;
24       simError();
25     }
26 <   output << "#number of z constrain molecules" << endl;
27 <   output << "#global Index of molecule\tzPos" << endl;
28 <   output << "#every frame will contain below data" <<endl;
29 <   output << "#time(fs)" << endl;
30 <   output << "#number of fixed z-constrain molecules" << endl;
31 <   output << "#global Index of molecule\tzconstrain force\tcurrentZPos" << endl;
26 >   output << "#number of z constrain molecules" << std::endl;
27 >   output << "#global Index of molecule\tzPos" << std::endl;
28 >   output << "#every frame will contain below data" <<std::endl;
29 >   output << "#time(fs)" << std::endl;
30 >   output << "#number of fixed z-constrain molecules" << std::endl;
31 >   output << "#global Index of molecule\tzconstrain force\tcurrentZPos" << std::endl;
32  
33     parameters = thePara;
34     writeZPos();
# Line 57 | Line 57 | void ZConsWriter::writeFZ(double time, int num, int* i
57   void ZConsWriter::writeFZ(double time, int num, int* index, double* fz, double* curZPos, double* zpos){
58  
59   #ifndef IS_MPI
60 <  output << time << endl;
61 <  output << num << endl;
60 >  output << time << std::endl;
61 >  output << num << std::endl;
62    
63    for(int i = 0; i < num; i++)
64 <    output << index[i] <<"\t" << fz[i] << "\t" << curZPos[i] << "\t" << zpos[i] <<endl;
64 >    output << index[i] <<"\t" << fz[i] << "\t" << curZPos[i] << "\t" << zpos[i] <<std::endl;
65  
66   #else
67    int totalNum;
68    MPI_Allreduce(&num, &totalNum, 1, MPI_INT,MPI_SUM, MPI_COMM_WORLD);
69    
70    if(worldRank == 0){
71 <    output << time << endl;
72 <    output << totalNum << endl;
71 >    output << time << std::endl;
72 >    output << totalNum << std::endl;
73    }
74    
75    int whichNode;
# Line 113 | Line 113 | void ZConsWriter::writeFZ(double time, int num, int* i
113          MPI_Recv(&zconsPos, 1, MPI_DOUBLE, whichNode, tag, MPI_COMM_WORLD, &ierr);
114        }
115  
116 <     output << globalIndexOfCurMol << "\t" << force << "\t" << pos << "\t"<<  zconsPos << endl;
116 >     output << globalIndexOfCurMol << "\t" << force << "\t" << pos << "\t"<<  zconsPos << std::endl;
117                
118      } //End of Request Loop
119      
# Line 172 | Line 172 | void ZConsWriter::writeZPos(){
172    if(worldRank == 0){
173   #endif
174      
175 <    output << parameters->size() << endl;    
175 >    output << parameters->size() << std::endl;    
176      
177      for(int i =0 ; i < (int)(parameters->size()); i++)
178 <      output << (*parameters)[i].zconsIndex << "\t" <<  (*parameters)[i].zPos << endl;
178 >      output << (*parameters)[i].zconsIndex << "\t" <<  (*parameters)[i].zPos << std::endl;
179  
180   #ifdef IS_MPI
181    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines