Programs

ProgramSource FileDescription
BENCH_MAIN bench_main.f90

Driver for the BENCHMARK suite (opt-in VSH_BUILD_BENCHMARK CMake target, not part of ctest): runs every BENCH_* routine across a fixed sweep of values, writing one row per to ./benchmark/bench_*.dat (consumed by py/plot_benchmark.py for the manuscript's performance figure).

CONVERGENCE_MAIN convergence_main.f90

Driver for the convergence-vs-degree accuracy sweep (opt-in VSH_BUILD_CONVERGENCE CMake target, not part of ctest): calls the same TESTS batch-consistency routines the core ctest gate uses (BATCH_ALM_CONS, BATCH_SSH_CONS, BATCH_VSH_TOR_CONS, BATCH_VSH_POL_UP_CONS, BATCH_VSH_POL_DN_CONS), but at instead of the small, fixed values main.f90 uses to gate correctness. Each routine already loops internally over every degree in one call, so this produces dense per-degree error data up to 300 without needing an outer sweep here.

Read more…
DIPOLE_FLUX_EXPULSION dipole_flux_expulsion.f90

Worked example (2c): idealized superconducting-core flux expulsion. Ties to Elfritz (2016), cited in the manuscript, on field expulsion from superconducting neutron-star cores. Simplified to the standard "perfectly conducting sphere in a uniform ambient field" textbook problem: a sphere of radius totally excludes flux (idealized Meissner/Type-I limit -- real neutron-star cores are believed Type-II, with flux confined to quantized fluxoids rather than fully excluded; that fuller picture is not computed here). The boundary condition for all (no field may cross into a perfect diamagnet) fixes the induced dipole moment in closed form: , which superposes on the uniform ambient field to give the exterior field. Interior field is exactly zero. Purely magnetostatic: no induction equation, no time evolution.

DIPOLE_SYNTHESIS dipole_synthesis.f90

Worked example (2a): synthesize the classic exterior vacuum magnetic dipole () from FORTVSH's poloidal basis functions and confirm (i) it reproduces the textbook closed form , and (ii) it is numerically pure -- its overlap with every other (at ) is zero to quadrature precision. No induction equation or time evolution is involved: this is a static field-synthesis and orthogonal-projection check only.

Read more…
DIPOLE_UNIFORM_SPHERE dipole_uniform_sphere.f90

Worked example (2b): uniformly magnetized sphere exterior dipole. Classic textbook magnetostatic boundary-value problem (e.g. Griffiths Ex. 6.1 / Jackson): a sphere of radius with uniform magnetization has a genuinely uniform interior field and a pure exterior dipole field. In the normalized units used here (, i.e. ), the magnetic-scalar-potential solution gives the closed-form relation . Although there is no free surface current in this relation's derivation but the interior/exterior fields are not continuous in (physically: continuity is broken by the sphere's own bound magnetization surface current, ) -- is continuous at , but has a jump. Both are checked below using FORTVSH's PVSH_RAD/PVSH_POL evaluated with the interior (, uniform field) and exterior (, dipole) stream functions. Purely static/magnetostatic: no induction equation, no time evolution.

GWI_GWJ_SWEEP gwi_gwj_sweep.f90

Worked example (2e): Geppert-Wiebicke (GWI/GWJ) coefficients swept across a range of mode-number combinations, each checked against an independent formula (not just the closed-form GWI/GWJ code itself evaluated a second way).

Read more…
MAIN main.f90

Driver for the full TESTS validation suite (run via ctest, target vsh_validation): runs every cross-validation, batch-consistency, and identity check in TESTS, writes each one's full per-point data to ./validation/*.dat, prints a PASS/FAIL line per check, and exits non-zero if any check failed (the signal ctest uses for a pass/fail build gate).

STABILITY_MAIN stability_main.f90

Driver for mapping ASSOC_LEGENDRE_NORM_ALL's numerical stability across the parameter space (opt-in VSH_BUILD_STABILITY CMake target, not part of ctest). See STABILITY_FINDINGS.md at the repo root for the full writeup -- this exists because the documented "stable to " claim for ASSOC_LEGENDRE_NORM_ALL turned out to depend on as well as : for close to the poles and in a band tied to the classical turning point of the associated Legendre ODE, the forward-column recurrence can blow up by 100+ orders of magnitude even at moderate .

Read more…
UNNORM_STABILITY_MAIN unnorm_stability_main.f90

Driver for mapping the UNNORMALIZED Bonnet recurrence's (ASSOC_LEGENDRE/ASSOC_LEGENDRE_ALL, and everything single-mode built on it) usable accuracy range across (opt-in VSH_BUILD_STABILITY CMake target, same as STABILITY_MAIN -- not part of ctest). See STABILITY_FINDINGS.md at the repo root.

Read more…
VSH_DECOMPOSITION vsh_decomposition.f90

Worked example (2d): arbitrary-field VSH spectral decomposition, reconstruction, and convergence.

Read more…
VSH_DECOMPOSITION_TOR vsh_decomposition_tor.f90

Worked example (2f): pure-toroidal VSH spectral decomposition, reconstruction, and convergence -- companion to vsh_decomposition.f90 (example 2d), which decomposes onto the radial family. This example decomposes onto the toroidal family only (PVSH_TOR, coefficients a_tor) instead.

Read more…