ParticleP2D Class Reference
Particle point class for 2D. More...
#include <particles.hpp>
Public Member Functions | |
| ParticleP2D () | |
| Default constuctor. | |
| ParticleP2D (double t, double x, double vx, double y, double vy) | |
| Constructor for 2D particle point. | |
| ParticleP2D (std::istream &s) | |
| Constructor for loading particle point from a file. | |
| 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. | |
| ParticleP2D | operator+ (const ParticleP2D &pp) const |
| ParticleP2D | operator- (const ParticleP2D &pp) const |
| ParticleP2D | operator* (double x) const |
| void | save (std::ostream &s) const |
| Saves data to stream. | |
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) for one particle. | |
| static int | trajectory_intersections_at_plane (std::vector< ParticleP2D > &intsc, int crd, double val, const ParticleP2D &x1, const ParticleP2D &x2, int extrapolate=0) |
| Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc. | |
| static const std::string | IQ_unit () |
| Return string representation for unit of current. | |
Friends | |
| ParticleP2D | operator* (double x, const ParticleP2D &pp) |
Detailed Description
Particle point class for 2D.
A collection of particle coordinates (t,x,vx,y,vy) to describe time, location and velocity in 2D.
Constructor & Destructor Documentation
| ParticleP2D::ParticleP2D | ( | ) | [inline] |
Default constuctor.
| ParticleP2D::ParticleP2D | ( | double | t, | |
| double | x, | |||
| double | vx, | |||
| double | y, | |||
| double | vy | |||
| ) | [inline] |
Constructor for 2D particle point.
| ParticleP2D::ParticleP2D | ( | std::istream & | s | ) | [inline] |
Constructor for loading particle point from a file.
Member Function Documentation
| static size_t ParticleP2D::dim | ( | void | ) | [inline, static] |
Returns number of dimensions for geometry.
| static geom_mode_e ParticleP2D::geom_mode | ( | void | ) | [inline, static] |
Returns geometry mode.
| static int ParticleP2D::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) 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 2D the set is:
| static const std::string ParticleP2D::IQ_unit | ( | ) | [inline, static] |
Return string representation for unit of current.
Returns "A/m".
| double& ParticleP2D::operator() | ( | int | i | ) | [inline] |
Operator for pointing to coordinate data.
| const double& ParticleP2D::operator() | ( | int | i | ) | const [inline] |
Operator for pointing to coordinate data.
| ParticleP2D ParticleP2D::operator* | ( | double | x | ) | const [inline] |
| ParticleP2D ParticleP2D::operator+ | ( | const ParticleP2D & | pp | ) | const [inline] |
| ParticleP2D ParticleP2D::operator- | ( | const ParticleP2D & | pp | ) | const [inline] |
| const double& ParticleP2D::operator[] | ( | int | i | ) | const [inline] |
Operator for pointing to coordinate data.
| double& ParticleP2D::operator[] | ( | int | i | ) | [inline] |
Operator for pointing to coordinate data.
| void ParticleP2D::save | ( | std::ostream & | s | ) | const [inline] |
Saves data to stream.
| static size_t ParticleP2D::size | ( | void | ) | [inline, static] |
Returns number of coordinates used for particle point.
| double ParticleP2D::speed | ( | ) | [inline] |
Returns speed of particle.
| static int ParticleP2D::trajectory_intersections_at_plane | ( | std::vector< ParticleP2D > & | intsc, | |
| int | crd, | |||
| double | val, | |||
| const ParticleP2D & | x1, | |||
| const ParticleP2D & | x2, | |||
| int | extrapolate = 0 | |||
| ) | [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.
Friends And Related Function Documentation
| ParticleP2D operator* | ( | double | x, | |
| const ParticleP2D & | pp | |||
| ) | [friend] |
The documentation for this class was generated from the following file: