I was wondering if there exists similar functionality to PETScDMCollection.create_transfer_matrix in dolfin-x? That is, I need the transfer matrix between two different function spaces.
from dolfinx.fem import Function, FunctionSpace
from dolfinx.mesh import create_unit_square
mesh1 = create_unit_square(MPI.COMM_WORLD, 16, 16, mesh.CellType.triangle)
mesh2 = create_unit_square(MPI.COMM_WORLD, 32, 32, mesh.CellType.triangle)
V1 = FunctionSpace(mesh1, ('DG', 0))
V2 = FunctionSpace(mesh2, ('CG', 1))
f1 = Function(V1)
# This is the functionality I would need from legacy fenics
# A = PETScDMCollection.create_transfer_matrix(V1,V2)