Skip to content

Conversation

@Snapex2409
Copy link
Collaborator

@Snapex2409 Snapex2409 commented Nov 3, 2025

Added support for multiple micro models and mocked switching.
Multi-Model support via ModelAdaptivity class.
Switching currently hard coded as: upper half of all sims in the micro_sims list are set to use the second MicroSim type.

Checklist:

  • I made sure that the CI passed before I ask for a review.
  • I added a summary of the changes (compared to the last release) in the CHANGELOG.md.
  • If necessary, I made changes to the documentation and/or added new content.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@IshaanDesai IshaanDesai added the new-feature Adding a new feature label Nov 4, 2025
@IshaanDesai IshaanDesai linked an issue Nov 7, 2025 that may be closed by this pull request
@Snapex2409 Snapex2409 marked this pull request as ready for review November 12, 2025 19:17
Copy link
Member

@IshaanDesai IshaanDesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work already! I did a first pass, in which I looked at everything except the tests. I would like to do another review before we finalize things, especially to look at the model_adaptivity.py once more. Please take a look at my comments.

Comment on lines +141 to +142
locations : np.array - shape(N,D)
Array with gaussian points for all sims. D is the mesh dimension.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about having macro locations as part of the switching function inputs. I could imagine the switching being solely based on the macro- and micro-scale data available at a particular point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it might be useful to enforce FOM at certain locations, where the user can already expect high fluctuations in input/output or where maximal accuracy should be guaranteed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it might be useful to enforce FOM at certain locations, where the user can already expect high fluctuations in input/output or where maximal accuracy should be guaranteed.

Yes, that should be possible and required. But my comment was still about why the macro-scale coordinates need to be passed to the switching function. I look at the switching function as a function to be called individually at each location. If the switching mechanism requires a macro-scale location, it can be passed on a per-micro-scale simulation basis. I think having a single call-type switching mechanism is beneficial for the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature Adding a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model switching methodology and criterion

3 participants