Metadata-Version: 2.4
Name: soliton-physics
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Dist: numpy>=1.24
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Summary: Research-grade, educational physics engine: planar mechanics for the class 11 syllabus and spectral wave solvers
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://soliton-docs.vercel.app
Project-URL: Homepage, https://github.com/soliton-physics/soliton
Project-URL: Playground, https://soliton-playground.vercel.app

# soliton-physics

Python bindings for the [Soliton Physics](https://github.com/soliton-physics/soliton) engine: `pip install soliton-physics`, then `import soliton`.

```python
from soliton import mechanics

scene = mechanics.scenario("atwood", m1=2, m2=3)
scene.answers()
run = scene.run(until=2.0)
run.body("m2")["velocity"]
```

The wave solvers:

```python
import numpy as np
from soliton import Simulation, kdv_soliton

sim = Simulation("kdv", points=512, length=60.0, dt=1e-3)
sim.state = kdv_soliton(sim.x, t=0.0, speed=4.0, center=-10.0)
sim.step(5000)
print(sim.time, sim.invariants())
```

Build locally with `maturin develop --release` from this directory.

