cheatah
Class

space::irbem::TotalFieldMead

cheatah-space v0.1.0-alpha — Biome Standard 0.6.5-alpha

IGRF plus Mead & Fairfield (1975), as a single field.

The same shape as TotalFieldT89, for the same reason: a particle experiences one field, and trace_invariant and make_lstar follow whatever satisfies GeoFieldModel without knowing there are two of them. IGRF is defined in GEO and the external model in GSM; the rotation between them depends only on the epoch and is built once in Rotations.

There is no device trace lane for this model — traces through it run on the host through the generic trace_invariant, which is where a model this cheap belongs: the external term adds ~50 flops to each of ~600 IGRF evaluations of a trace, so a dedicated kernel would buy almost nothing over irbem_trace_i_f32's measured curve.

Template parameters
NMAX

the internal field's truncation degree. 10 reproduces IRBEM's own choice.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal

Functions

fn constexpr TotalFieldMead(const Igrf< NMAX > &internal, const Rotations &rotations, double kp_times_ten) #
Parameters
internal

the internal field, already built for the epoch.

rotations

the epoch's frame rotations — built once, reused for every point.

kp_times_ten

Kp in IRBEM's slot-1 scaling (Kp x 10, nominally 0..90). Binned by mead_kp_bin: values inside one group give identical fields by construction.

Complexity

O(1) — three pointers and a double.

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn FieldVector< Frame::GEO > evaluate(const Position< Frame::GEO > &p) const #

The total field at a geographic point.

Parameters
p

the position, GEO, Earth radii.

Returns

B_internal + B_external, in GEO, nT. When the external model refuses the point — a non-finite input or a point inside the Earth — the INTERNAL field is returned alone rather than a zero or a NaN, exactly as TotalFieldT89 does; an out-of-validity external field is still added, because extrapolating the fit is the caller's decision and external_status is how they learn it was made.

Complexity

One IGRF evaluation, one Mead-Fairfield evaluation, two 3x3 rotations.

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn Status external_status(const Position< Frame::GEO > &p) const #

Whether the external model answered at p, and if not, why.

Parameters
p

the position, GEO, Earth radii.

Returns

the external model's status; Status::Ok when it contributed without caveat.

Complexity

One Mead-Fairfield evaluation and one rotation.

Allocation

none.

Unit testIrbemMead.TotalFieldReportsWhenTheExternalModelDeclines
fn double kp_times_ten() const #

The activity level this field was built for, in IRBEM's Kp x 10 scaling.

Returns

the value passed to the constructor.

Complexity

O(1).

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn const Rotations & rotations() const #

The epoch's frame rotations.

Returns

the rotations this field was built with.

Complexity

O(1).

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn double g(int n, int m) const #

The internal part's Gauss coefficient g(n, m), in nT — the INTERNAL field's, because a superposition with a non-potential external term has no expansion of its own; see TotalFieldT89::g for the full argument.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn double h(int n, int m) const #

The internal part's h(n, m), in nT — see g for why this forwards.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal
fn const Igrf< NMAX > & internal() const #

The internal field alone — what dipole_moment and any staging need.

Returns

the internal model.

Complexity

O(1).

Allocation

none.

Unit testIrbemMead.TotalFieldSuperposesInternalAndExternal

Constants & variables

var static int degree #

The internal part's truncation degree — what generic staging and buffer sizing read.

var const Igrf< NMAX > * internal_ #
var const Rotations * rotations_ #
var double kp_times_ten_ #