Skip to content

Improving implementations for Verlet Integration #257

Closed
@Butt4cak3

Description

@Butt4cak3

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionThis is open for a discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions