GR Engine
A physics engine in curved space-time
 All Classes Files Functions Variables
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Particle Class Reference

Class representing a particle with defined position and 4-velocity. More...

#include <particle.h>

Inheritance diagram for Particle:
DiffEq Entity

Public Member Functions

 Particle (Manifold *_m)
 Constructor. More...
 
 Particle (Manifold *_m, Point _p, vector4 _u)
 Constructor. More...
 
virtual ~Particle ()
 Destructor.
 
void setIntegrator (Integrator *)
 Sets the integrator to be used for propagation.
 
StateVector derivative (StateVector v)
 Overloaded method from DiffEq. More...
 
void propagate (double step=0.0)
 Propagates the particle. More...
 
int getCoordSystem ()
 Returns the current coordinate system in use.
 
virtual void setCoordSystem (int)
 Changes the coordinate system in use.
 
Point getPos ()
 Returns the position.
 
vector4 getVel ()
 Returns the 4-velocity.
 
virtual void setPosVel (Point _p, vector4 _u)
 Changes the position and 4-velocity. More...
 
virtual void setVel (vector4 _u)
 Changes the 4-velocity. More...
 
- Public Member Functions inherited from DiffEq
 DiffEq ()
 Constructor.
 
virtual ~DiffEq ()
 Virtual destructor.
 

Protected Member Functions

virtual StateVector constructState ()
 Constructs a state vector from the internal state.
 
virtual void setState (StateVector)
 Sets the internal state to a state represented by a StateVector.
 
virtual Point getPosFromState (StateVector)
 Reads the position from a StateVector.
 
virtual vector4 getVelFromState (StateVector)
 Reads the 4-velocity from a StateVector.
 

Protected Attributes

Point p
 
vector4 u
 
Manifoldm
 
Integratorintegrator
 

Detailed Description

Class representing a particle with defined position and 4-velocity.

Inherits DiffEq - defines the geodesic equation.

Constructor & Destructor Documentation

Particle::Particle ( Manifold _m)

Constructor.

Parameters
_mThe manifold on which the particle is defined
Particle::Particle ( Manifold _m,
Point  _p,
vector4  _u 
)

Constructor.

Parameters
_mThe manifold on which the particle is defined
_pThe initial position
_uThe initial 4-velocity

Member Function Documentation

StateVector Particle::derivative ( StateVector  v)
virtual

Overloaded method from DiffEq.

Parameters
vCurrent state
Returns
The derivative of the current state as given by the geodesic equation.

Implements DiffEq.

void Particle::propagate ( double  step = 0.0)

Propagates the particle.

Parameters
stepThe simulation step - corresponds to the change in proper time.
void Particle::setPosVel ( Point  _p,
vector4  _u 
)
virtual

Changes the position and 4-velocity.

Parameters
_pThe new position
_uThe new 4-velocity

Reimplemented in Entity.

void Particle::setVel ( vector4  _u)
virtual

Changes the 4-velocity.

Parameters
_uThe new 4-velocity

Reimplemented in Entity.


The documentation for this class was generated from the following files: