Integrators¶
Last changes: Documentation changelog
Contract¶
This page records the public integrator identifiers carried by LLG and their fixed/adaptive
step semantics.
Governing equations¶
Integrator mathematics belongs to Time integration.
Symbols and SI units¶
gamma is the gyromagnetic ratio in \(\mathrm{m\,A^{-1}\,s^{-1}}\) (LLG convention); step sizes are
in seconds.
Assumptions and validity¶
Integrator identifiers are validated against the supported set; adaptive step requests require an adaptive integrator.
Python API¶
Python |
Type |
Default |
SI unit |
Validation |
Meaning |
Backend support |
ProblemIR |
|---|---|---|---|---|---|---|---|
— |
— |
— |
\(1\) |
— |
— |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
— |
|
|
|
\(1\) |
One of |
Time integration scheme |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
|
|
|
|
\(\mathrm{m\,A^{-1}\,s^{-1}}\) |
Positive |
Gyromagnetic ratio |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
|
|
|
|
\(\mathrm{m}\) |
Positive; exclusive with adaptive step |
Fixed step size |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
|
|
|
|
\(\mathrm{s}\) |
Adaptive integrator required |
Embedded error control |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
|
Integrator lanes¶
Identifier |
Family |
Step mode |
|---|---|---|
|
Explicit RK2 |
fixed |
|
Explicit RK4 |
fixed |
|
Adams–Bashforth 3 |
fixed |
|
Bogacki–Shampine 3(2) |
fixed or adaptive |
|
Dormand–Prince 5(4) |
fixed or adaptive |
|
Coupled IMEX ARK2 |
fixed or adaptive |
|
Planner-selected |
resolved at planning |
Aliases dp54 and bs23 normalize to rk45 and rk23 respectively.
Complete stage-first example¶
# %% Fixed-step Heun with explicit solver policy
import fullmag as fm
nm = 1.0e-9
study = fm.study("integrators_api_example")
study.engine("fdm")
study.device("cpu", precision="double")
study.mode("strict")
study.objects.mesh.defaults(cell_size=(2 * nm, 2 * nm, 5 * nm))
film = study.geometry(fm.Box(100 * nm, 20 * nm, 5 * nm), name="film")
film.Ms = 800.0e3
film.Aex = 13.0e-12
film.alpha = 0.02
film.m = fm.init.UniformMagnetization((1.0, 0.0, 0.0))
study.exchange()
study.solver(integrator="heun", fix_dt=1.0e-13, gamma=2.211e5)
study.stages.add_run(stage_id="run", until=1.0e-12)
ProblemIR¶
LLG.to_ir() emits {"kind": "llg", "gyromagnetic_ratio": ..., "integrator": ..., "fixed_timestep": ...} plus optional adaptive/field-refresh blocks.
Round-trip and failure semantics¶
Requested intent is the value authored by Python and preserved in ProblemIR; resolved execution is the planner or realization result. Validation errors identify the violated domain rule, and unsupported combinations are rejected explicitly rather than silently substituted.
Aliases are normalized before validation. Fixed and adaptive timesteps are mutually exclusive. Adaptive step requests with a non-adaptive integrator fail immediately.
Discrete realization¶
Scheme details are documented in Time integration.
Implementation mapping¶
Anchor: packages/fullmag-py/src/fullmag/model/dynamics.py (class LLG, integrator constants).
Validation¶
Ownership tests compare this inventory with live signatures.
Limitations¶
Identifier support does not prove every integrator executes on every backend; planner capability resolution is authoritative.
Scientific bibliography¶
Scheme references belong to the time-integration numerical pages.
Control Room crosswalk¶
Status: Common solver/stage fields are partial; backend-specific options without editor fields remain not implemented.
Python/API surface |
Control Room path |
Status |
Transaction |
|---|---|---|---|
Parameters documented on this page |
|
|
Apply stage draft; solver request and result resources become stale |
Parameters without a named UI field |
|
|
Python-only until implemented |
not implemented: frontend support for dynamics parameters not rendered by the stage editor.
See Control Room capability register for the support matrix and not implemented policy.
Frontend source owner: apps/control-room/src/modules/inspector/panels/StudyStageDraftEditor.tsx (StudyStageDraftEditor).
Source-code index¶
Claim |
Path |
Stable symbol |
Responsibility |
Evidence |
|---|---|---|---|---|
LLG dynamics |
|
|
Integrator/step policy |
Ownership test |
Integrator vocabulary |
|
|
Valid set |
Ownership test |
Source-map coverage¶
Claim |
Path |
Stable symbol |
Responsibility |
Evidence |
|---|---|---|---|---|
Integrator selection, validation, and dynamics IR lowering. |
|
|
Integrator selection, validation, and dynamics IR lowering. |
Source-map validator and focused API tests |