diff --git a/.github/workflows/dolfinx-tests.yml b/.github/workflows/dolfinx-tests.yml index 40d428b8e..5c3a1d294 100644 --- a/.github/workflows/dolfinx-tests.yml +++ b/.github/workflows/dolfinx-tests.yml @@ -18,7 +18,7 @@ on: type: string ufl_ref: description: "UFL branch or tag" - default: "main" + default: "dokken/multiple_coordinate_elements" type: string # Weekly build on Mondays at 8 am schedule: @@ -54,7 +54,7 @@ jobs: with: path: ./dolfinx repository: FEniCS/dolfinx - ref: main + ref: mscroggs/ufl_coordinate_elements - name: Get DOLFINx source (specified branch/tag) if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v4 diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index a6a8dd453..0249b110c 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -66,7 +66,7 @@ jobs: - name: Install FEniCS dependencies (Python, Unix) if: runner.os == 'Linux' || runner.os == 'macOS' run: | - pip install git+https://github.com/FEniCS/ufl.git + pip install git+https://github.com/FEniCS/ufl.git@dokken/multiple_coordinate_elements pip install git+https://github.com/FEniCS/basix.git - name: Install FEniCS dependencies (Python, Windows) diff --git a/ffcx/analysis.py b/ffcx/analysis.py index 62e3514c1..53144698e 100644 --- a/ffcx/analysis.py +++ b/ffcx/analysis.py @@ -173,7 +173,7 @@ def _analyze_form( # Check that coordinate element is based on basix.ufl._ElementBase for i in form._integrals: - assert isinstance(i._ufl_domain._ufl_coordinate_element, basix.ufl._ElementBase) + assert isinstance(i._ufl_domain.ufl_coordinate_element(), basix.ufl._ElementBase) # Check for complex mode complex_mode = np.issubdtype(scalar_type, np.complexfloating) diff --git a/ffcx/codegeneration/access.py b/ffcx/codegeneration/access.py index 8138bc86f..48e59c4a9 100644 --- a/ffcx/codegeneration/access.py +++ b/ffcx/codegeneration/access.py @@ -299,7 +299,7 @@ def cell_vertices(self, mt, tabledata, num_points): """Access a cell vertex.""" # Get properties of domain domain = ufl.domain.extract_unique_domain(mt.terminal) - gdim = domain.geometric_dimension() + gdim = domain.geometric_dimension coordinate_element = domain.ufl_coordinate_element() # Get dimension and dofmap of scalar element @@ -324,7 +324,7 @@ def cell_edge_vectors(self, mt, tabledata, num_points): # Get properties of domain domain = ufl.domain.extract_unique_domain(mt.terminal) cellname = domain.ufl_cell().cellname() - gdim = domain.geometric_dimension() + gdim = domain.geometric_dimension coordinate_element = domain.ufl_coordinate_element() if cellname in ("triangle", "tetrahedron", "quadrilateral", "hexahedron"): @@ -364,7 +364,7 @@ def facet_edge_vectors(self, mt, tabledata, num_points): # Get properties of domain domain = ufl.domain.extract_unique_domain(mt.terminal) cellname = domain.ufl_cell().cellname() - gdim = domain.geometric_dimension() + gdim = domain.geometric_dimension coordinate_element = domain.ufl_coordinate_element() if cellname in ("tetrahedron", "hexahedron"): diff --git a/ffcx/codegeneration/symbols.py b/ffcx/codegeneration/symbols.py index c2f94c882..81207d3f6 100644 --- a/ffcx/codegeneration/symbols.py +++ b/ffcx/codegeneration/symbols.py @@ -49,7 +49,7 @@ def format_mt_name(basename, mt): # Format local derivatives if mt.local_derivatives: # Convert "listing" derivative multindex into "counting" representation - gdim = ufl.domain.extract_unique_domain(mt.terminal).geometric_dimension() + gdim = ufl.domain.extract_unique_domain(mt.terminal).geometric_dimension ld_counting = tuple(mt.local_derivatives.count(i) for i in range(gdim)) der = f"_d{''.join(map(str, ld_counting))}" access += der diff --git a/ffcx/ir/analysis/valuenumbering.py b/ffcx/ir/analysis/valuenumbering.py index 512e6070c..2462a174c 100644 --- a/ffcx/ir/analysis/valuenumbering.py +++ b/ffcx/ir/analysis/valuenumbering.py @@ -158,11 +158,11 @@ def _modified_terminal(self, v): assert not (num_ld and num_gd) if num_ld: domain = ufl.domain.extract_unique_domain(mt.terminal) - tdim = domain.topological_dimension() + tdim = domain.ufl_cell().topological_dimension() d_components = ufl.permutation.compute_indices((tdim,) * num_ld) elif num_gd: domain = ufl.domain.extract_unique_domiain(mt.terminal) - gdim = domain.geometric_dimension() + gdim = domain.geometric_dimension d_components = ufl.permutation.compute_indices((gdim,) * num_gd) else: d_components = [()] diff --git a/ffcx/ir/elementtables.py b/ffcx/ir/elementtables.py index 89a18074f..80307aadd 100644 --- a/ffcx/ir/elementtables.py +++ b/ffcx/ir/elementtables.py @@ -254,7 +254,7 @@ def get_modified_terminal_element(mt) -> typing.Optional[ModifiedTerminalElement assert (mt.averaged is None) or not (ld or gd) # Change derivatives format for table lookup - tdim = domain.topological_dimension() + tdim = domain.ufl_cell().topological_dimension() local_derivatives: tuple[int, ...] = tuple(ld.count(i) for i in range(tdim)) return ModifiedTerminalElement(element, mt.averaged, local_derivatives, fc) diff --git a/ffcx/ir/integral.py b/ffcx/ir/integral.py index ddda4179e..ba5ca0fc0 100644 --- a/ffcx/ir/integral.py +++ b/ffcx/ir/integral.py @@ -95,7 +95,7 @@ def compute_integral_ir( # Check if we have a mixed-dimensional integral is_mixed_dim = False for domain in ufl.domain.extract_domains(integrand): - if domain.topological_dimension() != cell.topological_dimension(): + if domain.ufl_cell().topological_dimension() != cell.topological_dimension(): is_mixed_dim = True mt_table_reference = build_optimized_tables( diff --git a/ffcx/ir/representation.py b/ffcx/ir/representation.py index 1bfaa2fff..a77fc9696 100644 --- a/ffcx/ir/representation.py +++ b/ffcx/ir/representation.py @@ -259,7 +259,10 @@ def _compute_integral_ir( ufl_cell = itg_data.domain.ufl_cell() cell_type = basix_cell_from_string(ufl_cell.cellname()) tdim = ufl_cell.topological_dimension() - assert all(tdim == itg.ufl_domain().topological_dimension() for itg in itg_data.integrals) + assert all( + tdim == itg.ufl_domain().ufl_cell().topological_dimension() + for itg in itg_data.integrals + ) expression_ir = { "integral_type": itg_data.integral_type,