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

Encourage proper management of subspaces in user code #2916

Merged
merged 14 commits into from
Dec 1, 2023
Merged

Conversation

IgorBaratta
Copy link
Member

We've observed a common pattern where subspaces are frequently extracted but not stored, leading to unnecessary overhead in smart pointer management and repetitive creation and destruction of subspaces.

The idea of this PR is to encourage users to retain their subspaces, eg:

V0 = V.sub(0)
...
# reuse V0

@garth-wells garth-wells added this pull request to the merge queue Dec 1, 2023
Merged via the queue into main with commit 30d09ec Dec 1, 2023
20 checks passed
@garth-wells garth-wells deleted the igor/subspace branch December 1, 2023 13:37
jorgensd added a commit to jorgensd/dolfinx_mpc that referenced this pull request Dec 4, 2023
jorgensd added a commit to jorgensd/dolfinx_mpc that referenced this pull request Dec 4, 2023
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.

2 participants