#ifndef VELOCITY_DISTRIBUTION_H #define VELOCITY_DISTRIBUTION_H #include #include #include "simulation/coordinates.h" // defined in "velocity_distribution_function.h" class VelocityDistributionFunction; // class to define the minimum requirements of a velocity distribution function // (in the frame center of mass frame) class VelocityDistribution { public: // draw a randomly oriented Cartesian velocity vector at the Coordinate position // using the random engine virtual CartesianVector rollVelocity(const Coordinate& position, std::mt19937* engine) = 0; }; // class that defines a velocity distribution by the usage of a VelocityDistributionFunction // object class VelocityDistributionFromFunction : public VelocityDistribution { public: // Constructor: takes a shared_ptr to the VelocityDistributionFunction, that defines the // distribution to be drawn from VelocityDistributionFromFunction( std::shared_ptr fv); // returns a radnomly oriented CartesianVector drawn from the VelocityDistribution // given at creation of the object CartesianVector rollVelocity(const Coordinate& position, std::mt19937* engine); private: std::shared_ptr fv_; }; #endif /* VELOCITY_DISTRIBUTION_H */