00001 //*****************************************************************************// 00002 // // 00003 // Copyright (c) 2001 // 00004 // INRIA // 00005 // 54600 VILLERS LES NANCY // 00006 // France // 00007 // // 00008 //*****************************************************************************// 00009 // // 00010 // *** NOTICE OF PROPRIETARY INFORMATION *** // 00011 // // 00012 // The information contained in this file is considered proprietary and the // 00013 // exclusive property of INRIA. This information may not be disclosed, // 00014 // duplicated or used, in whole or in part, for any purpose whatsoever // 00015 // without express written authorization from INRIA // 00016 // // 00017 //*****************************************************************************// 00018 00019 00020 #ifndef QC_MANAGER_H_ 00021 #define QC_MANAGER_H_ 00022 00023 00024 #include "QCSystem.hpp" 00025 #include "QCFiles.hpp" 00026 #include "QCGeneralData.hpp" 00027 #include "QCMemory.hpp" 00028 #include "QCPartitioner.hpp" 00029 00030 00031 00041 00042 template <class TPModel, class TPSystem> 00043 class QCManager 00044 { 00045 00047 public: 00048 00053 typedef TPModel TModel; 00054 typedef typename TModel::TParam TParam; 00055 typedef TPSystem TSystem; 00056 typedef typename TSystem::TSolver TSolver; 00057 00058 00062 QCManager (void); 00066 QCManager (int& argc, char **& argv); 00070 ~QCManager (void); 00071 00072 00073 00077 bool isDCComputation (void) const { return this->generalData.isDCComputation(); } 00078 00079 00080 00084 TSystem& getSystem (void) { return this->system; } 00085 00086 00087 00091 const QCFiles getFiles (void) const { return this->_files; } 00092 QCFiles & files (void) { return this->_files; } 00093 00094 00098 const QCGeneralData& getGeneralData (void) const { return this->generalData; } 00099 00100 00101 00105 const TParam* 00106 getParameters (void) const { return parameters; } 00107 00108 00109 00113 TModel& getModel (void) { return model; } 00114 00115 00116 00120 int getNbAtomTypes (void) { return nbParam; } 00121 00122 00123 00127 const TParam& 00128 getParameter (const int index) { return parameters[index]; } 00129 00130 00131 00135 QCMemory& getMemory (void) { return this->memory; } 00136 00137 00138 00142 QCPartitioner<TPSystem> * getPartitioner(void) const 00143 { return this->partitioner; } 00144 00145 QCPartitioner<TPSystem> * & getPartitioner (void) 00146 { return this-> partitioner; } 00147 00148 00149 00153 void setFiles (const QCFiles& infiles) { 00154 this->_files = infiles; 00155 } 00156 00157 00158 00162 void setGeneralities (const QCGeneralData& data) { 00163 generalData = data; 00164 } 00165 00166 00167 00171 void readAtoms (const string& path); 00172 00173 00174 00178 void readParameters (const string& path); 00179 00180 00181 00185 void init (const QCFiles& files, const QCGeneralData& data, const string& path ); 00189 void initTools (const QCFiles& files, const QCGeneralData& data, const string& path ); 00190 00191 00192 00194 void runComputations (void); 00195 00197 int evaluateMemorySize (void); 00198 00200 protected: 00201 00202 00204 private: 00205 00206 00209 public: 00210 protected: 00211 private: 00215 TSystem system; 00216 00220 QCFiles _files; 00221 00225 QCGeneralData generalData; 00226 00230 TParam *parameters; 00231 00235 int nbParam; 00236 00240 TPModel model; 00241 00245 TSolver solver; 00246 00248 QCMemory memory; 00249 00253 QCPartitioner<TPSystem> * partitioner; 00254 00255 }; 00256 00257 00258 00259 #endif // QC_MANAGER_H_