#include <vector>
#include <cmath>
Go to the source code of this file.
◆ 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
-
particles | A vector to store the particles. |
box | The simulation box where particles will be placed. |
N | The number of particles to initialize. |
random | If true, particles are placed randomly; if false, they are placed in a grid. |