Skip to content

Add more operator overloads in the new Tensor class#3822

Merged
paulromano merged 3 commits intoopenmc-dev:developfrom
nuclearkevin:tensor
Feb 19, 2026
Merged

Add more operator overloads in the new Tensor class#3822
paulromano merged 3 commits intoopenmc-dev:developfrom
nuclearkevin:tensor

Conversation

@nuclearkevin
Copy link
Contributor

Description

I've been working on updating Cardinal to the latest version of OpenMC after the removal of XTensor, and found that a few operator overrides are missing in the new tensor class (which saw use in Cardinal). This PR adds those operators to the new tensor class.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@nuclearkevin nuclearkevin changed the title More operators in the new Tensor class Add more operator overloads in the new Tensor class Feb 19, 2026
@GuySten GuySten added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Feb 19, 2026
@paulromano paulromano merged commit efefdb1 into openmc-dev:develop Feb 19, 2026
23 of 29 checks passed
@nuclearkevin nuclearkevin deleted the tensor branch February 19, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merging Soon PR will be merged in < 24 hrs if no further comments are made. Other Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants