|
| 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=1.0, double sigma_arg=1.2, LockState lock_state=LockState::UNLOCKED) |
|
| Particle (std::array< double, 3 > x_arg, std::array< double, 3 > v_arg, std::array< double, 3 > f_arg, std::array< double, 3 > old_f_arg, double m_arg, int type=0, double epsilon_arg=1.0, double sigma_arg=1.2, LockState lock_state=LockState::UNLOCKED) |
|
virtual | ~Particle () |
|
Particle & | operator= (const Particle &other) |
|
void | setX (const std::array< double, 3 > &x) |
| Sets the position of the particle. More...
|
|
void | setV (const std::array< double, 3 > &v) |
| Sets the velocity of the particle. More...
|
|
void | setF (const std::array< double, 3 > &f) |
| Sets the force of the particle. More...
|
|
void | addF (const std::array< double, 3 > &force) |
| Adds a force to the particle. More...
|
|
void | subF (const std::array< double, 3 > &force) |
| Subtracts a force from the particle. More...
|
|
void | setOldF (const std::array< double, 3 > &oldF) |
| Sets the old force of the particle. More...
|
|
const std::array< double, 3 > & | getX () const |
| Gets the position of the particle. More...
|
|
const std::array< double, 3 > & | getV () const |
| Gets the velocity of the particle. More...
|
|
const std::array< double, 3 > & | getF () const |
| Gets the total force of the particle. More...
|
|
const std::array< double, 3 > & | getOldF () const |
| Gets the old total force of the particle. More...
|
|
double | getM () const |
| Gets the mass of the particle. More...
|
|
int | getType () const |
| Gets the type of the particle. More...
|
|
double | getEpsilon () const |
| Gets the Lennard-Jones potential parameter epsilon. More...
|
|
double | getSigma () const |
| Gets the Lennard-Jones potential parameter sigma. More...
|
|
void | setLocked (LockState new_lock_state) |
| Set wheter the particle is locked in space. More...
|
|
bool | isLocked () const |
| Gets whether the particle is locked in space. More...
|
|
const std::vector< std::tuple< long, double, double > > & | getConnectedParticles () const |
| Gets the list of connected particles. More...
|
|
void | addConnectedParticle (long ptr_diff, double l_0, double k) |
| Adds a connected particle. More...
|
|
bool | operator== (Particle &other) |
|
bool | operator== (const Particle &other) const |
|
std::string | toString () const |
|
|
std::array< double, 3 > | x {} |
| Position of the particle. More...
|
|
std::array< double, 3 > | v {} |
| Velocity of the particle. More...
|
|
std::array< double, 3 > | f {} |
| Force effective on this particle. More...
|
|
std::array< double, 3 > | old_f {} |
| Force which was effective on this particle. More...
|
|
double | m |
| Mass of this particle. More...
|
|
int | type |
| Type of the particle. Use it for whatever you want (e.g. to separate molecules belonging to different bodies, matters, and so on) More...
|
|
double | epsilon |
| Lennard-Jones potential parameter epsilon. More...
|
|
double | sigma |
| Lennard-Jones potential parameter sigma. More...
|
|
LockState | lock_state |
| Wheter the particle is loccked in space. More...
|
|
std::vector< std::tuple< long, double, double > > | connected_particles |
| List of connected particles. More...
|
|
Class to represent a particle.
Particle.h
Created on: 23.02.2010 Author: eckhardw
Class to represent a particle. A particle has a position, a velocity, a mass and a type. Additionally, the current and previous force exerted on the particle is stored.
Definition at line 26 of file Particle.h.
std::vector<std::tuple<long, double, double> > Particle::connected_particles |
|
private |
List of connected particles.
List of connected particles. Each entry is a tuple of a weak pointer to the connected particle, and the prefered distance between the the particles and the spring constant. The prefered distance is the distance at which the spring force is zero.
entry = (ptr_diff, l_0, k)
Definition at line 89 of file Particle.h.