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(); |
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; |
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 |
|
|
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 |
|
} |