Molecular Dynamics Simulation  1.0
AbsoluteThermostat.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <limits>
4 #include <memory>
5 
8 
19  public:
27  AbsoluteThermostat(double target_temperature, double max_temperature_change = std::numeric_limits<double>::max(),
29 
35  void scaleTemperature(const std::unique_ptr<ParticleContainer>& particle_container) const override;
36 
43  double getContainerKineticEnergy(const std::unique_ptr<ParticleContainer>& particle_container) const;
44 
51  double getCurrentContainerTemperature(const std::unique_ptr<ParticleContainer>& particle_container) const override;
52 };
ThirdDimension
Enum class to define the dimension count of the simulation (2D or 3D). Affects primarily the dimensio...
Definition: Enums.h:7
A basic thermostat that can be used to control the temperature of a particle container....
double getCurrentContainerTemperature(const std::unique_ptr< ParticleContainer > &particle_container) const override
Get the current temperature of a particle container.
double getContainerKineticEnergy(const std::unique_ptr< ParticleContainer > &particle_container) const
Get the kinetic energy of all particles in a particle container.
AbsoluteThermostat(double target_temperature, double max_temperature_change=std::numeric_limits< double >::max(), ThirdDimension third_dimension=ThirdDimension::ENABLED)
Construct a new Thermostat object.
void scaleTemperature(const std::unique_ptr< ParticleContainer > &particle_container) const override
Scale the temperature of a particle container towards the target temperature. Capped by the maximum t...
A thermostat that can be used to control the temperature of a particle container. Allows for gradual ...
Definition: Thermostat.h:13
const double max_temperature_change
The maximum temperature change allowed per thermostat application.
Definition: Thermostat.h:94
const double target_temperature
The target temperature for thermostat applications.
Definition: Thermostat.h:89
const ThirdDimension third_dimension
Defines whether the third dimension is enabled.
Definition: Thermostat.h:99