firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
517 stars 160 forks source link

Fix coarsening for R space #3814

Open pbrubeck opened 1 month ago

pbrubeck commented 1 month ago

Description

This PR fixes two separate issues for multigrid with Functions in R.

  1. The restriction operator for the R space is square. For these cases PETSc complains if we do not pass a vector to rescale the restriction operator to construct the "cheap" injection, even though it is not necessary, as we already pass the proper injection operator. To fix this we just pass a vector of the appropriate size.

  2. The parentdm of an R space function sometimes might have a null __setup_hooks__, which makes it impossible to call add_hook on it. As a workaround, we just skip that call.

github-actions[bot] commented 1 month ago
TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake complex8079 ran6497 passed1582 skipped0 failed
github-actions[bot] commented 1 month ago
TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake real8085 ran7299 passed786 skipped0 failed