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

Reimplement loading arepo parameters from a file #17

Open
1 of 6 tasks
stephenpcook opened this issue Dec 2, 2024 · 0 comments
Open
1 of 6 tasks

Reimplement loading arepo parameters from a file #17

stephenpcook opened this issue Dec 2, 2024 · 0 comments

Comments

@stephenpcook
Copy link
Member

stephenpcook commented Dec 2, 2024

Brief

We want to use arepo's read_parameter_file to load parameters at the amuse "commit" state. Before "commit", functions can be called to edit the parameter file (or buffer), and after this state, functions would instead modify the stored values (e.g., in All).

Steps

  • Add example parameter files for existing cases (noh, collisionless, merger).
  • Re-add call to read_parameter_file.
  • Edit example parameter files and examples so they work with the examples.
  • Move call to read_parameter_file to commit state.
  • Add functions for manipulating parameter files, only callable before commit.
  • Have parameter getters/setters edit parameter file before commit and running state after commit.

Background

The approach to loading arepo parameters so far has been to remove the call to read_parameter_file from begrun11, and instead set the parameters via functions in the interface234. This had the advantage of being able to control the settings in the amuse code. The downside is that as we cover cases for different families of arepo configurations, we would need to make use of ifdefs to keep these functions compiling, which is becoming restrictive.

We probably also want functions which copy the parameter file from a params/ directory to the root arepo directory. Similar for make-configuration files?

Proposed solution

We will go back to using parameter files which are processed by read_parameter_file in the "commit" state.
To supplement this, we'll add functions for manipulating the parameter file prior to committing, in the "edit" state.
Functions include:

  • Setting a new parameter's value
  • Editing the line of an existing parameter
  • Removing a line corresponding to a parameter entirely

These operations are only permitted during the edit state.
After this, we may instead need to enable editing a subset of the parameters via setters/getters.
Using these "direct" getters/setters prior to the "commit" state should either raise an error, or instead call the equivalent function editing the parameter file.

Interacting with a parameter file may be replaced by a buffer - a consideration for later.

Footnotes

  1. Comment out read_parameter_file in begrun - fc35f9d

  2. Change Makefiles + interface to run Noh 3D example - fa41c69

  3. Add noh config+params for molecular cloud - d7611cf

  4. Add params for galaxy merger run - 1599477

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

1 participant