Class DiffusionSDE

Inheritance Relationships

Base Type

Class Documentation

class DiffusionSDE : public Module

Propagates candidates as pseudo(!)-particles. The time integration of SDEs is used to solve the transport equation. Here an Euler-Mayurama integration scheme is used. The diffusion tensor can be anisotropic with respect to the magnetic field line coordinates. The integration of field lines is done via the CK-algorithm.

Public Functions

DiffusionSDE(ref_ptr < crpropa::MagneticField > magneticField, double tolerance = 1e-4, double minStep = (10 *pc), double maxStep = (1 *kpc), double epsilon = 0.1)


  • minStep: minStep/c_light is the minimum integration timestep
  • maxStep: maxStep/c_light is the maximum integration timestep
  • tolerance: Tolerance is criterion for step adjustment. Step adjustment takes place when the tangential vector of the magnetic field line is calculated.
  • epsilon: Ratio of parallel and perpendicular diffusion coefficient D_par = epsilon*D_perp
  • alpha: Power law index of the energy dependent diffusion coefficient: D E^alpha
  • scale: Scaling factor for the diffusion coefficient D = scale*D_0

DiffusionSDE(ref_ptr < crpropa::MagneticField > magneticField, ref_ptr < crpropa::AdvectionField > advectionField, double tolerance = 1e-4, double minStep = (10 *pc), double maxStep = (1 *kpc), double epsilon = 0.1)
void process(crpropa::Candidate *candidate) const
void tryStep(const Vector3d &Pos, Vector3d &POut, Vector3d &PosErr, double z, double propStep) const
void driftStep(const Vector3d &Pos, Vector3d &LinProp, double h) const
void calculateBTensor(double rig, double BTen[], Vector3d pos, Vector3d dir, double z) const
void setMinimumStep(double minStep)
void setMaximumStep(double maxStep)
void setTolerance(double tolerance)
void setEpsilon(double kappa)
void setAlpha(double alpha)
void setScale(double Scale)
void setMagneticField(ref_ptr<crpropa::MagneticField> magneticField)
void setAdvectionField(ref_ptr<crpropa::AdvectionField> advectionField)
double getMinimumStep() const
double getMaximumStep() const
double getTolerance() const
double getEpsilon() const
double getAlpha() const
double getScale() const
std::string getDescription() const
void setDescription(const std::string &description)
void process(ref_ptr<Candidate> candidate) const
size_t addReference() const
size_t removeReference() const
int removeReferenceNoDelete() const
size_t getReferenceCount() const

Protected Attributes

size_t _referenceCount