diff --git a/tests/test_mixed_function_space_with_mixed_mesh.py b/tests/test_mixed_function_space_with_mixed_mesh.py index 1c2824bb..fdcdce7b 100644 --- a/tests/test_mixed_function_space_with_mixed_mesh.py +++ b/tests/test_mixed_function_space_with_mixed_mesh.py @@ -48,7 +48,7 @@ def test_mixed_function_space_with_mixed_mesh_restrictions_base(): assert len(integral_data.domain_integral_type_map) == 2 assert integral_data.domain_integral_type_map[mesh0] == "interior_facet" assert integral_data.domain_integral_type_map[mesh1] == "exterior_facet" - # e + # c form = div(f) * inner(grad(f1), grad(f1)) * inner(grad(u1), grad(v0)) * dx1 form_data = compute_form_data(form, do_split_coefficients={f: [f0_split, f1_split]}) integral_data, = form_data.integral_data @@ -89,7 +89,7 @@ def test_mixed_function_space_with_mixed_mesh_3_cg3_bdm3_dg2_dx1(): assert integral_data.domain_integral_type_map[mesh1] == "cell" assert integral_data.domain_integral_type_map[mesh2] == "cell" kernel, = compile_form(form) - assert kernel.domain_number == 1 + assert kernel.domain_number == 0 assert kernel.integral_type == "cell" assert kernel.subdomain_id == (999, ) assert kernel.active_domain_numbers.coordinates == (0, 1, 2) @@ -199,14 +199,14 @@ def test_mixed_function_space_with_mixed_mesh_restrictions_dg2_dg3_ds1(): assert integral_data.domain_integral_type_map[mesh0] == "interior_facet" assert integral_data.domain_integral_type_map[mesh1] == "exterior_facet" kernel, = compile_form(form) - assert kernel.domain_number == 1 + assert kernel.domain_number == 0 assert kernel.integral_type == "exterior_facet" assert kernel.subdomain_id == (777, ) assert kernel.active_domain_numbers.coordinates == (0, 1) assert kernel.active_domain_numbers.cell_orientations == () assert kernel.active_domain_numbers.cell_sizes == () - assert kernel.active_domain_numbers.exterior_facets == (1, ) - assert kernel.active_domain_numbers.interior_facets == (0, ) + assert kernel.active_domain_numbers.exterior_facets == (0, ) + assert kernel.active_domain_numbers.interior_facets == (1, ) assert kernel.coefficient_numbers == ((0, (0, 1)), ) assert isinstance(kernel.arguments[0], kernel_args.OutputKernelArg) assert isinstance(kernel.arguments[1], kernel_args.CoordinatesKernelArg) @@ -216,8 +216,8 @@ def test_mixed_function_space_with_mixed_mesh_restrictions_dg2_dg3_ds1(): assert isinstance(kernel.arguments[5], kernel_args.ExteriorFacetKernelArg) assert isinstance(kernel.arguments[6], kernel_args.InteriorFacetKernelArg) assert kernel.arguments[0].loopy_arg.shape == (10, 2 * 6) - assert kernel.arguments[1].loopy_arg.shape == (2 * (3 * gdim), ) - assert kernel.arguments[2].loopy_arg.shape == (3 * gdim, ) + assert kernel.arguments[1].loopy_arg.shape == (1 * (3 * gdim), ) + assert kernel.arguments[2].loopy_arg.shape == (2 * (3 * gdim), ) assert kernel.arguments[3].loopy_arg.shape == (2 * 6, ) assert kernel.arguments[4].loopy_arg.shape == (10, ) assert kernel.arguments[5].loopy_arg.shape == (1, ) diff --git a/tsfc/ufl_utils.py b/tsfc/ufl_utils.py index b76b6ef5..637cc490 100644 --- a/tsfc/ufl_utils.py +++ b/tsfc/ufl_utils.py @@ -49,6 +49,7 @@ def compute_form_data(form, do_apply_restrictions=True, do_estimate_degrees=True, do_split_coefficients=None, + do_assume_single_integral_type=False, complex_mode=False): """Preprocess UFL form in a format suitable for TSFC. Return form data. @@ -67,6 +68,7 @@ def compute_form_data(form, do_apply_restrictions=do_apply_restrictions, do_estimate_degrees=do_estimate_degrees, do_split_coefficients=do_split_coefficients, + do_assume_single_integral_type=do_assume_single_integral_type, complex_mode=complex_mode ) constants = extract_firedrake_constants(form)