| [a3fded] | 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 "log.hpp" | 
|---|
|  | 13 | #include "ThermoStatContainer.hpp" | 
|---|
|  | 14 | #include "verbose.hpp" | 
|---|
|  | 15 |  | 
|---|
|  | 16 | /** Constructor for class ThermoStatContainer. | 
|---|
|  | 17 | * | 
|---|
|  | 18 | */ | 
|---|
|  | 19 | ThermoStatContainer::ThermoStatContainer() : Thermostat(4), ThermostatImplemented(NULL), | 
|---|
|  | 20 | ThermostatNames(NULL), TempFrequency(2.5), alpha(0.), HooverMass(0.), TargetTemp(0.00095004455), ScaleTempStep(25) | 
|---|
|  | 21 | { | 
|---|
|  | 22 | ThermostatImplemented = new int[MaxThermostats]; | 
|---|
|  | 23 | ThermostatNames = new char *[MaxThermostats]; | 
|---|
|  | 24 | for (int j=0;j<MaxThermostats;j++) | 
|---|
|  | 25 | ThermostatNames[j] = new char[12]; | 
|---|
|  | 26 |  | 
|---|
|  | 27 | strcpy(ThermostatNames[0],"None"); | 
|---|
|  | 28 | ThermostatImplemented[0] = 1; | 
|---|
|  | 29 | strcpy(ThermostatNames[1],"Woodcock"); | 
|---|
|  | 30 | ThermostatImplemented[1] = 1; | 
|---|
|  | 31 | strcpy(ThermostatNames[2],"Gaussian"); | 
|---|
|  | 32 | ThermostatImplemented[2] = 1; | 
|---|
|  | 33 | strcpy(ThermostatNames[3],"Langevin"); | 
|---|
|  | 34 | ThermostatImplemented[3] = 1; | 
|---|
|  | 35 | strcpy(ThermostatNames[4],"Berendsen"); | 
|---|
|  | 36 | ThermostatImplemented[4] = 1; | 
|---|
|  | 37 | strcpy(ThermostatNames[5],"NoseHoover"); | 
|---|
|  | 38 | ThermostatImplemented[5] = 1; | 
|---|
|  | 39 | } | 
|---|
|  | 40 |  | 
|---|
|  | 41 | /** Destructor for Class ThermoStatContainer. | 
|---|
|  | 42 | * | 
|---|
|  | 43 | */ | 
|---|
|  | 44 | ThermoStatContainer::~ThermoStatContainer() | 
|---|
|  | 45 | { | 
|---|
|  | 46 | delete[](ThermostatImplemented); | 
|---|
|  | 47 | for (int j=0;j<MaxThermostats;j++) | 
|---|
|  | 48 | delete[](ThermostatNames[j]); | 
|---|
|  | 49 | delete[](ThermostatNames); | 
|---|
|  | 50 | } | 
|---|
|  | 51 |  | 
|---|
|  | 52 |  | 
|---|