Skip to content

Commit

Permalink
Complex dual interpolation test, xfail due to issue #3955
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmaddison committed Jan 9, 2025
1 parent f244d31 commit 787083b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/firedrake/regression/test_interp_dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import numpy as np
from firedrake import *
from firedrake.__future__ import *
from firedrake.utils import complex_mode
import ufl


Expand Down Expand Up @@ -42,14 +43,19 @@ def test_interp_self(V1):


def test_assemble_interp_adjoint_tensor(mesh, V1, f1):
x, y = SpatialCoordinate(mesh)
f2 = Function(V1, name="f2").interpolate(exp(x) * y)
if complex_mode:
f1 = f1 * (1 + 1.j)
f2 *= (2 + 2.j)
# Due to issue #3955
pytest.xfail()

a = assemble(conj(TestFunction(V1)) * dx)
# We want tensor to be a dependency of the input expression for this test
assemble(action(adjoint(Interpolate(f1 * TestFunction(V1), V1)), a),
tensor=a)

x, y = SpatialCoordinate(mesh)
f2 = Function(V1, name="f2").interpolate(
exp(x) * y)

assert np.allclose(assemble(a(f2)), assemble(Function(V1).interpolate(conj(f1 * f2)) * dx))

Check failure on line 60 in tests/firedrake/regression/test_interp_dual.py

View workflow job for this annotation

GitHub Actions / Run linter

E303

tests/firedrake/regression/test_interp_dual.py:60:5: E303 too many blank lines (2)

Expand Down

0 comments on commit 787083b

Please sign in to comment.