cheatah
Class

space::irbem::TotalFieldOpd

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

IGRF plus the Olson-Pfitzer dynamic field, as a single field a tracer can follow.

The same shape as TotalFieldT89, for the same reason: trace_invariant, make_lstar and everything above them take one GeoFieldModel and follow the TOTAL field without knowing there are two. The frames are handled once, through the epoch's Rotations; the external model's refusals fall back to the internal field alone (the best available answer there, and never a NaN into an integrator), and external_status says when that happened.

Template parameters
NMAX

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

Unit testIrbemOpd.TotalFieldSuperposesInternalAndExternal IrbemOpd.TotalFieldTracesAndReportsWhenTheExternalModelDeclines

Functions

fn constexpr TotalFieldOpd(const Igrf< NMAX > &internal, const Rotations &rotations, double density_cc, double velocity_kms, double dst_nt) #
Parameters
internal

the internal field, already built for the epoch.

rotations

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

density_cc

the solar-wind proton density, cm^-3.

velocity_kms

the solar-wind speed, km/s.

dst_nt

the Dst index, nT.

Unit testIrbemOpd.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; the internal field alone when the external model refuses the point (see external_status).

Complexity

One IGRF evaluation, one OPD evaluation, two 3x3 rotations.

Allocation

none.

Unit testIrbemOpd.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 OPD evaluation and one rotation.

Allocation

none.

Unit testIrbemOpd.TotalFieldTracesAndReportsWhenTheExternalModelDeclines
fn const Rotations & rotations() const #

The epoch's frame rotations.

Returns

the rotations this field was built with.

Complexity

O(1).

Allocation

none.

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

The internal part's Gauss coefficient g(n, m), nT — the internal field's, for the same reason TotalFieldT89::g forwards: a superposition has no harmonic expansion of its own.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

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

The internal part's h(n, m), nT.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

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

The internal field alone.

Returns

the internal model.

Complexity

O(1).

Allocation

none.

Unit testIrbemOpd.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 density_cc_ #
var double velocity_kms_ #
var double dst_nt_ #