Skip to content

Commit 1f1be3e

Browse files
authored
gem: disable making temporaries for VariableIndexs (#4658)
1 parent 908002c commit 1f1be3e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/firedrake/regression/test_integral_hex.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import numpy as np
23
from firedrake import *
34
from os.path import abspath, dirname, join
45

@@ -92,3 +93,17 @@ def test_integral_hex_interior_facet_facet_avg():
9293
assert abs(A - 1. / 20.) < 1.e-14
9394
EA = assemble(e * a * dS)
9495
assert abs(EA - E * A) < 1.e-14
96+
97+
98+
def test_integral_hex_interior_facet_issue4653():
99+
mesh = BoxMesh(2, 1, 1, 2., 1., 1., hexahedral=True)
100+
V = FunctionSpace(mesh, "DQ", 1)
101+
u = TrialFunction(V)
102+
v = TestFunction(V)
103+
a0 = inner(u('+'), v('+')) * dS
104+
a1 = inner(u('+'), dot(grad(v)('-'), as_vector([1, 2, 3]))) * dS
105+
a = a0 + a1
106+
A0 = assemble(a0)
107+
A1 = assemble(a1)
108+
A = assemble(a)
109+
assert np.allclose(A.M.values, A0.M.values + A1.M.values)

0 commit comments

Comments
 (0)