17 |
|
#include "Integrator.hpp" |
18 |
|
#include "Thermo.hpp" |
19 |
|
#include "ReadWrite.hpp" |
20 |
+ |
#include "OOPSEMinimizer.hpp" |
21 |
|
|
22 |
|
char* program_name; |
23 |
|
using namespace std; |
27 |
|
char* in_name; |
28 |
|
SimSetup* startMe; |
29 |
|
SimInfo* entry_plug; |
30 |
< |
|
30 |
< |
|
30 |
> |
|
31 |
|
// first things first, all of the initializations |
32 |
|
|
33 |
|
MPI_Init( &argc, &argv ); // the MPI communicators |
55 |
|
|
56 |
|
strcpy( checkPointMsg, "Successful number of arguments" ); |
57 |
|
MPIcheckPoint(); |
58 |
< |
|
59 |
< |
|
58 |
> |
|
59 |
|
// create the simulation objects, and get the show on the road |
60 |
|
|
61 |
|
entry_plug = new SimInfo; |
63 |
|
|
64 |
|
startMe->setSimInfo( entry_plug ); |
65 |
|
|
67 |
– |
#ifdef PROFILE |
68 |
– |
startProfile( pro1 ); |
69 |
– |
#endif //profile |
66 |
|
|
67 |
|
startMe->parseFile( in_name ); |
68 |
|
|
73 |
– |
#ifdef PROFILE |
74 |
– |
endProfile( pro1 ); |
75 |
– |
|
76 |
– |
startProfile( pro2 ); |
77 |
– |
#endif //profile |
69 |
|
|
70 |
|
startMe->createSim(); |
71 |
|
|
72 |
|
delete startMe; |
73 |
|
|
74 |
< |
#ifdef PROFILE |
75 |
< |
endProfile( pro2 ); |
74 |
> |
if (!entry_plug->has_minimizer) |
75 |
> |
entry_plug->the_integrator->integrate(); |
76 |
> |
else |
77 |
> |
entry_plug->the_minimizer->minimize(); |
78 |
|
|
86 |
– |
startProfile( pro3 ); |
87 |
– |
#endif //profile |
88 |
– |
|
89 |
– |
entry_plug->the_integrator->integrate(); |
90 |
– |
|
79 |
|
#ifdef PROFILE |
92 |
– |
endProfile( pro3 ); |
93 |
– |
|
80 |
|
writeProfiles(); |
81 |
|
#endif //profile |
82 |
|
|