| 1 | /* | 
|---|
| 2 | * ThermoStatContainer.cpp | 
|---|
| 3 | * | 
|---|
| 4 | *  Created on: 12.06.2010 | 
|---|
| 5 | *      Author: heber | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #include <cstring> | 
|---|
| 9 |  | 
|---|
| 10 | #include "ConfigFileBuffer.hpp" | 
|---|
| 11 | #include "config.hpp" | 
|---|
| 12 | #include "Helpers/Log.hpp" | 
|---|
| 13 | #include "ThermoStatContainer.hpp" | 
|---|
| 14 | #include "Helpers/Verbose.hpp" | 
|---|
| 15 |  | 
|---|
| 16 | /** Constructor for class ThermoStatContainer. | 
|---|
| 17 | * | 
|---|
| 18 | */ | 
|---|
| 19 | ThermoStatContainer::ThermoStatContainer() : | 
|---|
| 20 | Thermostat(4), | 
|---|
| 21 | ThermostatImplemented(NULL), | 
|---|
| 22 | ThermostatNames(NULL), | 
|---|
| 23 | TempFrequency(2.5), | 
|---|
| 24 | alpha(0.), | 
|---|
| 25 | HooverMass(0.), | 
|---|
| 26 | TargetTemp(0.00095004455), | 
|---|
| 27 | ScaleTempStep(25) | 
|---|
| 28 | { | 
|---|
| 29 | ThermostatImplemented = new int[MaxThermostats]; | 
|---|
| 30 | ThermostatNames = new char *[MaxThermostats]; | 
|---|
| 31 | for (int j=0;j<MaxThermostats;j++) | 
|---|
| 32 | ThermostatNames[j] = new char[12]; | 
|---|
| 33 |  | 
|---|
| 34 | strcpy(ThermostatNames[0],"None"); | 
|---|
| 35 | ThermostatImplemented[0] = 1; | 
|---|
| 36 | strcpy(ThermostatNames[1],"Woodcock"); | 
|---|
| 37 | ThermostatImplemented[1] = 1; | 
|---|
| 38 | strcpy(ThermostatNames[2],"Gaussian"); | 
|---|
| 39 | ThermostatImplemented[2] = 1; | 
|---|
| 40 | strcpy(ThermostatNames[3],"Langevin"); | 
|---|
| 41 | ThermostatImplemented[3] = 1; | 
|---|
| 42 | strcpy(ThermostatNames[4],"Berendsen"); | 
|---|
| 43 | ThermostatImplemented[4] = 1; | 
|---|
| 44 | strcpy(ThermostatNames[5],"NoseHoover"); | 
|---|
| 45 | ThermostatImplemented[5] = 1; | 
|---|
| 46 | } | 
|---|
| 47 |  | 
|---|
| 48 | /** Destructor for Class ThermoStatContainer. | 
|---|
| 49 | * | 
|---|
| 50 | */ | 
|---|
| 51 | ThermoStatContainer::~ThermoStatContainer() | 
|---|
| 52 | { | 
|---|
| 53 | delete[](ThermostatImplemented); | 
|---|
| 54 | for (int j=0;j<MaxThermostats;j++) | 
|---|
| 55 | delete[](ThermostatNames[j]); | 
|---|
| 56 | delete[](ThermostatNames); | 
|---|
| 57 | } | 
|---|
| 58 |  | 
|---|
| 59 |  | 
|---|