-
-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Consider the following code (Firedrake syntax, but the issue is UFL):
from firedrake import *
m = UnitIntervalMesh(2)
V = FunctionSpace(m, "CG", 1)
ca = Coargument(V.dual(), 0)ca is really the identity operator in ca. Note:
In [10]: adjoint(ca)
Out[10]: Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x106be17f0>, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 0)), 0, None)
In [12]: adjoint(2*ca)
Out[12]: FormSum([2*Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x106be17f0>, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 0)), 0, None)])
In effect, the adjoint of ca is treated as an unknown Function in V but the adjoint of a scalar multiple of ca is treated as a form in