Skip to content

Commit d557c20

Browse files
authored
Update to match UFL interface changes (#39)
1 parent 2f5f05f commit d557c20

File tree

5 files changed

+20
-30
lines changed

5 files changed

+20
-30
lines changed

.github/workflows/setup_repos.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ git checkout indiamai/integrate_fuse
1616
git status
1717
python3 -m pip install --break-system-packages -e .
1818

19-
/usr/bin/git config --global --add safe.directory ~
20-
cd ~
21-
git clone https://github.com/firedrakeproject/ufl.git
22-
/usr/bin/git config --global --add safe.directory ~/ufl
23-
cd ufl
24-
git fetch
25-
git checkout indiamai/integrate-fuse
26-
git status
27-
python3 -m pip install --break-system-packages -e .
19+
#/usr/bin/git config --global --add safe.directory ~
20+
#cd ~
21+
#git clone https://github.com/firedrakeproject/ufl.git
22+
#/usr/bin/git config --global --add safe.directory ~/ufl
23+
#cd ufl
24+
#git fetch
25+
#git checkout indiamai/integrate-fuse
26+
#git status
27+
#python3 -m pip install --break-system-packages -e .

.github/workflows/test.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
# Run on the Github hosted runner
1515
runs-on: ubuntu-latest
1616
container:
17-
image: firedrakeproject/firedrake-vanilla-default:latest
17+
#image: firedrakeproject/firedrake-vanilla-default:latest
18+
image: firedrakeproject/firedrake-vanilla-default:dev-main
1819
# Steps represent a sequence of tasks that will be executed as
1920
# part of the jobs
2021
steps:
@@ -44,17 +45,6 @@ jobs:
4445
git checkout indiamai/integrate_fuse
4546
git status
4647
python3 -m pip install --break-system-packages -e .
47-
- name: Checkout correct UFL branch
48-
run: |
49-
/usr/bin/git config --global --add safe.directory ~
50-
cd ~
51-
git clone https://github.com/firedrakeproject/ufl.git
52-
/usr/bin/git config --global --add safe.directory ~/ufl
53-
cd ufl
54-
git fetch
55-
git checkout indiamai/integrate-fuse
56-
git status
57-
python3 -m pip install --break-system-packages -e .
5848
- name: Run tests
5949
run: |
6050
pip list
@@ -104,4 +94,4 @@ jobs:
10494
message: ${{ env.total }}%
10595
minColorRange: 50
10696
maxColorRange: 90
107-
valColorRange: ${{ env.total }}
97+
valColorRange: ${{ env.total }}

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ lint:
1919

2020
test_examples:
2121
@echo " Running examples"
22-
@python3 -m pytest test/test_2d_examples_docs.py
23-
@python3 -m pytest test/test_3d_examples_docs.py
22+
@FIREDRAKE_USE_FUSE=1 python3 -m pytest test/test_2d_examples_docs.py
23+
@FIREDRAKE_USE_FUSE=1 python3 -m pytest test/test_3d_examples_docs.py
2424

2525
tests:
2626
@echo " Running all tests"
27-
@python3 -m coverage run -p -m pytest -rx test
27+
@FIREDRAKE_USE_FUSE=1 python3 -m coverage run -p -m pytest -rx test
2828

2929
coverage:
3030
@python3 -m coverage combine
@@ -34,13 +34,13 @@ coverage:
3434
test_cells:
3535
@echo " Running all cell comparison tests"
3636
@firedrake-clean
37-
@python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect0]
37+
@FIREDRAKE_USE_FUSE=1 python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect0]
3838
@firedrake-clean
39-
@python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect1]
39+
@FIREDRAKE_USE_FUSE=1 python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect1]
4040

4141
clean:
4242
@(cd docs/ && make clean)
4343

4444
prepush: lint tests
4545
@rm .coverage.*
46-
make clean docs
46+
make clean docs

fuse/cells.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def __init__(self, cell, name=None):
10741074
super(CellComplexToUFL, self).__init__(name)
10751075

10761076
def to_fiat(self):
1077-
return self.cell_complex.to_fiat(name=self.cellname())
1077+
return self.cell_complex.to_fiat(name=self.cellname)
10781078

10791079
def __repr__(self):
10801080
return super(CellComplexToUFL, self).__repr__()

test/test_convert_to_fiat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_helmholtz_3d(elem_gen, elem_code, deg, conv_rate):
470470

471471
def helmholtz_solve(V, mesh):
472472
# Define variational problem
473-
dim = mesh.ufl_cell().topological_dimension()
473+
dim = mesh.ufl_cell().topological_dimension
474474
u = TrialFunction(V)
475475
v = TestFunction(V)
476476
f = Function(V)

0 commit comments

Comments
 (0)