-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement a fast reading mode. #382
Comments
A "fast-read, read-only" mode would be extremely useful. |
What do you mean by read-only here? |
Because...
...then, having a partially loaded model that the user cannot modify makes sense. It might be too annoying to make read-only versions of objects, though. It might be better to just make it the user's responsibility not to do bad ideas. |
Yeah... I think just a lot of warnings in the documentation is the way to go. |
Idea from our meeting with @dodu94: on-the-fly parsing |
I'll open an issue about it |
Problem
A common use case of MontePy is model interrogation, where you are interested in just getting a few pieces of data from say one cell.
For large models this isn't very practical as loading the whole model can take upwards of a minute, and makes prototyping the code hard.
Solution
I proposed making a mode to read the input file in which only the objects the user cares about are loaded.
For instance
montepy.fast_read(cells={1,2,3})
would only read cells 1,2,3 and their supporting surfaces, materials, transforms, modifiers, etc.
This does present opportunities for doing bad ideas like trying to modify a partially loaded model.
This would require significant work under the hood, and would need to really optimize the process of identifying relevant objects.
The text was updated successfully, but these errors were encountered: