Description
1. Printing inside the individual functions vs. printing in main
Some of the code examples print the results directly inside the verlet
function. Others have the functions return the results and print them in main
.
With #243, we're already steering in the direction of printing in main
instead of the individual functions. To keep everything in line, we should do this in every example.
2. Using the velocity variable in Stormer-Verlet
Currently, the chapter about Verlet Integration includes code examples for the Stormer-Verlet and Velocity-Verlet methods. Both of them have a velocity term, but it's completely unused in Stormer-Verlet. The variable is assigned a value which is never actually used. In #256, @leios and I already agreed that it would be an improvement to also print the velocity. I want to leave this up for discussion before we decide on it.
I think that if we print the velocity for Stormer-Verlet, we should also print it for Velocity-Verlet.
Progress
If we were to change these 2 things, these are the languages examples that would need adjustment:
- C (Update C implementations for Verlet algorithms #298)
- C++ (both)
- Java (Implementation Edit to Verlet Integration in Java #290)
- JavaScript (print velocity)
- Julia (both)
- Python (Reimplemented Verlet Integration in Python #256)
- Rust (Update Rust implementations for Verlet algorithms #297)
Feel free to post your opinion on the second topic and to submit PRs for the listed languages. I will keep this list updated as the code comes in.