6 static std::default_random_engine random_engine(10242);
10 std::normal_distribution<double> normal_distribution{0, 1};
11 std::array<double, 3> random_velocity{};
12 for (
size_t i = 0; i < dimensions; ++i) {
13 random_velocity[i] =
averageVelocity * normal_distribution(random_engine);
15 return random_velocity;
std::array< double, 3 > maxwellBoltzmannDistributedVelocity(double averageVelocity, size_t dimensions)
std::array< double, 3 > averageVelocity(const std::unique_ptr< ParticleContainer > &particle_container)