diff --git a/ufl/algorithms/__init__.py b/ufl/algorithms/__init__.py index 43eac078f..a2ca0ebb7 100644 --- a/ufl/algorithms/__init__.py +++ b/ufl/algorithms/__init__.py @@ -39,7 +39,6 @@ "replace_terminal_data", "post_traversal", "change_to_reference_grad", - "expand_compounds", "validate_form", "FormSplitter", "extract_arguments", @@ -71,7 +70,6 @@ from ufl.algorithms.checks import validate_form from ufl.algorithms.compute_form_data import compute_form_data, preprocess_form from ufl.algorithms.estimate_degrees import estimate_total_polynomial_degree -from ufl.algorithms.expand_compounds import expand_compounds from ufl.algorithms.expand_indices import expand_indices from ufl.algorithms.formfiles import load_forms, load_ufl_file, read_ufl_file from ufl.algorithms.formsplitter import FormSplitter diff --git a/ufl/algorithms/expand_compounds.py b/ufl/algorithms/expand_compounds.py deleted file mode 100644 index 0f2bc9d14..000000000 --- a/ufl/algorithms/expand_compounds.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Algorithm for expanding compound expressions into equivalent representations.""" - -# Copyright (C) 2008-2016 Martin Sandve Alnæs and Anders Logg -# -# This file is part of UFL (https://www.fenicsproject.org) -# -# SPDX-License-Identifier: LGPL-3.0-or-later -# -# Modified by Anders Logg, 2009-2010 - -import warnings - -from ufl.algorithms.apply_algebra_lowering import apply_algebra_lowering - - -def expand_compounds(e): - """Expand compounds.""" - warnings.warn( - "The use of expand_compounds is deprecated and will be removed after December 2023. " - "Please, use apply_algebra_lowering directly instead", - FutureWarning, - ) - - return apply_algebra_lowering(e) diff --git a/ufl/compound_expressions.py b/ufl/compound_expressions.py index 5eedfdedf..840397caa 100644 --- a/ufl/compound_expressions.py +++ b/ufl/compound_expressions.py @@ -7,7 +7,6 @@ # # Modified by Anders Logg, 2009-2010 -import warnings from ufl.constantvalue import Zero, zero from ufl.core.multiindex import Index, indices @@ -113,20 +112,6 @@ def determinant_expr_2x2(B): return _det_2x2(B, 0, 1, 0, 1) -def old_determinant_expr_3x3(A): - """Determinant of a 3 by 3 matrix.""" - warnings.warn( - "The use of old_determinant_expr_3x3 is deprecated and will be removed " - "after December 2023. Please, use determinant_expr_3x3 instead", - FutureWarning, - ) - return ( - A[0, 0] * _det_2x2(A, 1, 2, 1, 2) - + A[0, 1] * _det_2x2(A, 1, 2, 2, 0) - + A[0, 2] * _det_2x2(A, 1, 2, 0, 1) - ) - - def determinant_expr_3x3(A): """Determinant of a 3 by 3 matrix.""" return codeterminant_expr_nxn(A, [0, 1, 2], [0, 1, 2]) diff --git a/ufl/domain.py b/ufl/domain.py index 50ee64d61..1b5544475 100644 --- a/ufl/domain.py +++ b/ufl/domain.py @@ -7,7 +7,6 @@ # SPDX-License-Identifier: LGPL-3.0-or-later import numbers -import warnings from ufl.cell import AbstractCell from ufl.core.ufl_id import attach_ufl_id @@ -220,36 +219,8 @@ def join_domains(domains): gdims.add(domain.geometric_dimension()) if len(gdims) != 1: raise ValueError("Found domains with different geometric dimensions.") - (gdim,) = gdims - - # Split into legacy and modern style domains - legacy_domains = [] - modern_domains = [] - for domain in domains: - if isinstance(domain, Mesh) and domain.ufl_id() < 0: - assert domain.ufl_cargo() is None - legacy_domains.append(domain) - else: - modern_domains.append(domain) - - # Handle legacy domains checking - if legacy_domains: - warnings.warn( - "The use of Legacy domains will be deprecated by December 2023. " - "Please, use FunctionSpace instead", - DeprecationWarning, - ) - if modern_domains: - raise ValueError( - "Found both a new-style domain and a legacy default domain. " - "These should not be used interchangeably. To find the legacy " - "domain, note that it is automatically created from a cell so " - "look for constructors taking a cell." - ) - return tuple(legacy_domains) - # Handle modern domains checking (assuming correct by construction) - return tuple(modern_domains) + return domains # TODO: Move these to an analysis module?