Skip to content

Commit 85a05f3

Browse files
committed
remove_indices
1 parent 7c2be84 commit 85a05f3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

firedrake/formmanipulation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from ufl import as_vector
66
from ufl.classes import Zero, FixedIndex, ListTensor
77
from ufl.algorithms.map_integrands import map_integrand_dags
8+
from ufl.algorithms.apply_coefficient_split import remove_component_and_list_tensors
89
from ufl.corealg.map_dag import MultiFunction, map_expr_dags
910

1011
from firedrake.petsc import PETSc
1112
from firedrake.ufl_expr import Argument
12-
from tsfc.ufl_utils import remove_indices
1313

1414

1515
class ExtractSubBlock(MultiFunction):
@@ -170,8 +170,8 @@ def split_form(form, diagonal=False, do_simplify=True):
170170
assert len(shape) == 2
171171
for idx in numpy.ndindex(shape):
172172
f = splitter.split(form, idx)
173-
if do_simplify:
174-
f = remove_indices(f)
173+
#if do_simplify:
174+
# f = remove_component_and_list_tensors(f)
175175
if len(f.integrals()) > 0:
176176
if diagonal:
177177
i, j = idx

firedrake/tsfc_interface.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ def compile_form(form, name, parameters=None, split=True, dont_split=None, diago
238238

239239
kernels = []
240240
numbering = form.terminal_numbering()
241-
all_meshes_in_form = extract_domains(form)
241+
all_meshes = extract_domains(form)
242242
if split:
243-
iterable = split_form(form, diagonal=diagonal)
243+
iterable = split_form(form, diagonal=diagonal, do_simplify=(len(all_meshes) > 1))
244244
else:
245245
nargs = len(form.arguments())
246246
if diagonal:
@@ -256,8 +256,8 @@ def compile_form(form, name, parameters=None, split=True, dont_split=None, diago
256256
continue
257257
# Map local domain/coefficient/constant numbers (as seen inside the
258258
# compiler) to the global coefficient/constant numbers
259-
all_meshes_in_subform = extract_domains(f)
260-
domain_number_map = tuple(all_meshes_in_form.index(m) for m in all_meshes_in_subform)
259+
meshes = extract_domains(f)
260+
domain_number_map = tuple(all_meshes.index(m) for m in meshes)
261261
coefficient_numbers = tuple(
262262
numbering[c] for c in f.coefficients()
263263
)

0 commit comments

Comments
 (0)