SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
Loading...
Searching...
No Matches
SHiP::IFieldEvaluator Class Referenceabstract

Framework-agnostic point-query evaluator for one magnetic field region. More...

#include <IFieldSource.h>

Public Types

using pos_q = SHiP::Length
 
using field_q = SHiP::MagneticField
 

Public Member Functions

virtual ~IFieldEvaluator ()=default
 
virtual std::array< field_q, 3 > at (pos_q x, pos_q y, pos_q z) const =0
 Return {Bx, By, Bz} in Tesla at position (x, y, z) in the evaluator's frame.
 

Detailed Description

Framework-agnostic point-query evaluator for one magnetic field region.

Implementations must be thread-safe; covfie-backed evaluators hold an immutable field and a single const view, so at() is safe to call from any thread and allocation-free on the hot path.

Member Typedef Documentation

◆ field_q

using SHiP::IFieldEvaluator::field_q = SHiP::MagneticField

◆ pos_q

using SHiP::IFieldEvaluator::pos_q = SHiP::Length

Constructor & Destructor Documentation

◆ ~IFieldEvaluator()

virtual SHiP::IFieldEvaluator::~IFieldEvaluator ( )
virtualdefault

Member Function Documentation

◆ at()

virtual std::array< field_q, 3 > SHiP::IFieldEvaluator::at ( pos_q  x,
pos_q  y,
pos_q  z 
) const
pure virtual

Return {Bx, By, Bz} in Tesla at position (x, y, z) in the evaluator's frame.

Evaluators from makeFieldEvaluator and loadFieldMap use the map's local frame; the regions of FieldMapSource apply the magnet's translation and take global positions. Behaviour outside the mapped region is implementation-defined; map evaluators clamp to the boundary value and return NaN for a NaN position.


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