Class PlanckJF12bField

Inheritance Relationships

Base Type

Class Documentation

class PlanckJF12bField : public JF12Field

PlanckJF12bField: the JF12 galactic magnetic field model with corrections suggested by the Planck Collaboration.

See: Planck Collaboration, “Planck intermediate results. XLII.

Large-scale Galactic magnetic fields”, A&A 596 (2016) A103; arXiv:1601.00546

This variant of the JF12 field uses only different parameters compared to the standard JF12 implementation.

Public Functions

void randomStriated(int seed = 0)
void randomTurbulent(int seed = 0)
void setStriatedGrid(ref_ptr<Grid1f> grid)

Set a striated grid and activate the striated field component


grid – scalar grid containing random +1/-1 values, 100 parsec grid spacing

void setTurbulentGrid(ref_ptr<Grid3f> grid)

Set a turbulent grid and activate the turbulent field component


grid – vector grid containing a random field of Brms = 1

ref_ptr<Grid1f> getStriatedGrid()
ref_ptr<Grid3f> getTurbulentGrid()
void setUseRegularField(bool use)
virtual void setUseStriatedField(bool use)
virtual void setUseTurbulentField(bool use)
void setUseDiskField(bool use)
void setUseToroidalHaloField(bool use)
void setUseXField(bool use)
bool isUsingRegularField()
bool isUsingStriatedField()
bool isUsingTurbulentField()
bool isUsingDiskField()
bool isUsingToroidalHaloField()
bool isUsingXField()
double logisticFunction(const double &x, const double &x0, const double &w) const
Vector3d getRegularField(const Vector3d &pos) const
virtual Vector3d getDiskField(const double &r, const double &z, const double &phi, const double &sinPhi, const double &cosPhi) const
Vector3d getToroidalHaloField(const double &r, const double &z, const double &sinPhi, const double &cosPhi) const
virtual Vector3d getXField(const double &r, const double &z, const double &sinPhi, const double &cosPhi) const
Vector3d getStriatedField(const Vector3d &pos) const
double getTurbulentStrength(const Vector3d &pos) const
Vector3d getTurbulentField(const Vector3d &pos) const
virtual Vector3d getField(const Vector3d &pos) const
inline virtual Vector3d getField(const Vector3d &position, double z) const
inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

bool useRegularField
bool useStriatedField
bool useTurbulentField
bool useDiskField
bool useToroidalHaloField
bool useXField
double rArms[8]
double pitch
double sinPitch
double cosPitch
double tanPitch
double cotPitch
double tan90MinusPitch
double bDisk[11]
double bRing
double hDisk
double wDisk
double bNorth
double bSouth
double rNorth
double rSouth
double wHalo
double z0
double bX
double thetaX0
double sinThetaX0
double cosThetaX0
double tanThetaX0
double cotThetaX0
double rXc
double rX
double sqrtbeta
ref_ptr<Grid1f> striatedGrid
ref_ptr<Grid3f> turbulentGrid
double bDiskTurb[8]
double bDiskTurb5
double zDiskTurb
double bHaloTurb
double rHaloTurb
double zHaloTurb
mutable size_t _referenceCount