Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling writing files for use of Phantom as a library #499

Open
rieder opened this issue Feb 8, 2024 · 1 comment
Open

Disabling writing files for use of Phantom as a library #499

rieder opened this issue Feb 8, 2024 · 1 comment

Comments

@rieder
Copy link
Contributor

rieder commented Feb 8, 2024

I am reworking the AMUSE interface to Phantom, since Phantom has progressed since I wrote it initially.

The main change I need to make to Phantom for use with AMUSE is a way to prevent Phantom from writing any files (evfile, dumps, logs...). We would basically use it as a library, and any i/o would be handled through AMUSE. Output to screen is still fine.

Would it be ok to introduce a "dont_write_files" logical of some kind, e.g. in the options module, which is then checked wherever a file would be written?

The main difficulties without this are in functions/subroutines that don't just write files, but that also calculate things that are required later on. I would have to write largely-identical functions without the i/o part, which would be hard to maintain.

@danieljprice
Copy link
Owner

we should really merge the AMUSE interface stuff into phantom, it's been hanging there for a while... an option in the options module sounds fine in principle, it should not appear in the phantom .in file though, just set to .true. if called via the library and .false. otherwise.

If you can send a pull request that is updated to the latest code I'd be happy to give a code review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants