Skip to content

Commit 1082433

Browse files
committed
More dual space fixes
1 parent 4293ccd commit 1082433

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

firedrake/assemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,10 +1199,10 @@ def allocate(self):
11991199
rank = len(self._form.arguments())
12001200
if rank == 1:
12011201
test, = self._form.arguments()
1202-
return firedrake.Cofunction(test.function_space().dual())
1202+
return firedrake.Function(test.function_space().dual())
12031203
elif rank == 2 and self._diagonal:
12041204
test, _ = self._form.arguments()
1205-
return firedrake.Cofunction(test.function_space().dual())
1205+
return firedrake.Function(test.function_space().dual())
12061206
else:
12071207
raise RuntimeError(f"Not expected: found rank = {rank} and diagonal = {self._diagonal}")
12081208

firedrake/slate/slate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class RemoveNegativeRestrictions(MultiFunction):
6060
"""UFL MultiFunction which removes any negative restrictions
6161
in a form.
6262
"""
63-
expr = MultiFunction.reuse_if_untouched
63+
ufl_type = MultiFunction.reuse_if_untouched
6464

6565
def negative_restricted(self, o):
6666
return Zero(o.ufl_shape, o.ufl_free_indices, o.ufl_index_dimensions)

firedrake/ufl_expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def reconstruct(self, function_space=None,
142142
raise TypeError(f"Expecting an int, not {number}")
143143
if function_space.value_shape != self.function_space().value_shape:
144144
raise ValueError("Cannot reconstruct an Coargument with a different value shape.")
145-
return Coargument(function_space, number, part=part)
145+
return Argument(function_space, number, part=part)
146146

147147
def equals(self, other):
148148
if type(other) is not Coargument:

0 commit comments

Comments
 (0)