Skip to content
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

Fix constraint condensation for Symmetric matrices. #592

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

fredrikekre
Copy link
Member

This patch fixes an issue where f would be incorrectly modified in apply!(K, f, ch) when K::Symmetric and when using inhomogeneous constraints. Specifically this patch make sure that entries below the diagonal of the matrix backing the Symmetric aren't used, and that the corresponding entries from above the diagonal are used in their place.

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2023

Codecov Report

Base: 92.76% // Head: 92.79% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (98d327b) compared to base (ff468af).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
+ Coverage   92.76%   92.79%   +0.02%     
==========================================
  Files          28       28              
  Lines        4203     4217      +14     
==========================================
+ Hits         3899     3913      +14     
  Misses        304      304              
Impacted Files Coverage Δ
src/Dofs/ConstraintHandler.jl 96.05% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@termi-official
Copy link
Member

Small suggestion here, maybe it makes sense to split up the function into two (one for Symmetric one for SparseMatrixCSC) instead of putting the branches in the existing function.

This patch fixes an issue where `f` would be incorrectly modified in
`apply!(K, f, ch)` when `K::Symmetric` and when using inhomogeneous
constraints. Specifically this patch make sure that entries below the
diagonal of the matrix backing the `Symmetric` aren't used, and that the
corresponding entries from above the diagonal are used in their place.
@fredrikekre
Copy link
Member Author

The rest of the method is the same though, so I think that would give more code duplication. I don't think the branch is too bad.

@fredrikekre fredrikekre merged commit 3dd1411 into master Feb 3, 2023
@fredrikekre fredrikekre deleted the fe/applysym branch February 3, 2023 08:46
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.

3 participants