hannorein / rebound

💫 An open-source multi-purpose N-body code.
https://rebound.readthedocs.io/
GNU General Public License v3.0
844 stars 219 forks source link

rebound should have some --help ? #743

Closed teuben closed 8 months ago

teuben commented 8 months ago

Currently the system seems to promote a single binary "rebound" (athena does something similar). In athena we have a self-describing feature, in that case -h will describe for which kind of physics it was compiled. With a little extra requiremenrt in the problem.c one could make the executable a little more self-describing.

Alternatively, I could rename the binary to rebound_ or something like it.

as i'm writing this, I have a deja-vu on this issue.

hannorein commented 8 months ago

I'm not sure it's the same as for ATHENA. REBOUND is a shared library. It is only compiled once. Almost all options (collision routines, integrators, etc) are set at runtime. There are only a few options that are set at compile time (whether MPI or OpenMP are used). What the user does with the library is out of REBOUND's control. The examples provide a simple Makefile and a problem.c file with a main routine. That would be the place to implement the self-describing feature you're suggesting. But that's really up to the user.

hannorein commented 8 months ago

Two more thoughts:

teuben commented 8 months ago

Understood. I took the plummer example in rebound, and nemo-fied this as an example how a 3rd party could use it. In case I wind up giving this hypothetical talk, it would be my NEMO example. Looks promising so far.