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

Unify Dirichlets and affine constraints #529

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

lijas
Copy link
Collaborator

@lijas lijas commented Oct 26, 2022

Currently, it is possible for Dirichlet and affine constraints to lock the same dof. This PR unifies Dirichlets and Affine constraints and makes it impossible for a dof to be locked by both affine and Dirichlet constraints.

If two conflicting constraints are added (prescribing the same dof), the most recently added constraint will be used.

src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Show resolved Hide resolved
src/Dofs/ConstraintHandler.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2022

Codecov Report

Base: 92.36% // Head: 92.31% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (785c23a) compared to base (c5523a6).
Patch coverage: 97.82% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
- Coverage   92.36%   92.31%   -0.05%     
==========================================
  Files          22       22              
  Lines        3783     3776       -7     
==========================================
- Hits         3494     3486       -8     
- Misses        289      290       +1     
Impacted Files Coverage Δ
src/Dofs/MixedDofHandler.jl 86.29% <0.00%> (ø)
src/Dofs/ConstraintHandler.jl 94.92% <98.88%> (-0.16%) ⬇️
src/Dofs/DofHandler.jl 89.16% <100.00%> (ø)

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.

Copy link
Collaborator Author

@lijas lijas left a comment

Choose a reason for hiding this comment

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

I approve

src/Dofs/ConstraintHandler.jl Show resolved Hide resolved
This patch unifies the representation of `Dirichlet` and
`AffineConstraint`s in the `ConstraintHandler`. `Dirichlet` is now more
or less just special case of `AffineConstraint`. As a result,
conflicting constraints on DoFs are handled more consistently: the
constraint added last to the `ConstraintHandler` now always override any
previous constraints. Conflicting constraints could previously cause
problems when a DoF where prescribed by both `Dirichlet` and
`AffineConstraint`.

Co-authored-by: Elias <[email protected]>
Co-authored-by: Fredrik Ekre <[email protected]>
@fredrikekre fredrikekre merged commit 8e447e2 into Ferrite-FEM:master Oct 27, 2022
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