CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::UniformMagneticField< T > Class Template Reference

A uniform (constant) magnetic field. More...

#include <UniformMagneticField.hpp>

Inheritance diagram for corsika::UniformMagneticField< T >:

Public Member Functions

template<typename... Args>
 UniformMagneticField (MagneticFieldVector const &field, Args &&... args)
 Construct a UniformMagneticField. More...
 
MagneticFieldVector getMagneticField ([[maybe_unused]] Point const &point) const final override
 Evaluate the magnetic field at a given location. More...
 
void setMagneticField (MagneticFieldVector const &Bfield)
 Set the magnetic field returned by this instance. More...
 

Detailed Description

template<typename T>
class corsika::UniformMagneticField< T >

A uniform (constant) magnetic field.

This class returns the same magnetic field vector for all evaluated locations.

Definition at line 24 of file UniformMagneticField.hpp.

Constructor & Destructor Documentation

◆ UniformMagneticField()

template<typename T >
template<typename... Args>
corsika::UniformMagneticField< T >::UniformMagneticField ( MagneticFieldVector const &  field,
Args &&...  args 
)
inline

Construct a UniformMagneticField.

This is initialized with a fixed magnetic field and returns this magnetic field at all locations.

Parameters
fieldThe fixed magnetic field to return.

Definition at line 36 of file UniformMagneticField.hpp.

Member Function Documentation

◆ getMagneticField()

template<typename T >
MagneticFieldVector corsika::UniformMagneticField< T >::getMagneticField ( [ [maybe_unused] ] Point const &  point) const
inlinefinaloverride

Evaluate the magnetic field at a given location.

Parameters
pointThe location to evaluate the field at (not used internally).
Returns
The magnetic field vector.

Definition at line 46 of file UniformMagneticField.hpp.

◆ setMagneticField()

template<typename T >
void corsika::UniformMagneticField< T >::setMagneticField ( MagneticFieldVector const &  Bfield)
inline

Set the magnetic field returned by this instance.

Parameters
BfieldThe new vaue of the global magnetic field.

Definition at line 56 of file UniformMagneticField.hpp.


The documentation for this class was generated from the following file: