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
particles
containers
linkedcells
cells
Cell.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
#include <optional>
5
#include <vector>
6
7
#include "
particles/Particle.h
"
8
12
class
Cell
{
13
public
:
17
enum class
CellType
{
INNER
,
BOUNDARY
,
HALO
};
18
19
private
:
23
CellType
cell_type
;
24
28
std::vector<Particle*>
particle_references
;
29
33
std::vector<Cell*>
neighbour_references
;
34
35
public
:
41
explicit
Cell
(
CellType
cell_type
);
42
48
CellType
getCellType
()
const
;
49
55
std::vector<Particle*>&
getParticleReferences
();
56
62
std::vector<Cell*>&
getNeighbourReferences
();
63
69
void
addParticleReference
(
Particle
* p);
70
74
void
clearParticleReferences
();
75
81
void
addNeighbourReference
(
Cell
* c);
82
};
Particle.h
Cell
Class representing a cell in the linked cells algorithm.
Definition:
Cell.h:12
Cell::Cell
Cell(CellType cell_type)
Construct a new Cell object.
Definition:
Cell.cpp:3
Cell::CellType
CellType
Enum representing the type of a cell.
Definition:
Cell.h:17
Cell::CellType::BOUNDARY
@ BOUNDARY
Cell::CellType::HALO
@ HALO
Cell::CellType::INNER
@ INNER
Cell::getCellType
CellType getCellType() const
Get the type of the cell.
Definition:
Cell.cpp:5
Cell::getNeighbourReferences
std::vector< Cell * > & getNeighbourReferences()
Get the reference vector for the neighbouring cells.
Definition:
Cell.cpp:9
Cell::getParticleReferences
std::vector< Particle * > & getParticleReferences()
Get the reference vector for the particles the cell contains.
Definition:
Cell.cpp:7
Cell::neighbour_references
std::vector< Cell * > neighbour_references
References to the neighbouring cells.
Definition:
Cell.h:33
Cell::addNeighbourReference
void addNeighbourReference(Cell *c)
Adds a neighbour reference to the cell.
Definition:
Cell.cpp:15
Cell::particle_references
std::vector< Particle * > particle_references
References to the particles the cell contains.
Definition:
Cell.h:28
Cell::cell_type
CellType cell_type
Type of the cell.
Definition:
Cell.h:23
Cell::clearParticleReferences
void clearParticleReferences()
Removes all particle references from the cell.
Definition:
Cell.cpp:13
Cell::addParticleReference
void addParticleReference(Particle *p)
Adds a particle reference to the cell.
Definition:
Cell.cpp:11
Particle
Class to represent a particle.
Definition:
Particle.h:26
Generated by
1.9.1