#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, const Efield *efield, const VectorField *bfield, const Geometry *g, Particle< PP > *first) | |
Constructor for new particle iterator. | |
~ParticleIterator () | |
Destructor. | |
void | enable_nsimp_plasma_threshold (const ScalarField *epot, double phi_plasma) |
Enable plasma threshold model for NSIMP plasma model. | |
void | get_statistics (uint32_t &end_time, uint32_t &end_step, uint32_t &end_out, uint32_t &end_coll, uint32_t &end_baddef, uint32_t &sum_steps) |
Get particle iterator statistics. | |
void | operator() (Particle< PP > *particle, Scheduler< ParticleIterator< PP >, Particle< PP >, Error > &scheduler) |
Iterate a particle from start to end. | |
Classes | |
struct | ColData |
Mesh intersection (collision) coordinate data. |
PIC style iterator needed.
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, | |||
const Efield * | efield, | |||
const VectorField * | bfield, | |||
const Geometry * | g, | |||
Particle< PP > * | first | |||
) | [inline] |
Constructor for new particle iterator.
New particle iterator is initialized with given settings.
type | Particle iterator type used | |
epsabs | Absolute error limit in iteration | |
epsrel | Relative error limit in iteration | |
polyint | Interpolation type to use. True means use polynomial interpolation, false means use linear interpolation | |
maxsteps | Maximum number of steps to take before particle is killed | |
maxt | Maximum flight time for a particle | |
trajdiv | Trajectory saving divisor. Only every trajdiv:th particle trajectory saved. | |
mirror | Particle mirroring on surfaces | |
scharge | Space charge field to save to | |
efield | Electric field in the geometry | |
bfield | Magnetic field in the geometry | |
g | Geometry definition | |
first | Pointer to first particle of the database. |
ParticleIterator< PP >::~ParticleIterator | ( | ) | [inline] |
Destructor.
void ParticleIterator< PP >::enable_nsimp_plasma_threshold | ( | const ScalarField * | epot, | |
double | phi_plasma | |||
) | [inline] |
Enable plasma threshold model for NSIMP plasma model.
void ParticleIterator< PP >::get_statistics | ( | uint32_t & | end_time, | |
uint32_t & | end_step, | |||
uint32_t & | end_out, | |||
uint32_t & | end_coll, | |||
uint32_t & | end_baddef, | |||
uint32_t & | sum_steps | |||
) | [inline] |
Get particle iterator statistics.
Returns statistics in variables end_time, end_step, end_out, end_coll, end_baddef and sum_steps. See ParticleDatabase for more details about the particle iterator statistics.
void ParticleIterator< PP >::operator() | ( | Particle< PP > * | particle, | |
Scheduler< ParticleIterator< PP >, Particle< PP >, Error > & | scheduler | |||
) | [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.