Skip to content

Commit

Permalink
temp testing file
Browse files Browse the repository at this point in the history
  • Loading branch information
indiamai committed Jan 20, 2025
1 parent ff9764e commit 6710bd1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/firedrake/regression/test_fuse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from test_helmholtz import helmholtz
from test_poisson_strong_bcs import run_test
import pytest
import numpy as np



@pytest.mark.parametrize(['params', 'degree', 'quadrilateral'],

Check failure on line 8 in tests/firedrake/regression/test_fuse.py

View workflow job for this annotation

GitHub Actions / Run linter

E303

tests/firedrake/regression/test_fuse.py:8:1: E303 too many blank lines (3)
[(p, d, q)
for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}]
for d in (1, 2, 3)
for q in [False, True]])
def test_poisson_analytic(params, degree, quadrilateral):
assert (run_test(2, degree, parameters=params, quadrilateral=False) < 1.e-9)

def test_helmholtz():

Check failure on line 16 in tests/firedrake/regression/test_fuse.py

View workflow job for this annotation

GitHub Actions / Run linter

E302

tests/firedrake/regression/test_fuse.py:16:1: E302 expected 2 blank lines, found 1
diff = np.array([helmholtz(i)[0] for i in range(3, 6)])
print("l2 error norms:", diff)
conv = np.log2(diff[:-1] / diff[1:])
print("convergence order:", conv)
assert (np.array(conv) > 2.8).all()

Check failure on line 21 in tests/firedrake/regression/test_fuse.py

View workflow job for this annotation

GitHub Actions / Run linter

W292

tests/firedrake/regression/test_fuse.py:21:40: W292 no newline at end of file

0 comments on commit 6710bd1

Please sign in to comment.