Particle< PP > Class Template Reference

Particle class in some geometry. More...

#include <particles.hpp>

Inheritance diagram for Particle< PP >:

ParticleBase List of all members.

Public Member Functions

 Particle (double IQ, double q, double m, const PP &x)
 Constructor for particle.
 ~Particle ()
 Destructor.
double & operator() (int i)
 Operator for pointing to coordinate data.
const double & operator() (int i) const
 Operator for pointing to coordinate data.
Vec3D location () const
 Returns the location of particle in Vec3D.
Vec3D velocity () const
 Returns the velocity of particle in Vec3D.
PP & x ()
 Return reference to coordinate data.
const PP & x () const
 Return const reference to coordinate data.
PP & traj (int i)
 Return reference to trajectory data.
const PP & traj (int i) const
 Return const reference to trajectory data.
size_t traj_size (void) const
 Return number of trajectory points of particle.
void add_trajectory_point (const PP &x)
 Add trajectory point to the end of the trajectory.
void copy_trajectory (const std::vector< PP > &traj)
 Define trajectory by copying.
void clear_trajectory (void)
 Clears the particle trajectory.
void debug_print (void) const
 Prints internal data to std::cout.

Detailed Description

template<class PP>
class Particle< PP >

Particle class in some geometry.

Contains a templated description of one particle in some geometry. The geometry is selected throught templation, where PP is either ParticleP2D, ParticlePCyl or ParticleP3D. The particle classes for defined geometry modes can be used through defined types Particle2D, ParticleCyl and Particle3D.


Constructor & Destructor Documentation

template<class PP>
Particle< PP >::Particle ( double  IQ,
double  q,
double  m,
const PP &  x 
) [inline]

Constructor for particle.

Make new particle with

Parameters:
IQ Current or charge of the macroparticle (A/C).
q charge state of microscopic particle (C).
m mass of microscopic particle (kg).
x particle coordinates (m and m/s).

template<class PP>
Particle< PP >::~Particle (  )  [inline]

Destructor.


Member Function Documentation

template<class PP>
void Particle< PP >::add_trajectory_point ( const PP &  x  )  [inline]

Add trajectory point to the end of the trajectory.

template<class PP>
void Particle< PP >::clear_trajectory ( void   )  [inline]

Clears the particle trajectory.

template<class PP>
void Particle< PP >::copy_trajectory ( const std::vector< PP > &  traj  )  [inline]

Define trajectory by copying.

template<class PP>
void Particle< PP >::debug_print ( void   )  const [inline]

Prints internal data to std::cout.

template<class PP>
Vec3D Particle< PP >::location (  )  const [inline]

Returns the location of particle in Vec3D.

template<class PP>
const double& Particle< PP >::operator() ( int  i  )  const [inline]

Operator for pointing to coordinate data.

template<class PP>
double& Particle< PP >::operator() ( int  i  )  [inline]

Operator for pointing to coordinate data.

template<class PP>
const PP& Particle< PP >::traj ( int  i  )  const [inline]

Return const reference to trajectory data.

template<class PP>
PP& Particle< PP >::traj ( int  i  )  [inline]

Return reference to trajectory data.

template<class PP>
size_t Particle< PP >::traj_size ( void   )  const [inline]

Return number of trajectory points of particle.

template<class PP>
Vec3D Particle< PP >::velocity (  )  const [inline]

Returns the velocity of particle in Vec3D.

template<class PP>
const PP& Particle< PP >::x (  )  const [inline]

Return const reference to coordinate data.

template<class PP>
PP& Particle< PP >::x (  )  [inline]

Return reference to coordinate data.


The documentation for this class was generated from the following file:
Generated on Thu Apr 21 13:39:22 2011 for IBSimu by  doxygen 1.4.7