GCMC Simulation
A C++ and Python-based Monte Carlo simulation framework for interacting particles.
Loading...
Searching...
No Matches
initial.h File Reference
#include <vector>
#include <cmath>

Go to the source code of this file.

Classes

class  Particle
 Represents a particle in the 2D simulation box. More...
 
class  SimulationBox
 Manages the 2D simulation box, including periodic boundary conditions. More...
 

Functions

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.
 

Function Documentation

◆ initializeParticles()

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.

Parameters
particlesA vector to store the particles.
boxThe simulation box where particles will be placed.
NThe number of particles to initialize.
randomIf true, particles are placed randomly; if false, they are placed in a grid.