Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for 0**{min_value, max_value} #3855

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
--install defcon \
--install gadopt \
--install asQ \
--package-branch tsfc ksagiyam/attach_dtype_to_nodes \
|| (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
run: |
Expand Down
10 changes: 10 additions & 0 deletions tests/regression/test_assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,13 @@ def test_assemble_sparsity_diagonal_entries_for_bc():
A = assemble(inner(u[1], v[0]) * dx, bcs=[bc], mat_type="nest")
# Make sure that diagonals are allocated.
assert np.all(A.M.sparsity[1][1].nnz == np.ones(4, dtype=IntType))


@pytest.mark.skipcomplex
def test_assemble_power_zero_minmax():
mesh = UnitSquareMesh(1, 1)
V = FunctionSpace(mesh, "CG", 1)
f = Function(V).assign(1.)
g = Function(V).assign(2.)
assert assemble(zero()**min_value(f, g) * dx) == 0.0
assert assemble(zero()**max_value(f, g) * dx) == 0.0
Loading