Skip to content

Commit

Permalink
Merge branch 'interp_dual' into external-operator_dualspace
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouziani committed Sep 12, 2023
2 parents e7ecfbe + 54c35ff commit 5032d48
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/fenicsx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
path: ./ffcx
repository: FEniCS/ffcx
ref: dokken/group_integrals_v2
ref: main

- name: Install FFCx
run: |
Expand Down
5 changes: 5 additions & 0 deletions ufl/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
# Modified by Anders Logg, 2008-2009.
# Modified by Massimiliano Leoni, 2016.
# Modified by Cecile Daversin-Catty, 2018.
# Modified by Ignacia Fierro-Piccardo 2023.

import warnings
import numbers

from ufl.core.ufl_type import ufl_type
from ufl.core.terminal import FormArgument
from ufl.split_functions import split
Expand Down Expand Up @@ -44,6 +47,8 @@ def __init__(self, function_space, number, part=None):
element = function_space
domain = default_domain(element.cell())
function_space = FunctionSpace(domain, element)
warnings.warn("The use of FiniteElement as an input to Argument will be deprecated by December 2023. "
"Please, use FunctionSpace instead", FutureWarning)
elif not isinstance(function_space, AbstractFunctionSpace):
raise ValueError("Expecting a FunctionSpace or FiniteElement.")

Expand Down
5 changes: 5 additions & 0 deletions ufl/coefficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# Modified by Anders Logg, 2008-2009.
# Modified by Massimiliano Leoni, 2016.
# Modified by Cecile Daversin-Catty, 2018.
# Modified by Ignacia Fierro-Piccardo 2023.
import warnings

from ufl.core.ufl_type import ufl_type
from ufl.core.terminal import FormArgument
Expand All @@ -23,6 +25,7 @@
from ufl.utils.counted import Counted
from ufl.duals import is_primal, is_dual


# --- The Coefficient class represents a coefficient in a form ---


Expand All @@ -48,6 +51,8 @@ def __init__(self, function_space, count=None):
element = function_space
domain = default_domain(element.cell())
function_space = FunctionSpace(domain, element)
warnings.warn("The use of FiniteElement as an input to Coefficient will be deprecated by December 2023. "
"Please, use FunctionSpace instead", FutureWarning)
elif not isinstance(function_space, AbstractFunctionSpace):
raise ValueError("Expecting a FunctionSpace or FiniteElement.")

Expand Down
3 changes: 3 additions & 0 deletions ufl/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# SPDX-License-Identifier: LGPL-3.0-or-later

import numbers
import warnings

from ufl.cell import AbstractCell, TensorProductCell, as_cell
from ufl.core.ufl_id import attach_ufl_id
Expand Down Expand Up @@ -318,6 +319,8 @@ def join_domains(domains):

# 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. "
Expand Down

0 comments on commit 5032d48

Please sign in to comment.