Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dolfinx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ffcx/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions ffcx/codegeneration/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"):
Expand Down Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion ffcx/codegeneration/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ffcx/ir/analysis/valuenumbering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [()]
Expand Down
2 changes: 1 addition & 1 deletion ffcx/ir/elementtables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ffcx/ir/integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion ffcx/ir/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading