Class PeriodicMagneticField
Defined in File MagneticField.h
Inheritance Relationships
Base Type
public MagneticField
(Class MagneticField)
Class Documentation
-
class PeriodicMagneticField : public MagneticField
Magnetic field decorator implementing periodic fields.
The periodic cube is defined by its origin (Vector3d) and an extends parameter (Vector3d). All points x=(x_1, x_2, x_3) that are described by x_i = origin_i + epsilon * extend_i, with epsilon = 0…1 are within the base cube. Magnetic field strengths for all positions outside of this cube are calculated based on the values in the base cube. This can be done periodically or reflectively.
Public Functions
-
PeriodicMagneticField(ref_ptr<MagneticField> field, const Vector3d &extends)
Constructor
- Parameters:
field – magnetic field reference pointer
extends – length, width, and height of the base cube
-
PeriodicMagneticField(ref_ptr<MagneticField> field, const Vector3d &extends, const Vector3d &origin, bool reflective)
Constructor
- Parameters:
field – magnetic field reference pointer
extends – length, width, and height of the base cube
origin – defines the reference position
reflective – for periodic or reflective behavior
-
bool isReflective()
-
void setReflective(bool reflective)
-
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
-
PeriodicMagneticField(ref_ptr<MagneticField> field, const Vector3d &extends)