Closed nuclearkevin closed 1 week ago
Job Documentation on 51cfa7f wanted to post the following:
View the site here
This comment will be updated on new commits.
Job Coverage on 51cfa7f wanted to post the following:
d46e57 | #951 51cfa7 | ||||
---|---|---|---|---|---|
Total | Total | +/- | New | ||
Rate | 93.40% | 93.19% | -0.21% | 86.55% | |
Hits | 7472 | 7620 | +148 | 206 | |
Misses | 528 | 557 | +29 | 32 |
This comment will be updated on new commits.
👀
Job Precheck on 544eedb wanted to post the following:
Your code requires style changes.
A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:
curl -s https://mooseframework.inl.gov/cardinal/docs/PRs/951/clang_format/style.patch | git apply -v
Alternatively, with your repository up to date and in the top level of your repository:
git clang-format d46e57f4d038ff25544f4ab0fcd2f1bf66045212
just needs a rebase and then I am good to merge
Job Documentation, step Sync to remote on e76ca06 wanted to post the following:
View the site here
This comment will be updated on new commits.
Job Coverage, step Generate coverage on e76ca06 wanted to post the following:
a458e5 | #951 e76ca0 | ||||
---|---|---|---|---|---|
Total | Total | +/- | New | ||
Rate | 93.42% | 93.20% | -0.21% | 86.55% | |
Hits | 7477 | 7625 | +148 | 206 | |
Misses | 527 | 556 | +29 | 32 |
This comment will be updated on new commits.
@aprilnovak I've finished rebasing this, it should be good to go now!
Reason
This PR implements a filter system, an associated block in Cardinal's input syntax (
[Problem/Filters]
), and four new filters which tallies added through the[Problem/Tallies]
block can access. The added filter objects are:EnergyFilter
: a thin wrapping of an OpenMC EnergyFilter.PolarAngleFilter
: a thin wrapping of an OpenMC PolarFilter.AzimuthalAngleFilter
: a thin wrapping of an OpenMC AzimuthalFilter.FromXMLFilter
: makes an arbitrary OpenMC filter (added in thetallies.xml
file) available to Cardinal tallies through the filter's id.The input syntax is similar to the recently added tally system:
(
tests/neutronics/filters/multi_filter.i
)Design
The new filters system has the following objects other than the previously mentioned filters:
FilterBase
: A class which wraps a single OpenMC filter.FilterBase
classes are constructed by anOpenMCCellAverageProblem
through theaddFilter(...)
function, which mirrors the tally system and other MOOSE object construction patterns. Filters derived fromFilterBase
must override thebinName(...)
function, which returns a unique name for each bin in the filter to enable output formatting. Otherwise, classes which derive fromFilterBase
must ensure that_filter
and_filter_index
are populated by the derived filter's constructor.AddFilterAction
: An Action which is responsible for addingFilterBase
objects to an OpenMCCellAverageProblem. This action callsaddFilter(...)
when the simulation reaches the new add_filters task during execution. Filters are added before tallies and after the initialization of the problem.The filters added through the filters system must use discrete bins as the tallies are still normalized by a sum over all bins. This restriction could be lifted, however this would require a substantial change to tally normalization to allow bins that contain coefficients to be skipped when computing the sum over the entire tally.
In addition to the above, this PR modifies the tally system to reduce the amount of duplicate code and fixes a bug in both
MeshTally
andCellTally
which caused a memory leak when using aMOABSkinner
. These changes can be removed from this PR and submitted in their own PR to expedite merging, if that's preferred.Impact
Closes #602.