19 Particle(
double x_init = 0.0,
double y_init = 0.0);
Represents a particle in the 2D simulation box.
Definition initial.h:10
Particle(double x_init=0.0, double y_init=0.0)
Constructs a Particle with the given initial position.
Definition initial.cpp:7
double x
Definition initial.h:12
double y
Position of the particle.
Definition initial.h:12
void updatePosition(double dx, double dy)
Updates the position of the particle.
Definition initial.cpp:10
Manages the 2D simulation box, including periodic boundary conditions.
Definition initial.h:31
double getLy() const
Gets the length of the simulation box in the y-direction.
Definition initial.cpp:53
SimulationBox(double Lx, double Ly)
Constructs a SimulationBox with the given dimensions.
Definition initial.cpp:16
double minimumImageDistanceSquared(const Particle &p1, const Particle &p2) const
Calculates the minimum image distance squared between two particles considering PBC.
Definition initial.cpp:37
double getV() const
Gets the simulation box volume.
Definition initial.cpp:58
void applyPBC(Particle &p) const
Applies periodic boundary conditions to a particle.
Definition initial.cpp:20
double getLx() const
Gets the length of the simulation box in the x-direction.
Definition initial.cpp:48
double minimumImageDistance(const Particle &p1, const Particle &p2) const
Calculates the minimum image distance between two particles considering PBC.
Definition initial.cpp:26
void initializeParticles(std::vector< Particle > &particles, const SimulationBox &box, int N, bool random=true, unsigned int seed=0)
Initializes N particles in the simulation box.
Definition initial.cpp:64