#include <Particle.h>
|
| | Particle (int type=0) |
| |
| | Particle (const Particle &other) |
| |
| | Particle (std::array< double, 3 > x_arg, std::array< double, 3 > v_arg, double m_arg, int type=0, double epsilon_arg=5, double sigma_arg=1) |
| |
| void | resetForce () |
| | Set force to oldForce and set force to 0. More...
|
| |
| double | calculateEKin () const |
| | Calculate the current kinetic energy of the particle. More...
|
| |
| double | calculateEKinFlow (std::array< double, 3 > &avgVelocity) const |
| | Calculate the current kinetic energy of the particle within a flow simulation. More...
|
| |
| void | addDirectNeighbor (int idToAdd) |
| |
| void | addDiagonalNeighbor (int idToAdd) |
| |
| bool | isDirectNeighbor (Particle &neighbor) |
| | Check, if particle neighbor is a direct neighbor of this particle. More...
|
| |
| bool | isDiagonalNeighbor (Particle &neighbor) |
| | Check, if particle neighbor is a diagonal neighbor of this particle. More...
|
| |
| virtual | ~Particle () |
| |
| const std::array< double, 3 > & | getX () const |
| |
| const std::array< double, 3 > & | getV () const |
| |
| const std::array< double, 3 > & | getF () const |
| |
| const std::array< double, 3 > & | getOldF () const |
| |
| double | getM () const |
| |
| int | getType () const |
| |
| double | getEpsilon () const |
| |
| double | getSigma () const |
| |
| int | getId () const |
| |
| bool | isMarked () const |
| |
| std::vector< int > & | getDirectNeighbors () |
| |
| std::vector< int > & | getDiagonalNeighbors () |
| |
| bool | isFixed () const |
| |
| void | setOldF (const std::array< double, 3 > &oldF) |
| |
| void | setF (const std::array< double, 3 > &f) |
| |
| void | setX (const std::array< double, 3 > &x) |
| |
| void | setV (const std::array< double, 3 > &v) |
| |
| void | setType (int type) |
| |
| void | setMarked (bool status) |
| |
| void | setFixed (bool status) |
| |
| bool | operator== (Particle &other) const |
| |
| std::string | toString () const |
| |
◆ Particle() [1/3]
| Particle::Particle |
( |
int |
type = 0 | ) |
|
|
explicit |
◆ Particle() [2/3]
| Particle::Particle |
( |
const Particle & |
other | ) |
|
◆ Particle() [3/3]
| Particle::Particle |
( |
std::array< double, 3 > |
x_arg, |
|
|
std::array< double, 3 > |
v_arg, |
|
|
double |
m_arg, |
|
|
int |
type = 0, |
|
|
double |
epsilon_arg = 5, |
|
|
double |
sigma_arg = 1 |
|
) |
| |
◆ ~Particle()
◆ addDiagonalNeighbor()
| void Particle::addDiagonalNeighbor |
( |
int |
idToAdd | ) |
|
Make particle p a diagonal neighbor of this particle.
- Parameters
-
| idToAdd | New diagonal neighbor of this particle. |
◆ addDirectNeighbor()
| void Particle::addDirectNeighbor |
( |
int |
idToAdd | ) |
|
Make particle p a direct neighbor of this particle.
- Parameters
-
| idToAdd | New direct neighbor of this particle. |
◆ calculateEKin()
| double Particle::calculateEKin |
( |
| ) |
const |
Calculate the current kinetic energy of the particle.
- Returns
- kinetic energy of the particle.
◆ calculateEKinFlow()
| double Particle::calculateEKinFlow |
( |
std::array< double, 3 > & |
avgVelocity | ) |
const |
Calculate the current kinetic energy of the particle within a flow simulation.
- Parameters
-
| avgVelocity | Average velocity of the particles within the system. |
- Returns
- kinetic energy of the particle.
◆ getDiagonalNeighbors()
| std::vector< int > & Particle::getDiagonalNeighbors |
( |
| ) |
|
◆ getDirectNeighbors()
| std::vector< int > & Particle::getDirectNeighbors |
( |
| ) |
|
◆ getEpsilon()
| double Particle::getEpsilon |
( |
| ) |
const |
◆ getF()
| const std::array< double, 3 > & Particle::getF |
( |
| ) |
const |
◆ getId()
| int Particle::getId |
( |
| ) |
const |
◆ getM()
| double Particle::getM |
( |
| ) |
const |
◆ getOldF()
| const std::array< double, 3 > & Particle::getOldF |
( |
| ) |
const |
◆ getSigma()
| double Particle::getSigma |
( |
| ) |
const |
◆ getType()
| int Particle::getType |
( |
| ) |
const |
◆ getV()
| const std::array< double, 3 > & Particle::getV |
( |
| ) |
const |
◆ getX()
| const std::array< double, 3 > & Particle::getX |
( |
| ) |
const |
◆ isDiagonalNeighbor()
| bool Particle::isDiagonalNeighbor |
( |
Particle & |
neighbor | ) |
|
Check, if particle neighbor is a diagonal neighbor of this particle.
- Parameters
-
- Returns
- True, if the specified particle is a diagonal neighbor. False otherwise.
◆ isDirectNeighbor()
| bool Particle::isDirectNeighbor |
( |
Particle & |
neighbor | ) |
|
Check, if particle neighbor is a direct neighbor of this particle.
- Parameters
-
- Returns
- True, if the specified particle is a direct neighbor. False otherwise.
◆ isFixed()
| bool Particle::isFixed |
( |
| ) |
const |
◆ isMarked()
| bool Particle::isMarked |
( |
| ) |
const |
◆ operator==()
| bool Particle::operator== |
( |
Particle & |
other | ) |
const |
◆ resetForce()
| void Particle::resetForce |
( |
| ) |
|
Set force to oldForce and set force to 0.
◆ resetID()
| void Particle::resetID |
( |
| ) |
|
|
static |
Reset Id for testing purposes.
◆ setF()
| void Particle::setF |
( |
const std::array< double, 3 > & |
f | ) |
|
◆ setFixed()
| void Particle::setFixed |
( |
bool |
status | ) |
|
◆ setMarked()
| void Particle::setMarked |
( |
bool |
status | ) |
|
◆ setOldF()
| void Particle::setOldF |
( |
const std::array< double, 3 > & |
oldF | ) |
|
◆ setType()
| void Particle::setType |
( |
int |
type | ) |
|
◆ setV()
| void Particle::setV |
( |
const std::array< double, 3 > & |
v | ) |
|
◆ setX()
| void Particle::setX |
( |
const std::array< double, 3 > & |
x | ) |
|
◆ toString()
| std::string Particle::toString |
( |
| ) |
const |
◆ diagonalNeighbors
| std::vector<int> Particle::diagonalNeighbors |
|
private |
Diagonal neighbors within a membrane.
◆ directNeighbors
| std::vector<int> Particle::directNeighbors |
|
private |
Direct neighbors within a membrane.
◆ epsilon
Lennard-Jones-Parameter epsilon.
| std::array<double, 3> Particle::f {} |
|
private |
Force effective on this particle.
◆ fixed
Fixed particles belong to a wall. Needed for study nanofluidics.
◆ forceAccumulator
| std::vector<std::array<double,3> > Particle::forceAccumulator |
|
private |
Each thread has its own value to accumulate the forces it has calculated.
◆ forceMarker
| std::vector<bool> Particle::forceMarker |
|
private |
Mark, which forces of the reduction vector are unequal to 0.
◆ id
Id to set neighbor relationships between particles.
◆ marked
Mark particles to which a special force should be applied.
◆ nextId
Id of the particle that is created next.
◆ old_f
| std::array<double, 3> Particle::old_f {} |
|
private |
Force which was effective on this particle.
◆ sigma
Lennard-Jones-Parameter sigma.
◆ type
Type of the particle. Use it for whatever you want (e.g. to separate molecules belonging to different bodies, matters, and so on).
| std::array<double, 3> Particle::v {} |
|
private |
| std::array<double, 3> Particle::x {} |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/MolSim/MolSim/src/particleRepresentation/particle/Particle.h
- /home/runner/work/MolSim/MolSim/src/particleRepresentation/particle/Particle.cpp