Skip to content

Commit 7499ea0

Browse files
authored
Merge pull request #2494 from firedrakeproject/sv/fix-gusto
Sv/fix gusto
2 parents 8dd1343 + a4dca8c commit 7499ea0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

firedrake/slate/static_condensation/la_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def condense_and_forward_eliminate(A, b, elim_fields, prefix, pc):
4646
raise ValueError("Left-hand operator must be a Slate Tensor")
4747

4848
# Ensures field indices are in increasing order
49+
id_0, id_1 = elim_fields[0], elim_fields[-1]
4950
elim_fields = list(as_tuple(elim_fields))
5051
elim_fields.sort()
5152

@@ -73,8 +74,6 @@ def condense_and_forward_eliminate(A, b, elim_fields, prefix, pc):
7374
# where subscript `e` denotes the coupling with fields
7475
# that will be eliminated, and `f` denotes the condensed
7576
# fields.
76-
id_0 = e_idx0
77-
id_1 = e_idx1
7877
outer_id_0 = slice(e_idx0, e_idx1 + 1)
7978
outer_id_1 = slice(f_idx0, f_idx1 + 1)
8079
Aff = _A[outer_id_1, outer_id_1]

tests/slate/test_variational_prb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from itertools import product
55

66

7-
@pytest.mark.parametrize(('degree', 'nested'), list(product([1, 2], [True, False])))
8-
def test_lvp_equiv_hdg(degree, nested):
7+
@pytest.mark.parametrize(('degree', 'nested', 'elimination'), list(product([1, 2], [True, False], ['0,1', '1,0'])))
8+
def test_lvp_equiv_hdg(degree, nested, elimination):
99
"""Runs an HDG problem and checks that passing
1010
a Slate-defined problem into a variational problem
1111
produces the same result for the traces as solving
@@ -47,7 +47,7 @@ def test_lvp_equiv_hdg(degree, nested):
4747
'ksp_type': 'preonly',
4848
'pc_type': 'python',
4949
'pc_python_type': 'firedrake.SCPC',
50-
'pc_sc_eliminate_fields': '0, 1',
50+
'pc_sc_eliminate_fields': elimination,
5151
'condensed_field': {'ksp_type': 'preonly',
5252
'pc_type': 'lu',
5353
'pc_factor_mat_solver_type': 'mumps',

0 commit comments

Comments
 (0)