ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/dump2Xyz/Dump2XYZ.cpp
(Generate patch)

Comparing branches/development/src/applications/dump2Xyz/Dump2XYZ.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1706 by gezelter, Fri Apr 27 20:44:16 2012 UTC

# Line 64 | Line 64 | using namespace OpenMD;
64  
65   using namespace OpenMD;
66  
67 + using namespace std;
68   int main(int argc, char* argv[]){
69    
70    //register force fields
71    registerForceFields();
72    
73    gengetopt_args_info args_info;
74 <  std::string dumpFileName;
75 <  std::string xyzFileName;
76 <  bool printVel;
77 <  bool printFrc;
78 <  bool printVec;
79 <  bool printChrg;
74 >  string dumpFileName;
75 >  string xyzFileName;
76 >
77 >  bool printVel(false);
78 >  bool printFrc(false);
79 >  bool printVec(false);
80 >  bool printChrg(false);
81    
82    //parse the command line option
83    if (cmdline_parser (argc, argv, &args_info) != 0) {
# Line 86 | Line 88 | int main(int argc, char* argv[]){
88    if (args_info.input_given){
89      dumpFileName = args_info.input_arg;
90    } else {
91 <    std::cerr << "Does not have input file name" << std::endl;
91 >    cerr << "Does not have input file name" << endl;
92      exit(1);
93    }
94    
# Line 139 | Line 141 | int main(int argc, char* argv[]){
141    if (args_info.basetype_flag) {
142      AtomNameVisitor* atomNameVisitor = new AtomNameVisitor(info);
143      compositeVisitor->addVisitor(atomNameVisitor, 550);    
144 <    std::cout << compositeVisitor->toString();
144 >    cout << compositeVisitor->toString();
145    }
146    
147    //create ZconsVisitor
# Line 181 | Line 183 | int main(int argc, char* argv[]){
183                                                         args_info.refsele_arg),
184                                   250);
185    } else if (args_info.refsele_given || args_info.originsele_given) {
186 <    std::cerr << "Both of --refsele and --originsele should appear by pair"
187 <              << std::endl;
186 >    cerr << "Both of --refsele and --originsele should appear by pair"
187 >              << endl;
188      exit(1);
189    }
190    
# Line 221 | Line 223 | int main(int argc, char* argv[]){
223    DumpReader* dumpReader = new DumpReader(info, dumpFileName);
224    int nframes = dumpReader->getNFrames();
225    
226 <  std::ofstream xyzStream(xyzFileName.c_str());
226 >  ofstream xyzStream(xyzFileName.c_str());
227    
228    SimInfo::MoleculeIterator miter;
229    Molecule::IntegrableObjectIterator  iiter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines