Class ParticleSplitting

Inheritance Relationships

Base Type

Class Documentation

class ParticleSplitting : public Module

Implements particle splitting, i.e. inverse thinning, to speed up the simulation.

After crossing a surface a given number of times, the particle is split to N partilces with weight 1/N. This eases performance constraints in acceleration simulations due to the power law nature of many acceleration mechanisms. Thanks to Matthew Weiss, Penn State University for the first work on this feature in 2017.

Public Functions

ParticleSplitting(Surface *surface, int crossingThreshold = 50, int numberSplits = 5, double minWeight = 0.01, std::string counterid = "ParticleSplittingCounter")

Constructor

Parameters:
  • surface – The surface to monitor

  • crossingThreshold – Number of crossings after which a particle is split

  • numberSplits – Number of particles the candidate is split into

  • minWeight – Minimum weight to consider. Particles with a lower weight are not split again.

  • counterid – An unique string to identify the particle property used for counting. Useful if multiple splitting modules are present.

virtual void process(Candidate *candidate) const
virtual std::string getDescription() const
void setDescription(const std::string &description)
inline void process(ref_ptr<Candidate> candidate) const
inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount