Molecular Dynamics Simulation
1.0
src
physics
simpleforces
HarmonicForce.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
#include <variant>
5
6
#include "
physics/simpleforces/SimpleForceSource.h
"
7
#include "
simulation/SimulationParams.h
"
8
12
class
HarmonicForce
:
public
SimpleForceSource
{
13
bool
is_finite_container
;
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
};
SimpleForceSource.h
SimulationParams.h
HarmonicForce
Class to calculate the harmonic force on a particle.
Definition:
HarmonicForce.h:12
HarmonicForce::domain_size
std::array< double, 3 > domain_size
Definition:
HarmonicForce.h:14
HarmonicForce::HarmonicForce
HarmonicForce(const std::variant< SimulationParams::DirectSumType, SimulationParams::LinkedCellsType > &container_data)
Constructor for the GlobalDownwardsGravity class.
Definition:
HarmonicForce.cpp:6
HarmonicForce::is_finite_container
bool is_finite_container
Definition:
HarmonicForce.h:13
HarmonicForce::calculateForce
std::array< double, 3UL > calculateForce(Particle &p) const override
Calculates the harmonic force on a particle supplied by all its connected neighbors.
Definition:
HarmonicForce.cpp:15
Particle
Class to represent a particle.
Definition:
Particle.h:26
SimpleForceSource
Interface for simple force source classes.
Definition:
SimpleForceSource.h:16
Generated by
1.9.1