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

Sparsity patterns without constrained dofs #539

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

fredrikekre
Copy link
Member

@fredrikekre fredrikekre commented Nov 28, 2022

This patch adds a new keyword argument keep_constrained::Bool=true to
create_sparsity_pattern which, when set to false, do not create
entries in the global matrix for rows/values that correspond to
constrained degrees of freedom. Naturally this can only be used with
local condensation of constraints (cf. #528).

Another necessary change included in this patch is that assembly now
ignores entries in the local matrix that are zero (in particular
rows/columns in the local matrix which have been zeroed out in the local
condensation).
Merged separately in #543.

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2022

Codecov Report

Base: 92.89% // Head: 92.69% // Decreases project coverage by -0.19% ⚠️

Coverage data is based on head (6bab9ff) compared to base (891371c).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 6bab9ff differs from pull request most recent head e3a3ad7. Consider uploading reports for the commit e3a3ad7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
- Coverage   92.89%   92.69%   -0.20%     
==========================================
  Files          25       23       -2     
  Lines        4051     3985      -66     
==========================================
- Hits         3763     3694      -69     
- Misses        288      291       +3     
Impacted Files Coverage Δ
src/Dofs/ConstraintHandler.jl 94.78% <100.00%> (-1.11%) ⬇️
src/Dofs/DofHandler.jl 91.15% <100.00%> (+0.56%) ⬆️
src/interpolations.jl 90.00% <0.00%> (-1.49%) ⬇️
src/Dofs/MixedDofHandler.jl 86.87% <0.00%> (-0.57%) ⬇️
src/PointEval/PointEvalHandler.jl 92.13% <0.00%> (-0.57%) ⬇️
src/Quadrature/quadrature.jl 94.23% <0.00%> (-0.32%) ⬇️
src/Grid/grid.jl 86.99% <0.00%> (-0.31%) ⬇️
src/L2_projection.jl 100.00% <0.00%> (ø)
src/FEValues/common_values.jl 92.75% <0.00%> (ø)
... and 5 more

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.

@lijas
Copy link
Collaborator

lijas commented Nov 29, 2022

Would be nice to see some benchmarks on how much memory is saved (in for example the heat-example :) )

@fredrikekre fredrikekre force-pushed the fe/do_not_keep_constrained branch 2 times, most recently from 6ba5c31 to 04a2603 Compare December 1, 2022 01:17
@fredrikekre
Copy link
Member Author

Basically none :D The number of constrained dofs are usually negligible compared to free dofs.

This patch adds a new keyword argument `keep_constrained::Bool=true` to
`create_sparsity_pattern` which, when set to `false`, do not create
entries in the global matrix for rows/values that correspond to
constrained degrees of freedom. Naturally this can only be used with
local condensation of constraints (cf. #528).
@fredrikekre fredrikekre merged commit 38941ed into master Dec 20, 2022
@fredrikekre fredrikekre deleted the fe/do_not_keep_constrained branch December 20, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants