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

Periodic Nirvana #481

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Periodic Nirvana #481

merged 1 commit into from
Sep 22, 2022

Conversation

fredrikekre
Copy link
Member

This patch fixes most remaining issues with periodic constraints:

  • collect_periodic_faces now return Vector{PeriodicFacePair} instead of Dict{Int,Int}. This is necessary since, in 3D, we need to keep track of i) the relative rotation between the faces and ii) if they are mirrored (opposing normal vectors) or not
  • Several bugs related to 3D periodicities and rotation/mirroring have been fixed
  • Numbering for quadratic interpolation for 3D cubes have been fixed to match the rest of Ferrite. The added tests for periodic constraints revealed this issue

With this patch, periodic constraints should work fine for linear and quadratic interpolations for and all supported cell types in both 2 and 3 dimensions.

@KristofferC
Copy link
Collaborator

Are there any examples that use periodic B.C yet?

@fredrikekre
Copy link
Member Author

https://ferrite-fem.github.io/Ferrite.jl/stable/examples/computational_homogenization/

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Base: 91.57% // Head: 91.90% // Increases project coverage by +0.33% 🎉

Coverage data is based on head (b885758) compared to base (9e8aabc).
Patch coverage: 92.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #481      +/-   ##
==========================================
+ Coverage   91.57%   91.90%   +0.33%     
==========================================
  Files          22       22              
  Lines        3547     3644      +97     
==========================================
+ Hits         3248     3349     +101     
+ Misses        299      295       -4     
Impacted Files Coverage Δ
src/interpolations.jl 88.52% <85.71%> (+1.31%) ⬆️
src/Dofs/ConstraintHandler.jl 93.15% <93.00%> (+0.09%) ⬆️
src/Dofs/DofHandler.jl 89.01% <0.00%> (+2.19%) ⬆️

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.

This patch fixes most remaining issues with periodic constraints:

 - collect_periodic_faces now return Vector{PeriodicFacePair} instead of
   Dict{Int,Int}. This is necessary since, in 3D, we need to keep track of
   i) the relative rotation between the faces and ii) if they are mirrored
   (opposing normal vectors) or not
 - Several bugs related to 3D periodicities and rotation/mirroring have
   been fixed
 - Numbering for quadratic interpolation for 3D cubes have been fixed to
   match the rest of Ferrite. The added tests for periodic constraints
   revealed this issue

With this patch, periodic constraints should work fine for linear
and quadratic interpolations for and all supported cell types in both 2
and 3 dimensions.
@fredrikekre fredrikekre merged commit f8bcd43 into master Sep 22, 2022
@fredrikekre fredrikekre deleted the fe/collect-periodic branch September 22, 2022 12:20
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