SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ship::IFieldEvaluator Class Referenceabstract

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

#include <IFieldSource.h>

Public Types

using pos_q = mp_units::quantity< mp_units::si::milli< mp_units::si::metre >, double >
 
using field_q = mp_units::quantity< mp_units::si::tesla, double >
 

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 global position (x, y, z) in mm.
 

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 = mp_units::quantity<mp_units::si::tesla, double>

◆ pos_q

using ship::IFieldEvaluator::pos_q = mp_units::quantity<mp_units::si::milli<mp_units::si::metre>, double>

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 global position (x, y, z) in mm.

Behaviour outside the mapped region is implementation-defined; the covfie-backed evaluator clamps to the boundary value.


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