Skip to content

Commit

Permalink
Merge branch 'main' into mscroggs/remove-print
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs authored Feb 19, 2024
2 parents 17e1e0f + 284d028 commit e484a90
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 71 deletions.
2 changes: 0 additions & 2 deletions ufl/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"replace_terminal_data",
"post_traversal",
"change_to_reference_grad",
"expand_compounds",
"validate_form",
"FormSplitter",
"extract_arguments",
Expand Down Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions ufl/algorithms/expand_compounds.py

This file was deleted.

15 changes: 0 additions & 15 deletions ufl/compound_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down
31 changes: 1 addition & 30 deletions ufl/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit e484a90

Please sign in to comment.