#include <HarmonicForce.h>
|
| | HarmonicForce (double k, double r0) |
| | Initialise the harmonic force. This force acts between neighbors in a membrane. More...
|
| |
| std::array< double, 3 > | compute (Particle &target, Particle &source) override |
| | Actual computation of the harmonic force occurring. More...
|
| |
| std::array< double, 3 > | computeOptimized (Particle &target, Particle &source, std::array< double, 3 > &difference, double distance) override |
| | We needed this to integrate our optimization in our code to prevent breaking the inheritance hierachy. Will be removed, when we integrated the optimization properly. More...
|
| |
| virtual | ~Force ()=default |
| |
◆ HarmonicForce()
| HarmonicForce::HarmonicForce |
( |
double |
k, |
|
|
double |
r0 |
|
) |
| |
Initialise the harmonic force. This force acts between neighbors in a membrane.
- Parameters
-
| k | Stiffness constant. |
| r0 | Average bond length. |
◆ compute()
| std::array< double, 3 > HarmonicForce::compute |
( |
Particle & |
target, |
|
|
Particle & |
source |
|
) |
| |
|
overridevirtual |
Actual computation of the harmonic force occurring.
- Parameters
-
| target | Particle on which the harmonic force acts. |
| source | Particle which exerts the harmonic force on the target. |
- Returns
- 3 dimensional force vector.
Computation of the harmonic force which exerts the source on the target.
Implements Force.
◆ computeOptimized()
| std::array< double, 3 > HarmonicForce::computeOptimized |
( |
Particle & |
target, |
|
|
Particle & |
source, |
|
|
std::array< double, 3 > & |
difference, |
|
|
double |
distance |
|
) |
| |
|
overridevirtual |
We needed this to integrate our optimization in our code to prevent breaking the inheritance hierachy. Will be removed, when we integrated the optimization properly.
Implements Force.
◆ r0
The documentation for this class was generated from the following files:
- /home/runner/work/MolSim/MolSim/src/moleculeSimulator/forceCalculation/harmonic/HarmonicForce.h
- /home/runner/work/MolSim/MolSim/src/moleculeSimulator/forceCalculation/harmonic/HarmonicForce.cpp