GCMC Simulation
A C++ and Python-based Monte Carlo simulation framework for interacting particles.
Loading...
Searching...
No Matches
Particle Class Reference

Represents a particle in the 2D simulation box. More...

#include <initial.h>

Public Member Functions

 Particle (double x_init=0.0, double y_init=0.0)
 Constructs a Particle with the given initial position.
 
void updatePosition (double dx, double dy)
 Updates the position of the particle.
 

Public Attributes

double x
 
double y
 Position of the particle.
 

Detailed Description

Represents a particle in the 2D simulation box.

Constructor & Destructor Documentation

◆ Particle()

Particle::Particle ( double x_init = 0.0,
double y_init = 0.0 )

Constructs a Particle with the given initial position.

Parameters
x_initInitial x-coordinate of the particle.
y_initInitial y-coordinate of the particle.

Member Function Documentation

◆ updatePosition()

void Particle::updatePosition ( double dx,
double dy )

Updates the position of the particle.

Parameters
dxDisplacement in the x-direction.
dyDisplacement in the y-direction.

Member Data Documentation

◆ x

double Particle::x

◆ y

double Particle::y

Position of the particle.


The documentation for this class was generated from the following files: