Skip to content

Commit 4609c89

Browse files
committed
compute_form_data: remove do_assume_single_integral_type
1 parent 32fb51d commit 4609c89

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

test/test_mixed_function_space_with_mesh_sequence.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def test_mixed_function_space_with_mesh_sequence_cell():
6868
do_estimate_degrees=True,
6969
do_replace_functions=True,
7070
coefficients_to_split=(f, g),
71-
do_assume_single_integral_type=False,
7271
complex_mode=False,
7372
)
7473
(id0,) = fd.integral_data
@@ -137,7 +136,6 @@ def test_mixed_function_space_with_mesh_sequence_facet():
137136
do_estimate_degrees=True,
138137
do_replace_functions=True,
139138
coefficients_to_split=(f, g),
140-
do_assume_single_integral_type=False,
141139
complex_mode=False,
142140
)
143141
(
@@ -237,7 +235,6 @@ def test_mixed_function_space_with_mesh_sequence_raise():
237235
do_estimate_degrees=True,
238236
do_replace_functions=True,
239237
coefficients_to_split=(f,),
240-
do_assume_single_integral_type=False,
241238
complex_mode=False,
242239
)
243240
assert e_info.match("Found multiple domains, cannot return just one.")
@@ -254,7 +251,6 @@ def test_mixed_function_space_with_mesh_sequence_raise():
254251
do_estimate_degrees=True,
255252
do_replace_functions=True,
256253
coefficients_to_split=(f, g),
257-
do_assume_single_integral_type=False,
258254
complex_mode=False,
259255
)
260256
assert e_info.match("Discontinuous type Coefficient must be restricted.")

ufl/algorithms/compute_form_data.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ def compute_form_data(
262262
do_append_everywhere_integrals=True,
263263
do_replace_functions=False,
264264
coefficients_to_split=None,
265-
do_assume_single_integral_type=True,
266265
complex_mode=False,
267266
do_remove_component_tensors=False,
268267
):
@@ -469,22 +468,11 @@ def compute_form_data(
469468
# Propagate restrictions to terminals
470469
if do_apply_restrictions:
471470
for itg_data in self.integral_data:
472-
if do_assume_single_integral_type: # Conventional case
473-
if not itg_data.integral_type.startswith("interior_facet"):
474-
continue
475471
if do_apply_default_restrictions:
476-
if do_assume_single_integral_type: # Conventional case
477-
domains = set(
478-
domain
479-
for integral in itg_data.integrals
480-
for domain in extract_domains(integral)
481-
)
482-
default_restrictions = {domain: "+" for domain in domains}
483-
else:
484-
default_restrictions = {
485-
domain: default_restriction_map[integral_type]
486-
for domain, integral_type in itg_data.domain_integral_type_map.items()
487-
}
472+
default_restrictions = {
473+
domain: default_restriction_map[integral_type]
474+
for domain, integral_type in itg_data.domain_integral_type_map.items()
475+
}
488476
else:
489477
default_restrictions = None
490478
new_integrals = []

0 commit comments

Comments
 (0)