27 |
|
if(worldRank == 0 ){ |
28 |
|
#endif // is_mpi |
29 |
|
|
30 |
– |
|
31 |
– |
|
30 |
|
strcpy( outName, entry_plug->sampleName ); |
31 |
|
|
32 |
|
outFile.open(outName, ios::out | ios::trunc ); |
39 |
|
painCave.isFatal = 1; |
40 |
|
simError(); |
41 |
|
} |
42 |
< |
|
42 |
> |
|
43 |
|
//outFile.setf( ios::scientific ); |
44 |
|
|
45 |
|
#ifdef IS_MPI |
70 |
|
char tempBuffer[BUFFERSIZE]; |
71 |
|
char writeLine[BUFFERSIZE]; |
72 |
|
|
73 |
< |
int i, j, which_node, done, game_over, which_atom, local_index; |
73 |
> |
int i, j, which_node, done, which_atom, local_index; |
74 |
|
double q[4]; |
75 |
|
DirectionalAtom* dAtom; |
76 |
|
int nAtoms = entry_plug->n_atoms; |
81 |
|
|
82 |
|
outFile << nAtoms << "\n"; |
83 |
|
|
84 |
< |
outFile << currentTime << "\t" |
85 |
< |
<< entry_plug->box_x << "\t" |
86 |
< |
<< entry_plug->box_y << "\t" |
87 |
< |
<< entry_plug->box_z << "\n"; |
84 |
> |
outFile << currentTime << ";\t" |
85 |
> |
<< entry_plug->Hmat[0][0] << "\t" |
86 |
> |
<< entry_plug->Hmat[1][0] << "\t" |
87 |
> |
<< entry_plug->Hmat[2][0] << ";\t" |
88 |
> |
|
89 |
> |
<< entry_plug->Hmat[0][1] << "\t" |
90 |
> |
<< entry_plug->Hmat[1][1] << "\t" |
91 |
> |
<< entry_plug->Hmat[2][1] << ";\t" |
92 |
> |
|
93 |
> |
<< entry_plug->Hmat[0][2] << "\t" |
94 |
> |
<< entry_plug->Hmat[1][2] << "\t" |
95 |
> |
<< entry_plug->Hmat[2][2] << ";\n"; |
96 |
|
|
97 |
|
for( i=0; i<nAtoms; i++ ){ |
98 |
|
|
146 |
|
|
147 |
|
if( worldRank == 0 ){ |
148 |
|
outFile << mpiSim->getTotAtoms() << "\n"; |
149 |
+ |
|
150 |
+ |
outFile << currentTime << ";\t" |
151 |
+ |
<< entry_plug->Hmat[0][0] << "\t" |
152 |
+ |
<< entry_plug->Hmat[1][0] << "\t" |
153 |
+ |
<< entry_plug->Hmat[2][0] << ";\t" |
154 |
+ |
|
155 |
+ |
<< entry_plug->Hmat[0][1] << "\t" |
156 |
+ |
<< entry_plug->Hmat[1][1] << "\t" |
157 |
+ |
<< entry_plug->Hmat[2][1] << ";\t" |
158 |
+ |
|
159 |
+ |
<< entry_plug->Hmat[0][2] << "\t" |
160 |
+ |
<< entry_plug->Hmat[1][2] << "\t" |
161 |
+ |
<< entry_plug->Hmat[2][2] << ";\n"; |
162 |
|
|
144 |
– |
outFile << currentTime << "\t" |
145 |
– |
<< entry_plug->box_x << "\t" |
146 |
– |
<< entry_plug->box_y << "\t" |
147 |
– |
<< entry_plug->box_z << "\n"; |
163 |
|
outFile.flush(); |
164 |
|
for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { |
165 |
|
// Get the Node number which has this atom; |
324 |
|
#endif // is_mpi |
325 |
|
} |
326 |
|
|
327 |
< |
void DumpWriter::writeFinal(){ |
327 |
> |
void DumpWriter::writeFinal(double finalTime){ |
328 |
|
|
329 |
|
char finalName[500]; |
330 |
|
ofstream finalOut; |
370 |
|
|
371 |
|
finalOut << nAtoms << "\n"; |
372 |
|
|
373 |
< |
finalOut << entry_plug->box_x << "\t" |
374 |
< |
<< entry_plug->box_y << "\t" |
375 |
< |
<< entry_plug->box_z << "\n"; |
373 |
> |
finalOut << finalTime << ";\t" |
374 |
> |
<< entry_plug->Hmat[0][0] << "\t" |
375 |
> |
<< entry_plug->Hmat[1][0] << "\t" |
376 |
> |
<< entry_plug->Hmat[2][0] << ";\t" |
377 |
> |
|
378 |
> |
<< entry_plug->Hmat[0][1] << "\t" |
379 |
> |
<< entry_plug->Hmat[1][1] << "\t" |
380 |
> |
<< entry_plug->Hmat[2][1] << ";\t" |
381 |
> |
|
382 |
> |
<< entry_plug->Hmat[0][2] << "\t" |
383 |
> |
<< entry_plug->Hmat[1][2] << "\t" |
384 |
> |
<< entry_plug->Hmat[2][2] << ";\n"; |
385 |
|
|
386 |
|
for( i=0; i<nAtoms; i++ ){ |
387 |
|
|
437 |
|
if( worldRank == 0 ){ |
438 |
|
finalOut << mpiSim->getTotAtoms() << "\n"; |
439 |
|
|
440 |
< |
finalOut << entry_plug->box_x << "\t" |
441 |
< |
<< entry_plug->box_y << "\t" |
442 |
< |
<< entry_plug->box_z << "\n"; |
440 |
> |
finalOut << finalTime << ";\t" |
441 |
> |
<< entry_plug->Hmat[0][0] << "\t" |
442 |
> |
<< entry_plug->Hmat[1][0] << "\t" |
443 |
> |
<< entry_plug->Hmat[2][0] << ";\t" |
444 |
> |
|
445 |
> |
<< entry_plug->Hmat[0][1] << "\t" |
446 |
> |
<< entry_plug->Hmat[1][1] << "\t" |
447 |
> |
<< entry_plug->Hmat[2][1] << ";\t" |
448 |
> |
|
449 |
> |
<< entry_plug->Hmat[0][2] << "\t" |
450 |
> |
<< entry_plug->Hmat[1][2] << "\t" |
451 |
> |
<< entry_plug->Hmat[2][2] << ";\n"; |
452 |
|
|
453 |
|
for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { |
454 |
|
// Get the Node number which has this molecule: |