Molecular Dynamics Simulation  1.0
RelativeThermostat.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <limits>
4 #include <memory>
5 
8 
20  public:
28  RelativeThermostat(double target_temperature, double max_temperature_change = std::numeric_limits<double>::max(),
30 
36  void scaleTemperature(const std::unique_ptr<ParticleContainer>& particle_container) const override;
37 
45  double getContainerKineticEnergy(const std::unique_ptr<ParticleContainer>& particle_container,
46  std::array<double, 3> average_velocity) const;
47 
54  double getCurrentContainerTemperature(const std::unique_ptr<ParticleContainer>& particle_container,
55  std::array<double, 3> average_velocity) const;
56 
63  double getCurrentContainerTemperature(const std::unique_ptr<ParticleContainer>& particle_container) const override;
64 };
ThirdDimension
Enum class to define the dimension count of the simulation (2D or 3D). Affects primarily the dimensio...
Definition: Enums.h:7
A relative thermostat that can be used to control the temperature of a particle container....
double getCurrentContainerTemperature(const std::unique_ptr< ParticleContainer > &particle_container, std::array< double, 3 > average_velocity) const
Get the current temperature of a particle.
double getContainerKineticEnergy(const std::unique_ptr< ParticleContainer > &particle_container, std::array< double, 3 > average_velocity) const
Get the kinetic energy of a particle.
RelativeThermostat(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