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

Rework code for add!(::ConstraintHandler, ::Dirichlet) #672

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

fredrikekre
Copy link
Member

This patch cleans up the code for adding Dirichlet constraints to the ConstraintHandler a bit after the DofHandler merge. In particular, it deprecates the method

add!(::ConstraintHandler, ::FieldHandler, ::Dirichlet)

in favor of just

add!(::ConstraintHandler, ::Dirichlet)

which was added in #427. There is no need to be able to specify the constrained set by both the set passed to Dirichlet and by the set given to the FieldHandler. Looking at the tests modified in this patch, it seems this was never the intention anyway. This patch also removes the copy of the set in the Dirichlet constructor in favor of explicit partitioning of the set over the FieldHandlers.

@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.35 ⚠️

Comparison is base (856dc28) 93.47% compared to head (7ccf8b8) 93.13%.

📣 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     #672      +/-   ##
==========================================
- Coverage   93.47%   93.13%   -0.35%     
==========================================
  Files          29       29              
  Lines        4273     4265       -8     
==========================================
- Hits         3994     3972      -22     
- Misses        279      293      +14     
Impacted Files Coverage Δ
src/Dofs/ConstraintHandler.jl 94.75% <100.00%> (-1.24%) ⬇️

... and 2 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@KnutAM KnutAM left a comment

Choose a reason for hiding this comment

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

Nice!
Renaming x -> nodeid or similar would be nice, otherwise looks good from my perspective

src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
This patch cleans up the code for adding `Dirichlet` constraints to the
`ConstraintHandler` a bit after the DofHandler merge. In particular, it
deprecates the method
```
add!(::ConstraintHandler, ::FieldHandler, ::Dirichlet)
```
in favor of just
```
add!(::ConstraintHandler, ::Dirichlet)
```
which was added in #427. There is no need to be able to specify the
constrained set by both the set passed to `Dirichlet` and by the set
given to the `FieldHandler`. Looking at the tests modified in this
patch, it seems this was never the intention anyway. This patch also
removes the copy of the set in the `Dirichlet` constructor in favor of
explicit partitioning of the set over the `FieldHandler`s.
@fredrikekre fredrikekre merged commit 180e24d into master Apr 4, 2023
@fredrikekre fredrikekre deleted the fe/fieldhandler-dbc branch April 4, 2023 20:53
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