We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d482b8 commit b97ac1eCopy full SHA for b97ac1e
firedrake/adjoint_utils/function.py
@@ -342,9 +342,10 @@ class CofunctionMixin(FunctionMixin):
342
def _ad_dot(self, other):
343
return firedrake.assemble(firedrake.action(self, other))
344
345
+ @classmethod
346
def _ad_init_object(cls, obj):
347
from firedrake import Cofunction
- return Cofunction(cls.function_space()).assign(obj)
348
+ return Cofunction(obj.function_space()).assign(obj)
349
350
def _ad_init_zero(self, dual=False):
351
from firedrake import Function, Cofunction
0 commit comments