Changeset 834ff3 for molecuilder/src/config.cpp
- Timestamp:
- Aug 3, 2009, 2:48:42 PM (16 years ago)
- Children:
- d8fce3, e78824
- Parents:
- 4e4940
- File:
-
- 1 edited
-
molecuilder/src/config.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/config.cpp
r4e4940 r834ff3 276 276 277 277 /** Readin of Thermostat related values from parameter file. 278 * \param * source parameterfile279 */ 280 void config::InitThermostats( ifstream *source)278 * \param *fb file buffer containing the config file 279 */ 280 void config::InitThermostats(class ConfigFileBuffer *fb) 281 281 { 282 282 char *thermo = MallocString(12, "IonsInitRead: thermo"); … … 284 284 285 285 // read desired Thermostat from file along with needed additional parameters 286 if (ParseForParameter(verbose, source,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) {286 if (ParseForParameter(verbose,fb,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) { 287 287 if (strcmp(thermo, ThermostatNames[0]) == 0) { // None 288 288 if (ThermostatImplemented[0] == 1) { … … 295 295 if (ThermostatImplemented[1] == 1) { 296 296 Thermostat = Woodcock; 297 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency297 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency 298 298 } else { 299 299 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 303 303 if (ThermostatImplemented[2] == 1) { 304 304 Thermostat = Gaussian; 305 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate305 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate 306 306 } else { 307 307 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 311 311 if (ThermostatImplemented[3] == 1) { 312 312 Thermostat = Langevin; 313 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma314 if (ParseForParameter(verbose, source,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) {313 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma 314 if (ParseForParameter(verbose,fb,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) { 315 315 cout << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << alpha << "." << endl; 316 316 } else { … … 324 324 if (ThermostatImplemented[4] == 1) { 325 325 Thermostat = Berendsen; 326 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T326 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T 327 327 } else { 328 328 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 332 332 if (ThermostatImplemented[5] == 1) { 333 333 Thermostat = NoseHoover; 334 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass334 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass 335 335 alpha = 0.; 336 336 } else { … … 704 704 return; 705 705 } 706 file->close(); 707 delete(file); 706 708 RetrieveConfigPathAndName(filename); 707 709 … … 722 724 double value[3]; 723 725 724 InitThermostats( file);726 InitThermostats(FileBuffer); 725 727 726 728 /* Namen einlesen */
Note:
See TracChangeset
for help on using the changeset viewer.
