100 int spawnParticles(std::vector<Particle>& particles)
const override;
ThirdDimension
Enum class to define the dimension count of the simulation (2D or 3D). Affects primarily the dimensio...
LockState
Enum class to define the lockstate of particles. Locked particles are not allowed to move.
Class to spawn particles in a cuboid. Implements the interface ParticleSpawner.
int spawnParticles(std::vector< Particle > &particles) const override
Spawns particles in the given container.
const ThirdDimension third_dimension
Defines whether to use the third dimension.
const int type
Defines the type of the particles in the cuboid.
double sigma
Defines the Lennard-Jones sigma parameter of the particles in the cuboid.
CuboidSpawner(const std::array< double, 3 > &lower_left_corner, const std::array< int, 3 > &grid_dimensions, double grid_spacing, double mass, const std::array< double, 3 > &initial_velocity, int type, double epsilon=1.0, double sigma=1.2, LockState lock_state=LockState::UNLOCKED, ThirdDimension third_dimension=ThirdDimension::ENABLED, double initial_temperature=0.1)
Constructor.
const double initial_temperature
Defines the initial temperature of the particles in the cuboid.
const std::array< double, 3 > lower_left_corner
Defines the lower left corner where the cuboid will be spawned.
size_t getEstimatedNumberOfParticles() const override
Estimate the number of particles to be spawned.
const LockState lock_state
Defines whether the particles in the cuboid are locked.
const double mass
Defines the mass of the particles in the cuboid.
const std::array< int, 3 > grid_dimensions
Defines how big the cuboid will be. Each entry defines the number of particles in the respective dire...
const double grid_spacing
Defines the spacing between neighboring particles in the cuboid.
double epsilon
Defines the Lennard-Jones epsilon parameter of the particles in the cuboid.
const std::array< double, 3 > initial_velocity
Defines the initial velocity of the particles in the cuboid.
Interface for particle spawner classes.