6 #include <boost/random.hpp>
8 #define _USE_MATH_DEFINES
140 double randGamma(
double mean,
double var);
virtual void initializeAcceleration(Particle *p)
NOT REALLY SURE.
Definition: physics.h:118
Physics()
Constructs a Physics object.
Definition: physics.cpp:5
std::valarray< double > getRelativeVelocity(Particle *a, Particle *b)
Returns the relative velocity between two Particles.
Definition: physics.cpp:92
void resolveCollision(Particle *lP, Particle *rP, int timestep)
Resolves a collision between two Particles.
Definition: physics.cpp:30
double randDouble(double min, double max)
Generates a random double within a given range.
Definition: physics.cpp:112
virtual double calculatePE(Particle *p)
Calculates the potential energy of a given Particle.
Definition: physics.cpp:107
virtual void updatePositionAndVelocity(Particle *p, int timestep)=0
Updates the position and velocity of a Particle.
bool isOrbital()
Boolean for if the system is orbiting.
Definition: physics.cpp:26
The Physics class.
Definition: physics.h:15
Definition: particle.h:12
double randGamma(double mean, double var)
Generates a random double within a given range.
Definition: physics.cpp:125
int randBit()
Generates a 0 or 1.
Definition: physics.cpp:133
Particle * getCenterOfGravity()
Returns the centerOfGravity.
Definition: physics.cpp:14
double calculateKE(Particle *p)
Calculates the kinetic energy of a given Particle.
Definition: physics.cpp:102
bool particlesOverlap(Particle *a, Particle *b)
Determines whether or not two Particles overlap.
Definition: physics.cpp:19
double getMagnitude(std::valarray< double > vel)
Returns the magnitude of a vector.
Definition: physics.cpp:97