ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/hydrodynamics/Hydro.cpp
(Generate patch)

Comparing trunk/src/applications/hydrodynamics/Hydro.cpp (file contents):
Revision 977 by tim, Thu May 25 16:27:27 2006 UTC vs.
Revision 1177 by xsun, Tue Aug 14 17:40:33 2007 UTC

# Line 89 | Line 89 | int main(int argc, char* argv[]){
89      exit(1);
90    }
91    
92  mdFileName = dumpFileName;
93  mdFileName = mdFileName.substr(0, mdFileName.rfind(".")) + ".md";
94
92    if (args_info.output_given){
93      prefix = args_info.output_arg;
94    } else {
95 <    prefix = getPrefix(mdFileName);    
95 >    prefix = getPrefix(dumpFileName);    
96    }
97    std::string outputFilename = prefix + ".diff";
98      
99    //parse md file and set up the system
100    SimCreator creator;
101 <  SimInfo* info = creator.createSim(mdFileName, true);
101 >  SimInfo* info = creator.createSim(dumpFileName, true);
102      
103    SimInfo::MoleculeIterator mi;
104    Molecule* mol;
# Line 157 | Line 154 | int main(int argc, char* argv[]){
154  
155  
156    
160  std::ofstream outputDiff(outputFilename.c_str());
157    std::map<std::string, SDShape>::iterator si;
158    for (si = uniqueStuntDoubles.begin(); si != uniqueStuntDoubles.end(); ++si) {
159        HydrodynamicsModel* model;
# Line 183 | Line 179 | int main(int argc, char* argv[]){
179          //if beads option is turned on, skip the calculation
180          if (!args_info.beads_flag) {
181            model->calcHydroProps(shape, viscosity, temperature);
182 +          std::ofstream outputDiff;
183 +          outputDiff.open(outputFilename.c_str());
184            model->writeHydroProps(outputDiff);
185 +          outputDiff.close();
186          }
187          
188          delete model;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines