29 Particle::Particle(std::array<double, 3> x_arg, std::array<double, 3> v_arg,
double m_arg,
int type_arg,
double epsilon_arg,
30 double sigma_arg,
LockState lock_state_arg) {
43 Particle::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,
44 double m_arg,
int type_arg,
double epsilon_arg,
double sigma_arg,
LockState lock_state_arg) {
77 std::stringstream stream;
78 stream <<
"Particle: X:" <<
x <<
" v: " <<
v <<
" f: " <<
f <<
" old_f: " <<
old_f <<
" type: " <<
type;
83 return (
x == other.
x) and (
v == other.
v) and (
f == other.
f) and (
type == other.
type) and (
m == other.
m) and (
old_f == other.
old_f);
87 return (
x == other.
x) and (
v == other.
v) and (
f == other.
f) and (
type == other.
type) and (
m == other.
m) and (
old_f == other.
old_f);
LockState
Enum class to define the lockstate of particles. Locked particles are not allowed to move.
std::ostream & operator<<(std::ostream &stream, Particle &p)
static std::shared_ptr< spdlog::logger > logger
Publically accessible shared pointer to the logger.
Class to represent a particle.
std::array< double, 3 > x
Position of the particle.
double epsilon
Lennard-Jones potential parameter epsilon.
std::array< double, 3 > v
Velocity of the particle.
Particle(const Particle &other)
int type
Type of the particle. Use it for whatever you want (e.g. to separate molecules belonging to different...
std::string toString() const
bool operator==(Particle &other)
Particle & operator=(const Particle &other)
void addConnectedParticle(long ptr_diff, double l_0, double k)
Adds a connected particle.
std::array< double, 3 > f
Force effective on this particle.
std::array< double, 3 > old_f
Force which was effective on this particle.
double sigma
Lennard-Jones potential parameter sigma.
LockState lock_state
Wheter the particle is loccked in space.
double m
Mass of this particle.
std::vector< std::tuple< long, double, double > > connected_particles
List of connected particles.