ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/applications/oopse/oopse.cpp
Revision: 1827
Committed: Thu Dec 2 05:06:26 2004 UTC (21 years, 5 months ago) by tim
File size: 3311 byte(s)
Log Message:
remove using namespace std in .cpp file

File Contents

# User Rev Content
1 tim 1501
2     #ifdef IS_MPI
3     #include <mpi.h>
4     #endif
5    
6     #include "utils/simError.h"
7 tim 1775 #include "brains/SimCreator.hpp"
8 tim 1501 #include "brains/SimInfo.hpp"
9 tim 1775 #include "integrators/IntegratorFactory.hpp"
10 tim 1822 #include "integrators/Integrator.hpp"
11 tim 1827
12 tim 1822 using namespace oopse;
13 tim 1501
14     int main(int argc,char* argv[]){
15    
16     // first things first, all of the initializations
17    
18     #ifdef IS_MPI
19     MPI_Init( &argc, &argv ); // the MPI communicators
20     #endif
21    
22     initSimError(); // the error handler
23     srand48( 1337 ); // the random number generator.
24    
25     #ifdef IS_MPI
26     if( worldRank == 0 ){
27     #endif
28     std::cerr <<
29     " +----------------------------------------------------------------------+\n" <<
30     " | ____ ____ ____ _____ ______ The OpenSource, Object-oriented |\n" <<
31     " | / __ \\/ __ \\/ __ \\/ ___// ____/ Parallel Simulation Engine. |\n" <<
32     " | / / / / / / / /_/ /\\__ \\/ __/ |\n" <<
33     " | / /_/ / /_/ / ____/___/ / /___ Copyright 2004 by the |\n" <<
34     " | \\____/\\____/_/ /____/_____/ University of Notre Dame. |\n" <<
35     " | http://www.oopse.org |\n" <<
36     " | |\n" <<
37     " | OOPSE is an OpenScience project. All source code is available for |\n" <<
38     " | any use subject to only one condition: |\n" <<
39     " | |\n" <<
40     " | Any published work resulting from the use of this code must cite the |\n" <<
41     " | following paper: M. A. Meineke, C. F. Vardeman II, T. Lin, |\n" <<
42     " | C. J. Fennell, and J. D. Gezelter, |\n" <<
43     " | J. Comp. Chem. XX, XXXX (2004). |\n" <<
44     " +----------------------------------------------------------------------+\n" <<
45     "\n";
46    
47     if( argc < 2 ){
48     strcpy( painCave.errMsg, "Error, a meta-data file is needed to run.\n" );
49     painCave.isFatal = 1;
50     simError();
51     }
52     #ifdef IS_MPI
53     }
54     #endif
55    
56     #ifdef IS_MPI
57     strcpy( checkPointMsg, "Successful number of arguments" );
58     MPIcheckPoint();
59     #endif
60    
61 tim 1775
62     //create simulation model
63     SimCreator creator;
64     SimInfo* info = creator.createSim(argv[1]);
65 tim 1501
66 tim 1775 //create Integrator
67 tim 1822 Globals* globals = info->getGlobals();
68     if (globals->haveEnsemble()) {
69     Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator(globals->getEnsemble(), info);
70    
71     //Thermodynamic Integration Method
72     //ForceManager* fman = new ThermodynamicForceManager(info);
73     //myIntegrator->setForceManager(fman);
74 tim 1501
75    
76 tim 1822 //Zconstraint-Method
77     //ForceManager* fman = new ZconstraintForceManager(info);
78     //myIntegrator->setForceManager(fman);
79 tim 1501
80 tim 1822 myIntegrator->integrate();
81     delete myIntegrator;
82     }
83 tim 1775 //minimizer
84     // Minimizer* minimizer = MinimizerFactory::getInstance()->createMininizer();
85     //minimizer->run();
86     //delete minimizer
87    
88     delete info;
89 tim 1501
90     #ifdef IS_MPI
91     strcpy( checkPointMsg, "Oh what a lovely Tea Party!" );
92     MPIcheckPoint();
93    
94 tim 1822 MPI_Finalize();
95 tim 1501 #endif
96    
97     return 0 ;
98     }