Skip to content

Commit

Permalink
Work on documentation, e.g., including magnetic fields in the corresp…
Browse files Browse the repository at this point in the history
…onding doxygen group.
  • Loading branch information
lukasmerten committed Nov 17, 2022
1 parent 2698cdb commit 409742f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 2 deletions.
10 changes: 10 additions & 0 deletions include/crpropa/magneticField/JF12Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include "kiss/logger.h"

namespace crpropa {
/**
* \addtogroup MagneticFields
* @{
*/

/**
@class JF12Field
Expand Down Expand Up @@ -133,8 +137,13 @@ class JF12Field: public MagneticField {
// All set field components
Vector3d getField(const Vector3d& pos) const;
};
/** @} */


/**
* \addtogroup MagneticFields
* @{
*/
/**
@class PlanckJF12bField
@brief PlanckJF12bField: the JF12 galactic magnetic field model with corrections
Expand All @@ -150,6 +159,7 @@ class PlanckJF12bField: public JF12Field {
public:
PlanckJF12bField();
};
/** @} */

} // namespace crpropa

Expand Down
6 changes: 6 additions & 0 deletions include/crpropa/magneticField/JF12FieldSolenoidal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

namespace crpropa {

/**
* \addtogroup MagneticFields
* @{
*/

/**
@class JF12FieldSolenoidal
@brief JF12FieldSolenoidal galactic magnetic field model
Expand Down Expand Up @@ -107,6 +112,7 @@ class JF12FieldSolenoidal: public JF12Field {
*/
double getSpiralFieldStrengthConstant(const double& r, const double& phi) const;
};
/** @} */

} // namespace crpropa

Expand Down
10 changes: 10 additions & 0 deletions include/crpropa/magneticField/MagneticFieldGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ namespace crpropa {
class MagneticFieldGrid: public MagneticField {
ref_ptr<Grid3f> grid;
public:
/**
*Constructor
@param grid Grid3f storing the magnetic field vectors
*/
MagneticFieldGrid(ref_ptr<Grid3f> grid);
void setGrid(ref_ptr<Grid3f> grid);
ref_ptr<Grid3f> getGrid();
Expand All @@ -39,6 +43,12 @@ class ModulatedMagneticFieldGrid: public MagneticField {
public:
ModulatedMagneticFieldGrid() {
}
/**
*Constructor
@param grid Grid3f storing the magnetic field vectors
@param modGrid Grid1f used to scale the magnetic field strength
B^new_i = B^old_i * scale
*/
ModulatedMagneticFieldGrid(ref_ptr<Grid3f> grid, ref_ptr<Grid1f> modGrid);
void setGrid(ref_ptr<Grid3f> grid);
void setModulationGrid(ref_ptr<Grid1f> modGrid);
Expand Down
6 changes: 5 additions & 1 deletion include/crpropa/magneticField/PT11Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include "crpropa/magneticField/MagneticField.h"

namespace crpropa {
/**
* \addtogroup MagneticFields
* @{
*/

/**
@class PT11Field
Expand Down Expand Up @@ -56,7 +60,7 @@ class PT11Field: public MagneticField {

Vector3d getField(const Vector3d& pos) const;
};

/**@}*/
} // namespace crpropa

#endif // CRPROPA_PSHIRKOVFIELD_H
17 changes: 17 additions & 0 deletions include/crpropa/magneticField/PolarizedSingleModeMagneticField.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include "crpropa/Units.h"

namespace crpropa {
/**
* \addtogroup MagneticFields
* @{
*/

/**
@class PolarizedSingleModeMagneticField
Expand All @@ -40,10 +44,23 @@ class PolarizedSingleModeMagneticField: public MagneticField {
double B_max; // Maximal value of the magnetic field (i.e. the amplitude/semi-major value of the mode)

public:
/**
* Constructor
* @param B_0 Magnetic field strength in the direction of e_1 at r_0 (for flagAmplitudeRms = "amplitude"), or the RMS value of the magnetic field (for flagAmplitudeRms = "rms")
* @param wavelength Wavelength of the single mode (corresponds to its coherence length)
* @param double Polarization parameter
* @param r_0 Reference position
* @param e_1 First vector spanning the polarization plane
* @param e_2 Second vector spanning the polarization plane
* @param flagAmplitudeRms Flag to specify whether B_0 denotes the maximum ("amplitude") or the RMS ("rms") value of the magnetic field
* @param flagPolarizationHelicity Flag to specify whether sigma denotes the standard polarization parameter ("polarization") or f_H, the fraction of maximal helicity ("helicity")
* @param flagMode Flag to specify the polarization mode; possible choices are "elliptical", "circular" or "linear"
*/
PolarizedSingleModeMagneticField(const double &B_0, const double &wavelength, const double &sigma, const Vector3d &r_0, const Vector3d &e_1, const Vector3d &e_2, std::string flagAmplitudeRms, std::string flagPolarizationHelicity, std::string flagMode );

Vector3d getField(const Vector3d &position) const;
};
/** @} */

} // end namespace crpropa

Expand Down
6 changes: 5 additions & 1 deletion include/crpropa/magneticField/TF17Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

namespace crpropa {
using namespace std;
/**
* \addtogroup MagneticFields
* @{
*/

/**
@class TF17Field
Expand Down Expand Up @@ -192,7 +196,7 @@ class TF17Field: public MagneticField {
*/
double zscale(const double& z) const;
};

/**@}*/
} // CRPROPA NAMESPACE

#endif // CRPROPA_TF17FIELD_H

0 comments on commit 409742f

Please sign in to comment.