|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
Class for controling the temperature of the simulated system. More...
#include <DefaultThermostat.h>


Public Member Functions | |
| double | calculateKineticEnergy () override |
| Helper method to calculate the current kinetic energy of the system. More... | |
| double | calculateTemperature () override |
| Helper method to calculate the current temperature of the system. More... | |
| DefaultThermostat (Model &model, double temperatureInit, double temperatureTarget, double maxTemperatureChange, int dimensions) | |
| Construct a default thermostat for a model. More... | |
| void | setTemperatureOfTheSystemViaVelocityScaling () override |
| Set the temperature of the current system to targetTemperature. More... | |
| void | setTemperatureOfTheSystemViaGradualVelocityScaling () override |
| Set the temperature of the current system to targetTemperature, if the change in temperature does not exceed maxTemperatureChange. If it does, the temperature will only be adjusted by the value of maxTemperatureChange. More... | |
Public Member Functions inherited from Thermostat | |
| Thermostat (Model &model, double temperatureInit, double temperatureTarget, double maxTemperatureChange, int dimensions) | |
| Construct a thermostat for a model. More... | |
| void | initialiseSystem () |
| Set the temperature of the system to initTemperature before starting the simultion by applying Brownian Motion to all particles. More... | |
| void | setTargetTemperature (double targetTemperature) |
| virtual | ~Thermostat ()=default |
Additional Inherited Members | |
Protected Attributes inherited from Thermostat | |
| Model & | model |
| double | initTemperature |
| double | targetTemperature |
| double | maxTemperatureChange |
| int | dimensions |
Class for controling the temperature of the simulated system.
| DefaultThermostat::DefaultThermostat | ( | Model & | model, |
| double | temperatureInit, | ||
| double | temperatureTarget, | ||
| double | maxTemperatureChange, | ||
| int | dimensions | ||
| ) |
Construct a default thermostat for a model.
| model | Model on which the thermostat is applied. |
| temperatureInit | The initial temperature of the system. |
| temperatureTarget | Temperature the system should reach and preserve |
| maxTemperatureChange | The maximal absolute temperature change that is allowed for one application of the thermostat. |
| dimensions | Number of dimensions in which the simulation takes place. |
|
overridevirtual |
Helper method to calculate the current kinetic energy of the system.
Implements Thermostat.


|
overridevirtual |
Helper method to calculate the current temperature of the system.
Implements Thermostat.


|
overridevirtual |
Set the temperature of the current system to targetTemperature, if the change in temperature does not exceed maxTemperatureChange. If it does, the temperature will only be adjusted by the value of maxTemperatureChange.
Implements Thermostat.

|
overridevirtual |
Set the temperature of the current system to targetTemperature.
Implements Thermostat.
