-
Notifications
You must be signed in to change notification settings - Fork 629
Local adjoint source for Random Ray #3717
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
Open
j-fletcher
wants to merge
40
commits into
openmc-dev:develop
Choose a base branch
from
j-fletcher:local_adjoint
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
32bd64c
Add local adjoint source
j-fletcher b1c39a6
local adjoint init
j-fletcher 30cd002
Added forward-weighted adjoint sources from @jtramm
j-fletcher 884dec7
Merge branch 'develop' into local_adjoint
j-fletcher 767fa79
Use single simulation for fwd/adjoint transport
j-fletcher f3e49f2
Clean up updated adjoint source setting
j-fletcher 97f8133
add cadis as option on WWG
j-fletcher 001f176
CADIS WWG UI with model.tallies linking
j-fletcher 5e27354
fix possible typo in WWG.from_xml_element()
j-fletcher eea6be3
cpp UI
j-fletcher 291fb21
regression tests and import bugfixes
j-fletcher abc518e
Merge branch 'develop' into local_adjoint and keep changes to random_…
j-fletcher dcbcf75
update missing tests and formatting
j-fletcher 37e1650
fix rr test input file
j-fletcher 3d438fe
Check correct type provided for WWG targets
j-fletcher a04aa26
Regression tests and change CADIS to FW-CADIS
j-fletcher 23dd631
Documentation; adjoint source type checking; multiple adj source
j-fletcher dc2c53f
docs/formatting, FW adjoint sources for FW-CADIS in eigenvalue mode
j-fletcher 0076fb1
Fixing regression tests
j-fletcher 6e4c366
Merge branch develop into local_adjoint
j-fletcher aad939b
fix formatting
j-fletcher 5e8833c
Revert random_ray_simulation.cpp to before merge
j-fletcher dde172d
reattempt merge for random_ray_simulation
j-fletcher 464886f
Move openmc_run_random_ray to C API functions
j-fletcher 5e1c134
Add ray_source to new temperature test inputs
j-fletcher a511530
Fix FW-CADIS local regression test
j-fletcher a427927
Modify input files for RR local adjoint test and rerun local FW-CADIS…
j-fletcher da80ab7
Rerunning local FW-CADIS test with strict FP
j-fletcher 0927541
Rerunning local FW-CADIS test with OpenMP off
j-fletcher 18f6781
Add SR mesh to fix reg test. set_fw_adjoint_sources() now searches fo…
j-fletcher b96e89a
Merge branch 'develop' into local_adjoint
j-fletcher 8f08c1f
fix random_ray_adjoint_local test and merge branch develop into local…
j-fletcher a195b23
Fix SR mesh not being applied during user-defined adjoint sim
j-fletcher af15541
Update random_ray_adjoint_local test results
j-fletcher 11ca70b
stop printing source term for every adjoint source region
j-fletcher 9e5432a
Merge branch 'develop' into local_adjoint
j-fletcher 21160f7
FSR evaluates whether to apply fixed source from adjoint or external …
j-fletcher ab2a8c8
remove redundant filter validity check, always warn when point source…
j-fletcher 48c21e2
Refactor openmc_run_random_ray to mirror updated version
j-fletcher 9b31b16
fix declaration of prepare_adjoint_simulation
j-fletcher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It would be nice if we were able to enforce this restriction (if you're not already doing this?). Probably not feasible for the
openmc.Tallies.export_to_xmlcall, but theopenmc.Settings.export_to_xmlcall seems like it would have the needed info to determine if local variance reduction is active?Uh oh!
There was an error while loading. Please reload this page.
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 way I'm currently enforcing it is to perform an equivalence check (during Model.export_to_xml/export_to_model_xml) between the tally objects or IDs provided on WeightWindowGenerator.targets, and the tallies currently present in the model. Each of the tallies (or IDs) specified as targets must be equivalent to a tally (or its ID) on Model.tallies. While the WeightWindowGenerator is stored under Model.settings, the tallies are under Model.tallies, hence I wasn't able to put the check under Settings itself.
The nearest comparison that comes to mind is the use of tallies with a CellFilter--when a cell filter is added to a tally, the tally and filter are written to the XML file from Python without verifying that these cells are present in Model.geometry, and instead the check is performed when the filter (with the rest of the tallies subelement) is read off the XML file in C++. However, because the settings (and hence any WeightWindowGenerators) are read from XML before any tallies, I felt it would be cumbersome to perform the check on target tallies with the same timing. In contrast, Model._link_geometry_to_filters() meanwhile is called during Model.export_to_xml/export_to_model_xml, and it ensures that the reference geometry for each DistribcellFilter present in the Model.tallies is the same geometry present under Model.geometry. I felt that Model._assign_fw_cadis_tally_IDs() performed a similar enough task, but let me know if you think it should still be changed!