ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/applications/oopse/oopse.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/applications/oopse/oopse.cpp (file contents):
Revision 1774, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1775 by tim, Wed Nov 24 17:42:37 2004 UTC

# Line 1 | Line 1
1 #include <iostream>
2 #include <fstream>
3 #include <cstdlib>
4 #include <cmath>
5 #include <cstring>
1  
2   #ifdef IS_MPI
3   #include <mpi.h>
4   #endif
5  
11 #ifdef PROFILE
12 #include "profiling/mdProfile.hpp"
13 #endif // PROFILE
14
6   #include "utils/simError.h"
7 < #include "brains/SimSetup.hpp"
7 > #include "brains/SimCreator.hpp"
8   #include "brains/SimInfo.hpp"
9 < #include "primitives/Atom.hpp"
19 < #include "integrators/Integrator.hpp"
20 < #include "brains/Thermo.hpp"
21 < #include "io/ReadWrite.hpp"
22 < #include "minimizers/OOPSEMinimizer.hpp"
9 > #include "integrators/IntegratorFactory.hpp"
10  
24 char* program_name;
11   using namespace std;
12  
13   int main(int argc,char* argv[]){
28  
29  char* in_name;
30  SimSetup* startMe;
31  SimInfo* entry_plug;
14    
15    // first things first, all of the initializations
16  
# Line 38 | Line 20 | int main(int argc,char* argv[]){
20    
21    initSimError();           // the error handler
22    srand48( 1337 );          // the random number generator.
41
42 #ifdef PROFILE
43  initProfile();
44 #endif //profile
23    
46  // check command line arguments, and set the input file
47  
48  program_name = argv[0]; // save the program name in case we need it
49  
24   #ifdef IS_MPI
25    if( worldRank == 0 ){
26   #endif
# Line 78 | Line 52 | int main(int argc,char* argv[]){
52    }
53   #endif
54    
81  in_name = argv[1];
82
55   #ifdef IS_MPI
56    strcpy( checkPointMsg, "Successful number of arguments" );
57    MPIcheckPoint();
58   #endif
87    
88  // create the simulation objects, and get the show on the road
59  
60 <  entry_plug = new SimInfo();
61 <  startMe = new SimSetup();
60 >      
61 >    //create simulation model
62 >    SimCreator creator;
63 >    SimInfo* info = creator.createSim(argv[1]);
64  
65 <  startMe->setSimInfo( entry_plug );
65 >    //create Integrator
66 >    //Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator();
67 >    
68 >    //Thermodynamic Integration Method
69 >    //ForceManager* fman = new ThermodynamicForceManager(info);
70 >   //myIntegrator->setForceManager(fman);
71  
95 #ifdef PROFILE
96  startProfile( pro1 );
97 #endif //profile
72  
73 <  startMe->parseFile( in_name );
73 >    //Zconstraint-Method
74 >    //ForceManager* fman = new ZconstraintForceManager(info);
75 >    //myIntegrator->setForceManager(fman);
76  
77 < #ifdef PROFILE
78 <  endProfile( pro1 );
103 <  
104 <  startProfile( pro2 );
105 < #endif //profile
77 >    //myIntegrator->run();
78 >    //delete myIntegrator;
79  
80 <  startMe->createSim();
81 <  delete startMe;
80 >    //minimizer
81 >    // Minimizer* minimizer = MinimizerFactory::getInstance()->createMininizer();
82 >    //minimizer->run();
83 >    //delete minimizer
84 >    
85 >    delete info;
86  
110 #ifdef PROFILE
111  endProfile( pro2 );
112  
113  startProfile( pro3 );
114 #endif //profile
115
116  if (!entry_plug->has_minimizer)
117    entry_plug->the_integrator->integrate();
118  else
119    entry_plug->the_minimizer->minimize();
120 #ifdef PROFILE
121  endProfile( pro3 );
122
123  writeProfiles();
124 #endif //profile
125
87   #ifdef IS_MPI
88    strcpy( checkPointMsg, "Oh what a lovely Tea Party!" );
89    MPIcheckPoint();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines