# | Line 27 | Line 27 | DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ | |
---|---|---|
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 ); | |
# | Line 41 | Line 39 | DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ | |
39 | painCave.isFatal = 1; | |
40 | simError(); | |
41 | } | |
42 | < | |
42 | > | |
43 | //outFile.setf( ios::scientific ); | |
44 | ||
45 | #ifdef IS_MPI | |
# | Line 72 | Line 70 | void DumpWriter::writeDump( double currentTime ){ | |
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; | |
# | Line 84 | Line 82 | void DumpWriter::writeDump( double currentTime ){ | |
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"; |
85 | > | << entry_plug->Hmat[0] << "\t" |
86 | > | << entry_plug->Hmat[1] << "\t" |
87 | > | << entry_plug->Hmat[2] << "\t" |
88 | > | |
89 | > | << entry_plug->Hmat[3] << "\t" |
90 | > | << entry_plug->Hmat[4] << "\t" |
91 | > | << entry_plug->Hmat[5] << "\t" |
92 | > | |
93 | > | << entry_plug->Hmat[6] << "\t" |
94 | > | << entry_plug->Hmat[7] << "\t" |
95 | > | << entry_plug->Hmat[8] << "\n"; |
96 | ||
97 | for( i=0; i<nAtoms; i++ ){ | |
98 | ||
# | Line 140 | Line 146 | void DumpWriter::writeDump( double currentTime ){ | |
146 | ||
147 | if( worldRank == 0 ){ | |
148 | outFile << mpiSim->getTotAtoms() << "\n"; | |
149 | < | |
149 | > | |
150 | outFile << currentTime << "\t" | |
151 | < | << entry_plug->box_x << "\t" |
152 | < | << entry_plug->box_y << "\t" |
153 | < | << entry_plug->box_z << "\n"; |
151 | > | << entry_plug->Hmat[0] << "\t" |
152 | > | << entry_plug->Hmat[1] << "\t" |
153 | > | << entry_plug->Hmat[2] << "\t" |
154 | > | |
155 | > | << entry_plug->Hmat[3] << "\t" |
156 | > | << entry_plug->Hmat[4] << "\t" |
157 | > | << entry_plug->Hmat[5] << "\t" |
158 | > | |
159 | > | << entry_plug->Hmat[6] << "\t" |
160 | > | << entry_plug->Hmat[7] << "\t" |
161 | > | << entry_plug->Hmat[8] << "\n"; |
162 | > | ; |
163 | outFile.flush(); | |
164 | for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { | |
165 | // Get the Node number which has this atom; | |
# | Line 309 | Line 324 | void DumpWriter::writeDump( double currentTime ){ | |
324 | #endif // is_mpi | |
325 | } | |
326 | ||
327 | < | void DumpWriter::writeFinal(){ |
327 | > | void DumpWriter::writeFinal(double finalTime){ |
328 | ||
329 | char finalName[500]; | |
330 | ofstream finalOut; | |
# | Line 355 | Line 370 | void DumpWriter::writeFinal(){ | |
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] << "\t" |
375 | > | << entry_plug->Hmat[1] << "\t" |
376 | > | << entry_plug->Hmat[2] << "\t" |
377 | > | |
378 | > | << entry_plug->Hmat[3] << "\t" |
379 | > | << entry_plug->Hmat[4] << "\t" |
380 | > | << entry_plug->Hmat[5] << "\t" |
381 | > | |
382 | > | << entry_plug->Hmat[6] << "\t" |
383 | > | << entry_plug->Hmat[7] << "\t" |
384 | > | << entry_plug->Hmat[8] << "\n"; |
385 | ||
386 | for( i=0; i<nAtoms; i++ ){ | |
387 | ||
# | Line 413 | Line 437 | void DumpWriter::writeFinal(){ | |
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] << "\t" |
442 | > | << entry_plug->Hmat[1] << "\t" |
443 | > | << entry_plug->Hmat[2] << "\t" |
444 | > | |
445 | > | << entry_plug->Hmat[3] << "\t" |
446 | > | << entry_plug->Hmat[4] << "\t" |
447 | > | << entry_plug->Hmat[5] << "\t" |
448 | > | |
449 | > | << entry_plug->Hmat[6] << "\t" |
450 | > | << entry_plug->Hmat[7] << "\t" |
451 | > | << entry_plug->Hmat[8] << "\n"; |
452 | ||
453 | for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { | |
454 | // Get the Node number which has this molecule: |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |