Particle point class for 2D. More...
#include <particles.hpp>

Public Member Functions | |
ParticleP2D () | |
Default constuctor. More... | |
ParticleP2D (double t, double x, double vx, double y, double vy) | |
Constructor for 2D particle point. More... | |
ParticleP2D (std::istream &s) | |
Constructor for loading particle point from a file. More... | |
void | clear () |
Clear point to zero. More... | |
Vec3D | location () const |
Returns the location of particle point in Vec3D. More... | |
Vec3D | velocity () const |
Returns the velocity of particle point in Vec3D. More... | |
double | speed () |
Returns speed of particle. More... | |
double & | operator[] (int i) |
Operator for pointing to coordinate data. More... | |
const double & | operator[] (int i) const |
Operator for pointing to coordinate data. More... | |
double & | operator() (int i) |
Operator for pointing to coordinate data. More... | |
const double & | operator() (int i) const |
Operator for pointing to coordinate data. More... | |
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. More... | |
Static Public Member Functions | |
static geom_mode_e | geom_mode () |
Returns geometry mode. More... | |
static size_t | dim () |
Returns number of dimensions for geometry. More... | |
static size_t | size () |
Returns number of coordinates used for particle point. More... | |
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. More... | |
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. More... | |
static const std::string | IQ_unit () |
Return string representation for unit of current. More... | |
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() [1/3]
|
inline |
Default constuctor.
◆ ParticleP2D() [2/3]
|
inline |
Constructor for 2D particle point.
◆ ParticleP2D() [3/3]
|
inline |
Constructor for loading particle point from a file.
Member Function Documentation
◆ clear()
|
inline |
Clear point to zero.
◆ dim()
|
inlinestatic |
Returns number of dimensions for geometry.
◆ geom_mode()
|
inlinestatic |
Returns geometry mode.
◆ get_derivatives()
|
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:
◆ IQ_unit()
|
inlinestatic |
Return string representation for unit of current.
Returns "A/m".
◆ location()
◆ operator()() [1/2]
|
inline |
Operator for pointing to coordinate data.
◆ operator()() [2/2]
|
inline |
Operator for pointing to coordinate data.
◆ operator[]() [1/2]
|
inline |
Operator for pointing to coordinate data.
◆ operator[]() [2/2]
|
inline |
Operator for pointing to coordinate data.
◆ save()
|
inline |
Saves data to stream.
◆ size()
|
inlinestatic |
Returns number of coordinates used for particle point.
◆ speed()
|
inline |
Returns speed of particle.
◆ trajectory_intersections_at_plane()
|
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.
◆ velocity()
The documentation for this class was generated from the following files: