Molecular Dynamics  v0.4
Project for the Practical hosted by the Scientific Computing Chair
Public Member Functions | List of all members
LennardJonesForce Class Reference

#include <LennardJonesForce.h>

Inheritance diagram for LennardJonesForce:
Inheritance graph
Collaboration diagram for LennardJonesForce:
Collaboration graph

Public Member Functions

 LennardJonesForce ()
 
std::array< double, 3 > compute (Particle &target, Particle &source) override
 Actual computation of the Lennard-Jones force occurring. More...
 
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, because we have not been able yet to make it compatible with our current program structure and only integrated it once when doing the time measurements. More...
 
- Public Member Functions inherited from Force
virtual ~Force ()=default
 

Constructor & Destructor Documentation

◆ LennardJonesForce()

LennardJonesForce::LennardJonesForce ( )
default

Member Function Documentation

◆ compute()

std::array< double, 3 > LennardJonesForce::compute ( Particle target,
Particle source 
)
overridevirtual

Actual computation of the Lennard-Jones force occurring.

Parameters
targetParticle on which the Lennard-Jones force acts.
sourceParticle which exerts the Lennard-Jones force on the target.
Returns
3 dimensional force vector.

Computation of the Lennard-Jones force which exerts the source on the target.

Implements Force.

Here is the call graph for this function:

◆ computeOptimized()

std::array< double, 3 > LennardJonesForce::computeOptimized ( Particle target,
Particle source,
std::array< double, 3 > &  difference,
double  distance 
)
overridevirtual

Implements the optimization we presented as our second idea. At the moment this is dead code, because we have not been able yet to make it compatible with our current program structure and only integrated it once when doing the time measurements.

Implements Force.

Here is the call graph for this function:

The documentation for this class was generated from the following files: