Skip to content

Refactor and introduce SphericalOverdensity model - #539

Open
mabruzzo wants to merge 8 commits into
cholla-hydro:devfrom
mabruzzo:overdensity-model
Open

mabruzzo wants to merge 8 commits into
cholla-hydro:devfrom
mabruzzo:overdensity-model

Conversation

@mabruzzo

Copy link
Copy Markdown
Collaborator

This PR lightly refactors the codebase so that we now define a very simplistic SphericalOverdensity model.

The main thing that changes here are that:

  • the Header::sphere_radius, Header::sphere_*, data members are now tracked in a dedicated model object
  • it makes sense for this to be a model object because the model properties (e.g. overdensity, bkg_density, center-position, initial_radius) must be known for both initialization AND for setting boundaries
  • the associated overdensity and bkg_density are now runtime arguments (the model machinery requires each model to be configurable by one or more runtime parameter -- I picked these somewhat arbitrarily). I added documentation for these new parameters
  • as part of this PR, I ported over the documentation for the init runtime parameter

Motivation: This PR, #524 and #525 will all be required in order to cleanup the Grav3D class. Plus, this is a much more simple example of the kinds of things that should be implemented as model objects.

Note

I was very careful to try to avoid breaking things. However, I'm pretty sure that test-problems leveraging this machinery are fundamentally broken. Unless I'm totally off-base, this requires non-periodic boundaries (if we want to run it with periodic boundaries, then we can cull lots of things -- this doesn't even need to be a model). Since SOR doesn't work, I think we're run this with Periodic Paris. But, we'll see as I continue trying to clean things up

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant