Molecular Dynamics  v0.4
Project for the Practical hosted by the Scientific Computing Chair
LennardJonesForce.h
Go to the documentation of this file.
1 //
2 // Created by daniel on 04.05.24.
3 //
4 
5 #pragma once
6 #include "../Force.h"
7 
8 class LennardJonesForce : public Force {
9 
10 public:
11 
13 
23  std::array<double, 3> compute(Particle &target, Particle &source) override;
24 
31  std::array<double, 3> computeOptimized(Particle &target, Particle &source, std::array<double, 3>& difference, double distance) override;
32 };
Interface representing the force that the source exerts on the target.
Definition: Force.h:14
Definition: LennardJonesForce.h:8
std::array< double, 3 > compute(Particle &target, Particle &source) override
Actual computation of the Lennard-Jones force occurring.
Definition: LennardJonesForce.cpp:10
std::array< double, 3 > computeOptimized(Particle &target, Particle &source, std::array< double, 3 > &difference, double distance) override
Implements the optimization we presented as our second idea. At the moment this is dead code,...
Definition: LennardJonesForce.cpp:21
Definition: Particle.h:16