Many, many more comments
This commit is contained in:
@@ -6,17 +6,27 @@
|
||||
|
||||
#include "simulation/coordinates.h"
|
||||
|
||||
// defined in "simulation/energy_distribution.h"
|
||||
class EnergyDistributionFunction;
|
||||
|
||||
// class to define minimum requirements for a VelocityDistributionFunction child class
|
||||
class VelocityDistributionFunction {
|
||||
public:
|
||||
virtual CartesianVector rollVelocity(std::mt19937* engine) = 0;
|
||||
};
|
||||
|
||||
// class for a velocity distribution, that has a isotropically distributed
|
||||
// direction of the velocity vector and an modulus that is inferred from
|
||||
// an energy distribution
|
||||
class IsotropicDistribution : public VelocityDistributionFunction {
|
||||
public:
|
||||
// Constructor: takes a shared_ptr to an EnergyDistributionFunction that describes
|
||||
// the distribution of the energy and the mass of the particle
|
||||
// to transform the drawn energy to the corresponding velocity
|
||||
IsotropicDistribution(std::shared_ptr<EnergyDistributionFunction> f_E,
|
||||
double mass_kg);
|
||||
// draw an isotropically directed velocity vector with a modulus determined by the
|
||||
// EnergyDistributionFunction given at construction of the object
|
||||
CartesianVector rollVelocity(std::mt19937* engine);
|
||||
|
||||
private:
|
||||
@@ -24,11 +34,19 @@ class IsotropicDistribution : public VelocityDistributionFunction {
|
||||
const double mass_kg_;
|
||||
};
|
||||
|
||||
// class for a velocity distribution, that has a fixed direction of the velocity vector
|
||||
// and an modulus that is inferred from an energy distribution
|
||||
class DirectedDistribution : public VelocityDistributionFunction {
|
||||
public:
|
||||
// Constructor: takes a shared_ptr to an EnergyDistributionFunction that describes
|
||||
// the distribution of the energy and the mass of the particle
|
||||
// to transform the drawn energy to the corresponding velocity
|
||||
// and the direction of the velocity vector
|
||||
DirectedDistribution(std::shared_ptr<EnergyDistributionFunction> f_E,
|
||||
double mass_kg,
|
||||
const CartesianVector& direction);
|
||||
// draw a directed velocity vector with a modulus determined by the
|
||||
// EnergyDistributionFunction given at construction of the object
|
||||
CartesianVector rollVelocity(std::mt19937* engine);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user