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

Comparing trunk/OOPSE/libmdtools/ReadWrite.hpp (file contents):
Revision 1078 by tim, Tue Mar 2 20:32:40 2004 UTC vs.
Revision 1118 by tim, Mon Apr 19 03:52:27 2004 UTC

# Line 4 | Line 4
4   #define _FILE_OFFSET_BITS 64
5   #include <iostream>
6   #include <fstream>
7 <
7 > #include <string>
8   #include <string.h>
9   #include <stdio.h>
10   #include <stdlib.h>
# Line 16 | Line 16
16   #include "Atom.hpp"
17   #include "SimInfo.hpp"
18   #include "Thermo.hpp"
19 + #include "StuntDouble.hpp"
20  
21   using namespace std;
22  
22 class FilePos{
23
24 public:
25  FilePos(){
26    myPos = NULL;
27    next = NULL;
28  }
29  FilePos( fpos_t* thePos ) {
30    myPos = thePos;
31    next = NULL;
32  }
33  ~FilePos(){
34    if( next  != NULL ) delete next;
35    if( myPos != NULL ) delete myPos;
36  }
37
38  void add( fpos_t *thePos ){
39    if( next != NULL )
40      next->add( thePos );
41    else
42      next = new FilePos( thePos );
43  }
44
45  FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; }
46
47  void setPos( fpos_t *thePos ){ myPos = thePos; }
48  fpos_t *getPos( void ){ return myPos; }
49
50  FilePos* getNext( void ) { return next; }
51 private:
52
53  fpos_t *myPos;
54  FilePos* next;
55
56 };
57
23   class DumpWriter{
24  
25   public:
# Line 109 | Line 74 | class InitializeFromFile{ (private)
74    void readInit( SimInfo* the_entry_plug );
75  
76   private:
77 <  char* parseDumpLine(char* line, int atomIndex);
77 >  char* parseDumpLine(char* line, StuntDouble* sd);
78    char* parseCommentLine(char* line, SimInfo* entry_plug);
79    FILE *c_in_file;
80    char c_in_name[500];
# Line 128 | Line 93 | class DumpReader{ (private)
93    void getNextFrame() {}
94    void readFrame(SimInfo* the_simnfo, int whichFrame);
95  
96 + #ifdef IS_MPI
97 +  void anonymousNodeDie( void );
98 +  void nodeZeroError( void );
99 + #endif
100   private:
101  
102    void readSet( int whichFrame );
103 <  char* parseDumpLine(char* line, int atomIndex);
104 <  char* parseCommentLine(char* line, double &time, double boxMat[9] );
103 >  char* parseDumpLine(char* readLine, StuntDouble* sd);
104 >  char* parseCommentLine(char* readLine, SimInfo* entry_plug);
105    FILE *inFile;
106 <  char inName[500];
106 >  string inFileName;
107    bool isScanned;
139  int nFrames;
108  
109 <  FilePos** frameStart;
142 <  FilePos* headFP;
143 <
109 >  vector<fpos_t*> framePos;
110    SimInfo *simnfo;
111   };
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines