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.
Previously only
Functions
were passed to theTransferManagers
by the firedrake multigrid code. Now sometimesCofunctions
are passed. However, we usedufl.domain.extract_unique_domain
in theManifoldTransferManager
to get the mesh, which doesn't work with aCofunction
.This PR changes the
ManifoldTransferManager
to just grab themesh
off thefunction_space
instead, which works for bothFunction
andCofunction
. It also tidies up the code inManifoldTransferManager
a bit.