Expand description
§noether-guard
A static analysis tool for physics simulations that verifies conservation laws.
Noether’s theorem states that every continuous symmetry implies a conserved quantity:
- Time translation symmetry → energy conservation
- Spatial translation symmetry → momentum conservation
- Rotational symmetry → angular momentum conservation
NoetherGuard instruments simulation code to check these at runtime and pinpoint where they break, using renormalization-group-style scale analysis.
§Quick start
use noether_guard::ConservationMonitor;
let mut monitor = ConservationMonitor::newtonian(0.01);
// tick with [energy, px, py, pz, lx, ly, lz]
monitor.tick(0.0, &[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]).unwrap();
monitor.tick(0.1, &[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]).unwrap();
let report = monitor.report();
println!("{report}");Re-exports§
pub use conservation::ConservationLaw;pub use conservation::ConservedQuantity;pub use drift::DriftDetector;pub use error::Error;pub use error::Result;pub use monitor::ConservationMonitor;pub use monitor::MonitorSnapshot;pub use renormalize::RenormalizationGroup;pub use report::Report;pub use report::Violation;pub use symmetry::Symmetry;pub use symmetry::SymmetryGroup;