IBSimu 1.0.4
|
Particle point class for 3D. More...
#include <particles.hpp>
Public Member Functions | |
ParticleP3D () | |
Default constuctor. | |
ParticleP3D (double t, double x, double vx, double y, double vy, double z, double vz) | |
Constructor for 3D particle point. | |
Vec3D | location () const |
Returns the location of particle point in Vec3D. | |
Vec3D | velocity () const |
Returns the velocity of particle point in Vec3D. | |
double | speed () |
Returns speed of particle. | |
double & | operator[] (int i) |
Operator for pointing to coordinate data. | |
const double & | operator[] (int i) const |
Operator for pointing to coordinate data. | |
double & | operator() (int i) |
Operator for pointing to coordinate data. | |
const double & | operator() (int i) const |
Operator for pointing to coordinate data. | |
ParticleP3D | operator+ (const ParticleP3D &pp) const |
ParticleP3D | operator- (const ParticleP3D &pp) const |
ParticleP3D | operator* (double x) const |
Static Public Member Functions | |
static geom_mode_e | geom_mode () |
Returns geometry mode. | |
static size_t | dim () |
Returns number of dimensions for geometry. | |
static size_t | size () |
Returns number of coordinates used for particle point. | |
static int | get_derivatives (double t, const double *x, double *dxdt, void *data) |
Returns time derivatives dxdt of coordinates at time t and coordinates x = (x,vx,y,vy,z,vz) for one particle. | |
static int | trajectory_intersections_at_plane (std::vector< ParticleP3D > &intsc, int crd, double val, const ParticleP3D &x1, const ParticleP3D &x2) |
Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc. | |
Friends | |
ParticleP3D | operator* (double x, const ParticleP3D &pp) |
Particle point class for 3D.
A collection of particle coordinates (t,x,vx,y,vy,z,vz)to describe time, location and velocity in 3D.
ParticleP3D::ParticleP3D | ( | ) | [inline] |
Default constuctor.
ParticleP3D::ParticleP3D | ( | double | t, |
double | x, | ||
double | vx, | ||
double | y, | ||
double | vy, | ||
double | z, | ||
double | vz | ||
) | [inline] |
Constructor for 3D particle point.
static size_t ParticleP3D::dim | ( | void | ) | [inline, static] |
Returns number of dimensions for geometry.
static geom_mode_e ParticleP3D::geom_mode | ( | void | ) | [inline, static] |
Returns geometry mode.
static int ParticleP3D::get_derivatives | ( | double | t, |
const double * | x, | ||
double * | dxdt, | ||
void * | data | ||
) | [static] |
Returns time derivatives dxdt of coordinates at time t and coordinates x = (x,vx,y,vy,z,vz) for one particle.
The calculation of particle trajectory is done by integrating the Lorentz equation in a form of a set of ordinary differential equations. In the case of 3D the set is:
double& ParticleP3D::operator() | ( | int | i | ) | [inline] |
Operator for pointing to coordinate data.
const double& ParticleP3D::operator() | ( | int | i | ) | const [inline] |
Operator for pointing to coordinate data.
ParticleP3D ParticleP3D::operator* | ( | double | x | ) | const [inline] |
ParticleP3D ParticleP3D::operator+ | ( | const ParticleP3D & | pp | ) | const [inline] |
ParticleP3D ParticleP3D::operator- | ( | const ParticleP3D & | pp | ) | const [inline] |
double& ParticleP3D::operator[] | ( | int | i | ) | [inline] |
Operator for pointing to coordinate data.
const double& ParticleP3D::operator[] | ( | int | i | ) | const [inline] |
Operator for pointing to coordinate data.
static size_t ParticleP3D::size | ( | void | ) | [inline, static] |
Returns number of coordinates used for particle point.
double ParticleP3D::speed | ( | ) | [inline] |
Returns speed of particle.
static int ParticleP3D::trajectory_intersections_at_plane | ( | std::vector< ParticleP3D > & | intsc, |
int | crd, | ||
double | val, | ||
const ParticleP3D & | x1, | ||
const ParticleP3D & | x2 | ||
) | [static] |
Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc.
ParticleP3D operator* | ( | double | x, |
const ParticleP3D & | pp | ||
) | [friend] |