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

Functions

void initializeParticles (std::vector< Particle > &particles, const SimulationBox &box, int N, bool random, unsigned int seed)
 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.