Molecular Dynamics Simulation
1.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
~
Functions
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
Typedefs
Enumerations
Related Functions
Files
File List
File Members
All
a
c
d
f
g
i
l
m
o
p
s
t
w
Functions
a
c
d
f
g
l
m
o
p
s
t
w
Variables
Enumerations
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
src
physics
pairwiseforces
PairwiseForceSource.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <iostream>
4
5
#include "
particles/Particle.h
"
6
16
class
PairwiseForceSource
{
17
public
:
23
virtual
~PairwiseForceSource
() =
default
;
24
34
virtual
std::array<double, 3UL>
calculateForce
(
const
Particle
& p,
const
Particle
& q)
const
= 0;
35
39
virtual
explicit
operator
std::string()
const
= 0;
40
};
41
42
// overload the << operator for the PairwiseForceSource class to allow easier printing
43
inline
std::ostream&
operator<<
(std::ostream& os,
const
PairwiseForceSource
&
PairwiseForceSource
) {
44
os << static_cast<std::string>(
PairwiseForceSource
);
45
return
os;
46
}
operator<<
std::ostream & operator<<(std::ostream &os, const PairwiseForceSource &PairwiseForceSource)
Definition:
PairwiseForceSource.h:43
Particle.h
PairwiseForceSource
Interface for pairwise force source classes.
Definition:
PairwiseForceSource.h:16
PairwiseForceSource::~PairwiseForceSource
virtual ~PairwiseForceSource()=default
Virtual destructor for correct cleanup of derived classes.
PairwiseForceSource::calculateForce
virtual std::array< double, 3UL > calculateForce(const Particle &p, const Particle &q) const =0
Calculates the force a particle q exerts on another particle p.
Particle
Class to represent a particle.
Definition:
Particle.h:26
Generated by
1.9.1