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

Test fiat #404 #2738

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build Firedrake
run: |
cd ..
./firedrake/scripts/firedrake-install $COMPLEX --venv-name build --tinyasm --disable-ssh --minimal-petsc --slepc --documentation-dependencies --install thetis --install gusto --install icepack --install irksome --install femlium --no-package-manager || (cat firedrake-install.log && /bin/false)
./firedrake/scripts/firedrake-install $COMPLEX --venv-name build --tinyasm --disable-ssh --minimal-petsc --slepc --documentation-dependencies --install thetis --install gusto --install icepack --install irksome --install femlium --no-package-manager --package-branch fiat ReubenHill/point-locate || (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
run: |
. ../build/bin/activate
Expand Down
4 changes: 2 additions & 2 deletions firedrake/pointquery_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from os import path
import numpy
import sympy
from sympy.printing.c import ccode

from pyop2 import op2
from pyop2.parloop import generate_single_cell_wrapper
Expand Down Expand Up @@ -65,8 +66,7 @@ def is_affine(ufl_element):
def inside_check(fiat_cell, eps, X="X"):
dim = fiat_cell.get_spatial_dimension()
point = tuple(sympy.Symbol("PetscRealPart(%s[%d])" % (X, i)) for i in range(dim))

return " && ".join("(%s)" % arg for arg in fiat_cell.contains_point(point, epsilon=eps).args)
return ccode(fiat_cell.contains_point(point, epsilon=eps))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hell yes. This is much better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll stick it in its own PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



def compute_celldist(fiat_cell, X="X", celldist="celldist"):
Expand Down