advanced

Pyvorin for Scientific Computing

ODE solvers, matrix operations, and simulation loops.

Published May 30, 2026

ODE Solvers

Runge-Kutta and Adams-Bashforth methods compile to tight loops.

def rk4_step(f, y, t, h):
    k1 = f(t, y)
    k2 = f(t + h/2, y + h*k1/2)
    k3 = f(t + h/2, y + h*k2/2)
    k4 = f(t + h, y + h*k3)
    return y + h/6 * (k1 + 2*k2 + 2*k3 + k4)

Matrix Operations

Small matrix operations that do not warrant NumPy overhead.

Simulation Loops

Monte Carlo, agent-based, and physics simulations.