Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
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, trajectory_interpolation_e intrp, scharge_deposition_e scharge_dep, uint32_t maxsteps, double maxt, bool save_points, uint32_t trajdiv, bool mirror[6], MeshScalarField *scharge, pthread_mutex_t *scharge_mutex, const VectorField *efield, const VectorField *bfield, const Geometry *geom)
 Constructor for new particle iterator. More...
 
 ~ParticleIterator ()
 Destructor. More...
 
void set_surface_collision (bool surface_collision)
 Enable/disable surface collision model. More...
 
void set_trajectory_handler_callback (TrajectoryHandlerCallback *thand_cb)
 Set trajectory handler callback. More...
 
void set_trajectory_end_callback (TrajectoryEndCallback *tend_cb, ParticleDataBase *pdb)
 Set trajectory end callback. More...
 
void set_trajectory_surface_collision_callback (TrajectorySurfaceCollisionCallback *tsur_cb)
 Set trajectory surface collision callback. More...
 
void set_bfield_suppression_callback (const CallbackFunctorD_V *bsup_cb)
 Set B-field potential dependent suppression callback. More...
 
void set_relativistic (bool enable)
 Set relativistic particle iteration. More...
 
const ParticleStatisticsget_statistics (void) const
 Get particle iterator statistics. More...
 
void operator() (Particle< PP > *particle, uint32_t pi)
 Iterate a particle from start to end. More...
 

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

◆ ParticleIterator()

template<class PP >
ParticleIterator< PP >::ParticleIterator ( particle_iterator_type_e  type,
double  epsabs,
double  epsrel,
trajectory_interpolation_e  intrp,
scharge_deposition_e  scharge_dep,
uint32_t  maxsteps,
double  maxt,
bool  save_points,
uint32_t  trajdiv,
bool  mirror[6],
MeshScalarField 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
intrpInterpolation type.
scharge_depSpace charge deposition type.
maxstepsMaximum number of steps to take before particle is killed
maxtMaximum flight time for a particle
save_pointsFlag for saving all intersection points of trajectories
trajdivTrajectory saving divisor. Only every trajdiv:th particle trajectory saved.
mirrorParticle mirroring on surfaces
schargeSpace charge field to save to
scharge_mutexSpace charge write mutex
efieldElectric field in the geometry
bfieldMagnetic field in the geometry
geomGeometry definition

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.

◆ ~ParticleIterator()

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

Destructor.

Member Function Documentation

◆ get_statistics()

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

Get particle iterator statistics.

◆ operator()()

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.

◆ set_bfield_suppression_callback()

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

Set B-field potential dependent suppression callback.

◆ set_relativistic()

template<class PP >
void ParticleIterator< PP >::set_relativistic ( bool  enable)
inline

Set relativistic particle iteration.

◆ set_surface_collision()

template<class PP >
void ParticleIterator< PP >::set_surface_collision ( bool  surface_collision)
inline

Enable/disable surface collision model.

◆ set_trajectory_end_callback()

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

Set trajectory end callback.

◆ set_trajectory_handler_callback()

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

Set trajectory handler callback.

◆ set_trajectory_surface_collision_callback()

template<class PP >
void ParticleIterator< PP >::set_trajectory_surface_collision_callback ( TrajectorySurfaceCollisionCallback tsur_cb)
inline

Set trajectory surface collision callback.


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


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.