firedrakeproject / asQ

A library for implementing ParaDIAG timestepping algorithms using Firedrake
MIT License
4 stars 1 forks source link

Use mesh from `Function`/`Cofunction` instead of `ufl.extract_unique_domain` in `ManifoldTransferManager` #147

Closed JHopeCollins closed 12 months ago

JHopeCollins commented 1 year ago

Previously only Functions were passed to the TransferManagers by the firedrake multigrid code. Now sometimes Cofunctions are passed. However, we used ufl.domain.extract_unique_domain in the ManifoldTransferManager to get the mesh, which doesn't work with a Cofunction.

This PR changes the ManifoldTransferManager to just grab the mesh off the function_space instead, which works for both Function and Cofunction. It also tidies up the code in ManifoldTransferManager a bit.