Molecular Dynamics Simulation  1.0
HarmonicForce.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <array>
4 #include <variant>
5 
8 
14  std::array<double, 3> domain_size;
15 
16  public:
20  explicit HarmonicForce(const std::variant<SimulationParams::DirectSumType, SimulationParams::LinkedCellsType>& container_data);
21 
27  std::array<double, 3UL> calculateForce(Particle& p) const override;
28 
32  explicit operator std::string() const override;
33 };
Class to calculate the harmonic force on a particle.
Definition: HarmonicForce.h:12
std::array< double, 3 > domain_size
Definition: HarmonicForce.h:14
HarmonicForce(const std::variant< SimulationParams::DirectSumType, SimulationParams::LinkedCellsType > &container_data)
Constructor for the GlobalDownwardsGravity class.
bool is_finite_container
Definition: HarmonicForce.h:13
std::array< double, 3UL > calculateForce(Particle &p) const override
Calculates the harmonic force on a particle supplied by all its connected neighbors.
Class to represent a particle.
Definition: Particle.h:26
Interface for simple force source classes.