Skip to content

Follow-up to Clip negative atom densities: Cleanup of redundant warnings and clips - #4170

Merged
paulromano merged 1 commit into
openmc-dev:developfrom
yrrepy:remove-negative-density-warning
Oct 5, 2026
Merged

paulromano merged 1 commit into
openmc-dev:developfrom
yrrepy:remove-negative-density-warning

Conversation

@yrrepy

@yrrepy yrrepy commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

What's this? Yes a PR that only removes lines of code.
Yay!

A sweep-up of lingering warning statements and positivity enforcement, prior to negative atom density clipping being moved closer to the CRAM solver by #3879

Because of the clip in abc.py

        # Clip unphysical negative number densities
        for r in results:
            r.clip(min=0.0, out=r)

These lingering else statements are no longer reachable.
They are redundant, in effect: dead code

@yrrepy
yrrepy requested a review from paulromano as a code owner October 5, 2026 05:21

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I love PRs that are all red! 🔪 Thanks for the cleanup @yrrepy!

@paulromano
paulromano merged commit 8564c64 into openmc-dev:develop Oct 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants