Skip to content

Jacobian bugfix - #1646

Merged
cmdupuis3 merged 10 commits into
mainfrom
cmd/jacobian_bug
Aug 6, 2026
Merged

Jacobian bugfix#1646
cmdupuis3 merged 10 commits into
mainfrom
cmd/jacobian_bug

Conversation

@cmdupuis3

@cmdupuis3 cmdupuis3 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #1645

Overview

This PR resolves incorrect Jacobian calculations, described in #1645.

The fix is fairly simple, we basically just rename the node jacobian results so they don't clobber the accumulators. I also added a regression test.

Bonus: The Grid.face_jacobian property was technically unreachable due to a logic error. One-line fix.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking

  • Tests are not too basic (such as simply calling a function and nothing else)
  • Tests cover all major paths in your new functions

@cmdupuis3 cmdupuis3 self-assigned this Aug 4, 2026
@cmdupuis3 cmdupuis3 added the bug Something isn't working label Aug 4, 2026
@cmdupuis3

Copy link
Copy Markdown
Collaborator Author

pre-commit.ci autofix

@cmdupuis3
cmdupuis3 requested a review from rajeeja August 5, 2026 00:55
@Sevans711
Sevans711 self-requested a review August 5, 2026 18:45

@Sevans711 Sevans711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fixes look clean, fully covers the scope of the original issue, and I confirmed the regression tests fail on main but succeed on this branch. Looks ready to merge!

My only tiny suggestion (non-blocking) would be to maybe add something like "regression test for issue # 1645" to the test docstring for easy/quick future reference.

Added regression test for issue #1645 in the Jacobian summation function.

@rajeeja rajeeja 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.

Verified locally: the accumulator no longer gets clobbered, face areas are unchanged, and the new regression tests plus the rest of test_areas.py pass. The face_jacobian property fix is correct too.

@cmdupuis3
cmdupuis3 merged commit ab023b9 into main Aug 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Claude] calculate_face_area returns an incorrect Jacobian

3 participants