Public Member Functions | List of all members
ParticleIterator< PP > Class Template Reference

Particle iterator class for continuous Vlasov-type iteration. More...

#include <particleiterator.hpp>

Public Member Functions

 ParticleIterator (particle_iterator_type_e type, double epsabs, double epsrel, bool polyint, uint32_t maxsteps, double maxt, uint32_t trajdiv, bool mirror[6], ScalarField *scharge, pthread_mutex_t *scharge_mutex, const VectorField *efield, const VectorField *bfield, const Geometry *geom)
 Constructor for new particle iterator.
 
 ~ParticleIterator ()
 Destructor.
 
void set_trajectory_handler_callback (const TrajectoryHandlerCallback *thand_cb)
 Set trajectory handler callback.
 
void set_trajectory_end_callback (const TrajectoryEndCallback *tend_cb, ParticleDataBase *pdb)
 Set trajectory end callback.
 
void set_bfield_suppression_callback (const CallbackFunctorD_V *bsup_cb)
 Set B-field potential dependent suppression callback.
 
const ParticleStatisticsget_statistics (void) const
 Get particle iterator statistics.
 
void operator() (Particle< PP > *particle, uint32_t pi)
 Iterate a particle from start to end.
 

Detailed Description

template<class PP>
class ParticleIterator< PP >

Particle iterator class for continuous Vlasov-type iteration.

Templated for particle point type (see ParticlePBase).

Todo:

Detailed documentation needed.

PIC style iterator needed.

Constructor & Destructor Documentation

template<class PP >
ParticleIterator< PP >::ParticleIterator ( particle_iterator_type_e  type,
double  epsabs,
double  epsrel,
bool  polyint,
uint32_t  maxsteps,
double  maxt,
uint32_t  trajdiv,
bool  mirror[6],
ScalarField scharge,
pthread_mutex_t *  scharge_mutex,
const VectorField efield,
const VectorField bfield,
const Geometry geom 
)
inline

Constructor for new particle iterator.

New particle iterator is initialized with given settings.

Parameters
typeParticle iterator type used
epsabsAbsolute error limit in iteration
epsrelRelative error limit in iteration
polyintInterpolation type to use. True means use polynomial interpolation, false means use linear interpolation
maxstepsMaximum number of steps to take before particle is killed
maxtMaximum flight time for a particle
trajdivTrajectory saving divisor. Only every trajdiv:th particle trajectory saved.
mirrorParticle mirroring on surfaces
schargeSpace charge field to save to
efieldElectric field in the geometry
bfieldMagnetic field in the geometry
gGeometry definition
firstPointer to first particle of the database.

The particle iterator is given the settings for calculation and geometry, electric field and space charge map to build. Pointer to first particle in the particle database vector is used to calculate the particle number from the particle memory location.

template<class PP >
ParticleIterator< PP >::~ParticleIterator ( )
inline

Destructor.

Member Function Documentation

template<class PP >
const ParticleStatistics& ParticleIterator< PP >::get_statistics ( void  ) const
inline

Get particle iterator statistics.

template<class PP >
void ParticleIterator< PP >::operator() ( Particle< PP > *  particle,
uint32_t  pi 
)
inline

Iterate a particle from start to end.

Iterate particle particle from start to end. This function is called by the Scheduler scheduler, which provides particles to be solved. Reference to scheduler is provided for the possibility to add secondary particles to particle database.

template<class PP >
void ParticleIterator< PP >::set_bfield_suppression_callback ( const CallbackFunctorD_V bsup_cb)
inline

Set B-field potential dependent suppression callback.

template<class PP >
void ParticleIterator< PP >::set_trajectory_end_callback ( const TrajectoryEndCallback tend_cb,
ParticleDataBase pdb 
)
inline

Set trajectory end callback.

template<class PP >
void ParticleIterator< PP >::set_trajectory_handler_callback ( const TrajectoryHandlerCallback thand_cb)
inline

Set trajectory handler callback.


The documentation for this class was generated from the following file: