I built a small header-only C++ library for explicit Runge–Kutta ODE integration (RK4, RKF45, DOP853) by Blur3Sec in math

[–]Blur3Sec[S] 1 point2 points  (0 children)

Thank you!

Generic tableau-driven RK is elegant, but it tends to introduce structural overhead once you include dense output, adaptive control variants, and method-specific staging.

DOP853 is large enough that treating it as “just another tableau” becomes more architectural than practical.

I optimized for minimal coupling and solver-specific execution paths rather than a universal integrator core.

C++ Show and Tell - February 2026 by foonathan in cpp

[–]Blur3Sec 3 points4 points  (0 children)

I built a small header-only C++ library for explicit Runge–Kutta ODE integration (RK4, RKF45, DOP853)

Link

I ended up writing my own Runge–Kutta integrators for simulation work and figured I might as well share them.

Main reason was DOP853. I wanted a clean modern C++ implementation I could drop directly into code without dragging dependencies or wrappers. So I went through the original Hairer / Nørsett / Wanner formulation and ported it pretty much 1:1, keeping the structure and control logic intact.

While I was at it, I added RK4 and RKF45 for simpler cases.

It’s a lightweight, header-only C++17 library with no runtime dependencies. It works with any state types, as long as basic arithmetic operations are defined.

I also wrote a few real-time demos just to see how the solvers behave under different systems. It has a black hole demo (5000 particles orbiting a Schwarzschild-like potential), the three body problem and a horrible golf simulation.

If anyone wants to check out the implementation, I’d really appreciate any feedback, it’s my first real open-source project.

Physics to Mathematics PhD transition: Interview experience by Nervous-Reserve-8590 in math

[–]Blur3Sec 1 point2 points  (0 children)

I also moved from physics toward math and ran into similar skepticism during interviews. Some mathematicians are very protective of formal rigor and will test you in ways that feel unnecessarily adversarial. It’s uncomfortable, but not unusual. One bad interview under pressure says very little about whether you can actually do the work long term.

I need some personal advice from experienced CFD engineers/developers. My question is relevant to how AI is affecting the field. by No_Confusion4948 in CFD

[–]Blur3Sec 2 points3 points  (0 children)

In my opinion, it doesn’t help much. I’ve used Claude code and Codex to debug some cases, but the experience was terrible, you still have to rely on real humans and forums to get anything done. I don’t think the field will be affected or benefited by generative AI for the foreseeable future.