-
Notifications
You must be signed in to change notification settings - Fork 0
adding the base structure for on the fly amalgamation #4
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
Conversation
|
Documenting my thought process: Based on in person discussion, for the better performance it will be nice to create a hash map [as Not sure if would be better to put in the constructor since goalcreate a hash map where every element in a cluster would map to the first element of in that cluster if the element isn't part of a cluster then it will point to it self. Overall it will be something like this
I was seeing that openmc creates vectors for ps: I need to test if this works or not. |
|
So far the hash map was failing as we only do the mapping when the system is adaptive. Now openmc determines if the system is adaptive or not, by comparing if the That kinda forces us to create the hash map anyway even if the mesh is adaptive or not. Not sure how that OpenMC folks will think about this, as in case someone isn't doing AMR, that hash map will just hold on to some chunk of memory. |
|
|
|
Documenting my though process: So I ran the 1D UO2 and graphite slab test case with mesh tally amalgamation on the fly but got the same result as standalone AMR case which was weird as I did saw that clustering process was working just fine, grouping elements where I wanted to see the clustering. After doing some poor man's debugging, I realized that, this constructor Ig maybe I shouldn't worry about code repetition in this case |
gonuke
left a comment
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.
Nice addition @magnoxemo - fascinatingly cool that it's a relatively modest change to make this happen.
gonuke
left a comment
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.
I am not sure the final version of get_bin_from_element() is safe when amalgamatation_ is false.
gonuke
left a comment
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.
One last readability fix.
gonuke
left a comment
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.
Some changes from today's discussion
gonuke
left a comment
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.
Nice!
gonuke
left a comment
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.
LGTM
|
I am going to merge it and open a new PR from |
This code change is for doing mesh tally amalgamation in the post processing.
Main goal is if
mesh_tally_amalgamationis on and a bin is part of a cluster then we will only store tally in the first element in that cluster. When cardinal will access the raw tally data from openmc it will store the result in other elements in the cluster[details] (magnoxemo/cardinal#13 )
@gonuke @pshriwise