-
Notifications
You must be signed in to change notification settings - Fork 11
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
updating to most recent musica version #298
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
=======================================
Coverage 82.04% 82.04%
=======================================
Files 13 13
Lines 891 891
=======================================
Hits 731 731
Misses 160 160 ☔ View full report in Codecov by Sentry. |
@@ -229,7 +228,7 @@ def loadJson(self, path_to_json): | |||
camp_path = os.path.join(os.path.dirname(path_to_json), self.config_file) | |||
|
|||
# Initalize the musica solver | |||
self.solver = musica.create_solver(camp_path, musica.micmsolver.rosenbrock, 1) | |||
self.solver = musica.create_solver(camp_path, musica.micmsolver.rosenbrock_standard_order, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why has the solver type changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vector ordered solver has a default vector lenght of 4. It is the callers responsibility to appropriately size the input array to match what musica expects to write the results to. In this case, musica blindly copies the output values
So, if we have only 1 grid cell and 2 species, micm would internally hold a state array of length 8 (species 1 cell 1, specie 1 cell 2, specie 1 cell 3, species 1, cell 4, species 2 cell 1, species 2 cell 2, species 3 cell 3, species 4 cell 4). Thus, music box would need to correctly calculate the size of this array.
It's easiest to use the standard ordered solver because we don't have to care about those empty cells
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thank you for the detailed explanation!
No description provided.