Skip to main content

Module metamorphic

Module metamorphic 

Source
Expand description

Metamorphic testing for orbital physics invariants.

Per Chen et al. [33], metamorphic testing verifies relations rather than specific outputs. This is critical for physics simulations where exact outputs are unknown but invariant relationships must hold.

§Metamorphic Relations

  1. Rotation Invariance: Rotating the entire system preserves relative dynamics
  2. Time-Reversal Symmetry: Symplectic integrators are time-reversible
  3. Mass Scaling: Uniform mass scaling preserves orbital shapes
  4. Energy Conservation: Total mechanical energy is preserved
  5. Momentum Conservation: Total momentum is preserved (closed system)

§References

[33] Chen et al., “Metamorphic testing: a new approach,” Hong Kong UST, 1998.

Structs§

MetamorphicResult
Metamorphic test result.

Functions§

run_all_metamorphic_tests
Run all metamorphic tests on a state.
test_angular_momentum_conservation
MR-4: Angular Momentum Conservation Test
test_deterministic_replay
MR-5: Deterministic Replay Test
test_energy_conservation
MR-3: Energy Conservation Test
test_rotation_invariance
MR-1: Rotation Invariance Test
test_time_reversal
MR-2: Time-Reversal Symmetry Test