-
Notifications
You must be signed in to change notification settings - Fork 579
[Point Detector] Add distribution get_pdf functionality #3550
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
base: develop
Are you sure you want to change the base?
Conversation
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 work @itay-space!
My review focus more on the code structure side of things.
I did not check the maths.
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
Co-authored-by: GuySten <[email protected]>
The fact that we need the seed to sample the outgoing energy is not that surprising. Because in theory the exact angular pdf does not depend on the outgoing energy at all! |
|
If all the tests will pass and nobody will object I am planning to merge this PR at the start of next week. Now the names we use should not clash with the source biasing PR. @eepeterson, @itay-space, @j-fletcher, if you have further comments you have until start of next week. |
|
I do have additional comments, thanks for your patience.
|
|
|
@GuySten @eepeterson |
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.
Putting a placeholder review as I'd like to take a look at this before we merge.
|
Hello all, apologies for the delay here.
|
|
@itay-space, I noticed that the calculation of the uncollided contribution to the point detector tally is using the probability density function of emitting a particle in a specific direction. I think that we should extend this PR (or maybe add another PR) that will add evaluate function for the classes that inherit from UnitSphereDistribution. I propose the signature: double evaluate(Direction u) to match the signature of the rest of the 1d distribution functions. |
|
@GuySten , Thanks for the suggestion! These classes already rely on two independent 1D distributions (polar and azimuthal), and the evaluate methods are implemented at that level. The sphere distributions just combine those underlying 1D PDFs, so the functionality is already covered. |
|
@itay-space, the conversion is not trivial because of the reference direction, so I think that adding this functionality is worth while. |
|
@GuySten I’m not sure why this would be different from the other cases (I can’t see it right now), but sure, go ahead and add the functionality. I have no objections. Thanks! |
|
I am waiting for #3582 to be merged to add the functionality I talked about. |
|
@paulromano, I am reminding you to look at this PR when you have some time. |
Thanks for breaking out this small PR and great to see it is now merged |
|
I've added the functionality I wanted. @paulromano, could you take some time to review this PR? You asked to review this RP before we are merging it, and I want to merge this PR and continue to the next parts of the point detector work. |
|
@GuySten Yes, I will try to get to it this week |
Description
This PR is the first step in breaking down the point detector tally project into smaller, reviewable pieces, following the large PR #3109
and the paper Development and benchmarking of a point detector in OpenMC.
As suggested during the earlier discussion (thanks @GuySten, @gridley, @shimwell !), the natural starting point is to add the ability to correctly calculate PDFs on the C++ side.
Accordingly, this PR introduces the get_pdf implementations for the distribution classes. This is essentially a clean cut from the original large PR, with the goal of keeping the scope focused and review manageable.
We plan to follow up with tests and additional pieces of the point detector work in subsequent PRs.
Checklist