particles.hpp
Go to the documentation of this file.
Particle< ParticlePCyl > ParticleCyl
Particle class in Cylindrical symmetry.
Definition: particles.hpp:901
static const std::string IQ_unit()
Return string representation for unit of current.
Definition: particles.hpp:167
const double & operator()(int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:377
Geometry definition
static size_t dim()
Returns number of dimensions for geometry.
Definition: particles.hpp:307
const VectorField * _bfield
Magnetic field or NULL.
Definition: particles.hpp:917
static geom_mode_e geom_mode()
Returns geometry mode.
Definition: particles.hpp:130
static geom_mode_e geom_mode()
Returns geometry mode.
Definition: particles.hpp:303
void write_double(std::ostream &s, double value)
Write double value into stream os.
Definition: file.cpp:88
Vec3D velocity() const
Returns the velocity of particle point in Vec3D.
Definition: particles.hpp:357
const CallbackFunctorD_V * _bsup_cb
B-field plasma suppression callback.
Definition: particles.hpp:920
Vec3D location() const
Returns the location of particle point in Vec3D.
Definition: particles.hpp:175
static const std::string IQ_unit()
Return string representation for unit of current.
Definition: particles.hpp:345
Vec3D location() const
Returns the location of particle in Vec3D.
Definition: particles.hpp:790
ParticleP3D(std::istream &s)
Constructor for loading particle point from a file.
Definition: particles.hpp:476
MeshScalarField * _scharge
Space charge field or NULL.
Definition: particles.hpp:915
static geom_mode_e geom_mode()
Returns geometry mode.
Definition: particles.hpp:488
static size_t dim()
Returns number of dimensions for geometry.
Definition: particles.hpp:134
const double & operator[](int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:191
const double & operator[](int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:369
Particle(std::istream &s)
Constructor for loading particle from a file.
Definition: particles.hpp:758
const PP & traj(int i) const
Return const reference to trajectory data.
Definition: particles.hpp:810
void set_bfield_suppression_callback(const CallbackFunctorD_V *bsup_cb)
Set B-field potential dependent suppression callback.
Definition: particles.hpp:930
void clear_trajectory(void)
Clears the particle trajectory.
Definition: particles.hpp:826
static size_t size()
Returns number of coordinates used for particle point.
Definition: particles.hpp:138
Three dimensional vectors.
ParticleP2D(std::istream &s)
Constructor for loading particle point from a file.
Definition: particles.hpp:120
void set_relativistic(bool enable)
Set relativistic particle iteration.
Definition: particles.hpp:936
Vec3D location() const
Returns the location of particle point in Vec3D.
Definition: particles.hpp:535
Vec3D velocity() const
Returns the velocity of particle in Vec3D.
Definition: particles.hpp:794
const double & operator[](int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:551
ParticlePCyl(double t, double x, double vx, double r, double vr, double w)
Constructor for cylindrical particle point.
Definition: particles.hpp:286
const PP & x() const
Return const reference to coordinate data.
Definition: particles.hpp:802
static const std::string IQ_unit()
Return string representation for unit of current.
Definition: particles.hpp:527
size_t traj_size(void) const
Return number of trajectory points of particle.
Definition: particles.hpp:814
double & operator[](int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:365
Vec3D velocity() const
Returns the velocity of particle point in Vec3D.
Definition: particles.hpp:539
double & operator()(int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:373
Vec3D velocity() const
Returns the velocity of particle point in Vec3D.
Definition: particles.hpp:179
const double & operator[](int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:786
void save(std::ostream &s) const
Saves data to stream.
Definition: particles.hpp:722
static size_t dim()
Returns number of dimensions for geometry.
Definition: particles.hpp:492
ParticleBase(std::istream &s)
Constructor for loading particle from a file.
Definition: particles.hpp:682
void add_trajectory_point(const PP &x)
Add trajectory point to the end of the trajectory.
Definition: particles.hpp:818
Definition: callback.hpp:61
particle_status_e get_status()
Return particle status.
Definition: particles.hpp:695
double & operator[](int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:547
ParticleP3D(double t, double x, double vx, double y, double vy, double z, double vz)
Constructor for 3D particle point.
Definition: particles.hpp:470
const double & operator()(int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:559
double & operator()(int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:555
static size_t size()
Returns number of coordinates used for particle point.
Definition: particles.hpp:311
double qm() const
Return charge per mass ratio (q/m) [C/kg].
Definition: particles.hpp:718
void save(std::ostream &s) const
Saves data to stream.
Definition: particles.hpp:599
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.
Definition: particles.cpp:67
void write_int32(std::ostream &s, int32_t value)
Write int32_t value into stream os.
Definition: file.cpp:70
const VectorField * _efield
Electric field or NULL.
Definition: particles.hpp:916
void set_status(particle_status_e status)
Set particle status.
Definition: particles.hpp:699
ParticleP2D(double t, double x, double vx, double y, double vy)
Constructor for 2D particle point.
Definition: particles.hpp:114
ParticlePCyl(std::istream &s)
Constructor for loading particle point from a file.
Definition: particles.hpp:292
bool _relativistic
Do relativistic particle calc?
Definition: particles.hpp:921
static int trajectory_intersections_at_plane(std::vector< ParticlePCyl > &intsc, int crd, double val, const ParticlePCyl &x1, const ParticlePCyl &x2, int extrapolate=0)
Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2...
Definition: particles.cpp:200
General callback functors.
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.
Definition: particles.cpp:227
Physical constants.
double & operator[](int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:782
double IQ() const
Return current or charge carried by trajectory or particle cloud [A/C].
Definition: particles.hpp:706
Vec3D location() const
Returns the location of particle point in Vec3D.
Definition: particles.hpp:353
void save(std::ostream &s) const
Saves data to stream.
Definition: particles.hpp:233
double & operator[](int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:187
static int trajectory_intersections_at_plane(std::vector< ParticleP3D > &intsc, int crd, double val, const ParticleP3D &x1, const ParticleP3D &x2, int extrapolate=0)
Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2...
Definition: particles.cpp:287
double & operator()(int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:774
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,r,vr,w) for one particle.
Definition: particles.cpp:147
static size_t size()
Returns number of coordinates used for particle point.
Definition: particles.hpp:496
Particle(double IQ, double q, double m, const PP &x)
Constructor for particle.
Definition: particles.hpp:753
double & operator()(int i)
Operator for pointing to coordinate data.
Definition: particles.hpp:195
void copy_trajectory(const std::vector< PP > &traj)
Define trajectory by copying.
Definition: particles.hpp:822
const double & operator()(int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:778
const double & operator()(int i) const
Operator for pointing to coordinate data.
Definition: particles.hpp:199
void save(std::ostream &s) const
Saves data to stream.
Definition: particles.hpp:414
void debug_print(std::ostream &os) const
Print debugging information to os.
Definition: particles.hpp:840
Mesh based scalar fields.
Vector field base.
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...
Definition: particles.cpp:120