![]() |
SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
|
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. | |
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.
| using SHiP::IFieldEvaluator::field_q = SHiP::MagneticField |
| using SHiP::IFieldEvaluator::pos_q = SHiP::Length |
|
virtualdefault |
|
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.