From 38bf268f01152968a3431a81888a34d323388932 Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Mon, 16 Dec 2024 16:10:25 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Pablo Brubeck --- firedrake/formmanipulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firedrake/formmanipulation.py b/firedrake/formmanipulation.py index 3bbb8d35ed..14cbf216dd 100644 --- a/firedrake/formmanipulation.py +++ b/firedrake/formmanipulation.py @@ -154,7 +154,7 @@ def cofunction(self, o): # on a two-form then we return a zero form, # analogously to the off components of arguments. if len(self.blocks) == 2: - itest, itrial = self.blocks[0], self.blocks[1] + itest, itrial = self.blocks on_diag = (itest == itrial) else: on_diag = True @@ -174,7 +174,7 @@ def cofunction(self, o): from firedrake import MixedFunctionSpace from pyop2 import MixedDat W = MixedFunctionSpace([V_is[i] for i in indices]) - c = Cofunction(W.dual(), val=MixedDat(o.subfunctions[i].dat + c = Cofunction(W.dual(), val=MixedDat(o.dat[i] for i in indices)) else: c = ZeroBaseForm(o.arguments())