ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/src/oose.cpp
(Generate patch)

Comparing trunk/OOPSE/src/oose.cpp (file contents):
Revision 378 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
Revision 1169 by gezelter, Wed May 12 19:44:54 2004 UTC

# Line 5 | Line 5
5   #include <cmath>
6   #include <cstring>
7  
8 + #ifdef PROFILE
9 + #include "mdProfile.hpp"
10 + #endif // PROFILE
11 +
12   #include "simError.h"
13   #include "SimSetup.hpp"
14   #include "SimInfo.hpp"
# Line 12 | Line 16
16   #include "Integrator.hpp"
17   #include "Thermo.hpp"
18   #include "ReadWrite.hpp"
19 + #include "OOPSEMinimizer.hpp"
20  
21   char* program_name;
22   using namespace std;
# Line 21 | Line 26 | int main(int argc,char* argv[]){
26    char* in_name;
27    SimSetup* startMe;
28    SimInfo* entry_plug;
29 <
25 <  
29 >  
30    // first things first, all of the initializations
31  
28  printf("Initializing stuff ....\n");
29  srand48( 1337 );          // the random number generator.
32    initSimError();           // the error handler
33 +  srand48( 1337 );          // the random number generator.
34 +  
35 + #ifdef PROFILE
36 +  initProfile();
37 + #endif //profile
38 +
39 +  // check command line arguments, and set the input file
40    
41 <  program_name = argv[0]; /*save the program name in case we need it*/
41 >  program_name = argv[0]; // save the program name in case we need it
42 >
43    if( argc < 2 ){
44      sprintf( painCave.errMsg,
45               "Error, bass file is needed to run.\n" );
46      painCave.isFatal = 1;
47      simError();
48    }
49 <  
40 <  
49 >    
50    in_name = argv[1];
51 +
52 +  // create the simulation objects, and get the show on the road
53 +
54    entry_plug = new SimInfo();
43  
55    startMe = new SimSetup();
56 +
57    startMe->setSimInfo( entry_plug );
58 +
59 + #ifdef PROFILE
60 +  startProfile( pro1 );
61 + #endif //profile
62 +
63    startMe->parseFile( in_name );
47  startMe->createSim();
64  
65 + #ifdef PROFILE
66 +  endProfile( pro1 );
67 +  
68 +  startProfile( pro2 );
69 + #endif //profile
70 +
71 +  startMe->createSim();
72    delete startMe;
73  
74 <  entry_plug->the_integrator->integrate();
74 > #ifdef PROFILE
75 >  endProfile( pro2 );
76 >  
77 >  startProfile( pro3 );
78 > #endif //profile
79  
80 +  if (!entry_plug->has_minimizer)
81 +    entry_plug->the_integrator->integrate();
82 +  else
83 +    entry_plug->the_minimizer->minimize();
84 + #ifdef PROFILE
85 +  endProfile( pro3 );
86 +
87 +  writeProfiles();
88 + #endif //profile
89 +
90    return 0 ;
91   }
92  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines