Class PropagationCK

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class PropagationCK : public Module

Rectilinear propagation through magnetic fields using the Cash-Karp method.

This module solves the equations of motion of a relativistic charged particle when propagating through a magnetic field.

It uses the Runge-Kutta integration method with Cash-Karp coefficients.

The step size control tries to keep the relative error close to, but smaller than the designated tolerance. Additionally a minimum and maximum size for the steps can be set. For neutral particles a rectilinear propagation is applied and a next step of the maximum step size proposed.

Public Functions

PropagationCK(ref_ptr<MagneticField> field = NULL, double tolerance = 1e-4, double minStep = (0.1 * kpc), double maxStep = (1 * Gpc))

Constructor for the adaptive Kash Carp.

Parameters:
  • field

  • tolerance – tolerance is criterion for step adjustment. Step adjustment takes place only if minStep < maxStep

  • minStep – minStep/c_light is the minimum integration time step

  • maxStep – maxStep/c_light is the maximum integration time step.

virtual void process(Candidate *candidate) const
Y dYdt(const Y &y, ParticleState &p, double z) const
void tryStep(const Y &y, Y &out, Y &error, double t, ParticleState &p, double z) const
void setField(ref_ptr<MagneticField> field)
void setTolerance(double tolerance)
void setMinimumStep(double minStep)
void setMaximumStep(double maxStep)
ref_ptr<MagneticField> getField() const

get functions for the parameters of the class PropagationCK, similar to the set functions

Vector3d getFieldAtPosition(Vector3d pos, double z) const

get magnetic field vector at current candidate position

Parameters:
  • pos – current position of the candidate

  • z – current redshift is needed to calculate the magnetic field

Returns:

magnetic field vector at the position pos

double getTolerance() const
double getMinimumStep() const
double getMaximumStep() 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
class Y

Public Functions

inline Y()
inline Y(const Vector3d &x, const Vector3d &u)
inline Y(double f)
inline Y operator*(double f) const
inline Y &operator+=(const Y &y)

Public Members

Vector3d x
Vector3d u