diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f1d86945d..7d0847457 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -50,7 +50,7 @@ jobs: - name: Build sdist and wheel run: python -m build . - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/* @@ -59,7 +59,7 @@ jobs: needs: [build] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifact path: dist diff --git a/.github/workflows/fenicsx-tests.yml b/.github/workflows/fenicsx-tests.yml index 6a8856e47..6363a55bf 100644 --- a/.github/workflows/fenicsx-tests.yml +++ b/.github/workflows/fenicsx-tests.yml @@ -18,9 +18,9 @@ jobs: PETSC_ARCH: linux-gnu-real-64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: 3.9 diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 032bec747..e6f23ec0b 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -20,12 +20,12 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Lint with flake8 @@ -53,7 +53,7 @@ jobs: make html - name: Upload documentation artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: doc-${{ matrix.os }}-${{ matrix.python-version }} path: doc/sphinx/build/html/ @@ -62,7 +62,7 @@ jobs: - name: Checkout FEniCS/docs if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: "FEniCS/docs" path: "docs" diff --git a/pyproject.toml b/pyproject.toml index 9617fef89..468cd0a10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,8 @@ build-backend = "setuptools.build_meta" [project] name = "fenics-ufl" version = "2023.3.0.dev0" -authors = [{email="fenics-dev@googlegroups.com"}, {name="FEniCS Project"}] -maintainers = [{email="fenics-dev@googlegroups.com"}, {name="FEniCS Project Steering Council"}] +authors = [{name="UFL contributors"}] +maintainers = [{email="fenics-steering-council@googlegroups.com"}, {name="FEniCS Steering Council"}] description = "Unified Form Language" readme = "README.rst" license = {file = "COPYING.lesser"} diff --git a/ufl/action.py b/ufl/action.py index 1887da201..2401e05ea 100644 --- a/ufl/action.py +++ b/ufl/action.py @@ -7,6 +7,8 @@ # # Modified by Nacime Bouziani, 2021-2022. +from itertools import chain + from ufl.algebra import Sum from ufl.argument import Argument, Coargument from ufl.coefficient import BaseCoefficient, Coefficient, Cofunction @@ -16,7 +18,6 @@ from ufl.differentiation import CoefficientDerivative from ufl.form import BaseForm, Form, FormSum, ZeroBaseForm from ufl.matrix import Matrix -from itertools import chain # --- The Action class represents the action of a numerical object that needs # to be computed at assembly time --- diff --git a/ufl/functionspace.py b/ufl/functionspace.py index 17de9d1a8..756c16aa0 100644 --- a/ufl/functionspace.py +++ b/ufl/functionspace.py @@ -36,7 +36,7 @@ def ufl_sub_spaces(self): class BaseFunctionSpace(AbstractFunctionSpace, UFLObject): """Base function space.""" - def __init__(self, domain, element): + def __init__(self, domain, element, label=""): """Initialise.""" if domain is None: # DOLFIN hack @@ -50,11 +50,15 @@ def __init__(self, domain, element): else: if element.cell != domain_cell: raise ValueError("Non-matching cell of finite element and domain.") - AbstractFunctionSpace.__init__(self) + self._label = label self._ufl_domain = domain self._ufl_element = element + def label(self): + """Return label of boundary domains to differentiate restricted and unrestricted.""" + return self._label + def ufl_sub_spaces(self): """Return ufl sub spaces.""" return () @@ -88,7 +92,7 @@ def _ufl_hash_data_(self, name=None): edata = None else: edata = element._ufl_hash_data_() - return (name, ddata, edata) + return (name, ddata, edata, self.label()) def _ufl_signature_data_(self, renumbering, name=None): """UFL signature data.""" @@ -103,7 +107,7 @@ def _ufl_signature_data_(self, renumbering, name=None): edata = None else: edata = element._ufl_signature_data_() - return (name, ddata, edata) + return (name, ddata, edata, self.label()) def __repr__(self): """Representation.""" @@ -118,7 +122,7 @@ class FunctionSpace(BaseFunctionSpace, UFLObject): def dual(self): """Get the dual of the space.""" - return DualSpace(self._ufl_domain, self._ufl_element) + return DualSpace(self._ufl_domain, self._ufl_element, label=self.label()) def _ufl_hash_data_(self): """UFL hash data.""" @@ -143,13 +147,13 @@ class DualSpace(BaseFunctionSpace, UFLObject): _primal = False _dual = True - def __init__(self, domain, element): + def __init__(self, domain, element, label=""): """Initialise.""" - BaseFunctionSpace.__init__(self, domain, element) + BaseFunctionSpace.__init__(self, domain, element, label) def dual(self): """Get the dual of the space.""" - return FunctionSpace(self._ufl_domain, self._ufl_element) + return FunctionSpace(self._ufl_domain, self._ufl_element, label=self.label()) def _ufl_hash_data_(self): """UFL hash data.""" diff --git a/ufl/operators.py b/ufl/operators.py index 9dc5add03..78226d8a1 100644 --- a/ufl/operators.py +++ b/ufl/operators.py @@ -693,7 +693,7 @@ def exterior_derivative(f): except Exception: raise ValueError(f"Unable to determine element from {f}") - gdim = element.cell().geometric_dimension() + gdim = element.cell.geometric_dimension() space = element.sobolev_space if space == sobolevspace.L2: