Skip to content
Merged
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/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ runs:
EXTRA_PIP_FLAGS='--no-build-isolation'
elif [ ${{ inputs.base_ref }} = 'release' ]; then
EXTRA_PIP_FLAGS=''
export PIP_BUILD_CONSTRAINT=constraints.txt
else
echo "Unrecognised 'base_ref' input: '${{ inputs.base_ref }}"
exit 1
Expand Down
12 changes: 9 additions & 3 deletions firedrake/supermeshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pathlib
import libsupermesh
import petsctools
import rtree

from firedrake.cython.supermeshimpl import assemble_mixed_mass_matrix as ammm, intersection_finder
from firedrake.mg.utils import get_level
Expand Down Expand Up @@ -462,9 +463,14 @@ def likely(cell_A):

libsupermesh_dir = pathlib.Path(libsupermesh.get_include()).parent.absolute()
dirs = petsctools.get_petsc_dirs() + (libsupermesh_dir,)
includes = ["-I%s/include" % d for d in dirs]
libs = ["-L%s/lib" % d for d in dirs]
libs = libs + ["-Wl,-rpath,%s/lib" % d for d in dirs] + ["-lpetsc", "-lsupermesh"]
includes = [f"-I{d}/include" for d in dirs]
libs = [
*[f"-L{d}/lib" for d in dirs],
*[f"-Wl,-rpath,{d}/lib" for d in dirs],
"-lpetsc",
"-lsupermesh",
str(pathlib.Path(rtree.core.rt._name).absolute()), # libspatialindex.so
]
dll = load(
supermesh_kernel_str, "c",
cppargs=includes,
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ dependencies = [
"firedrake-fiat>=2026.4",
"h5py>3.12.1",
"immutabledict",
"libsupermesh",
# TODO RELEASE
"libsupermesh @ git+https://github.com/firedrakeproject/libsupermesh.git@main",
"loopy>2024.1",
"numpy",
"packaging",
Expand Down Expand Up @@ -152,7 +153,8 @@ docker = [ # Used in firedrake-vanilla container
[build-system]
requires = [
"Cython>=3.0",
"libsupermesh",
# TODO RELEASE
"libsupermesh @ git+https://github.com/firedrakeproject/libsupermesh.git@main",
"mpi4py>3; python_version >= '3.13'",
"mpi4py; python_version < '3.13'",
"numpy",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def extensions():
name="firedrake.cython.supermeshimpl",
language="c",
sources=[os.path.join("firedrake", "cython", "supermeshimpl.pyx")],
**(mpi_ + petsc_ + numpy_ + libsupermesh_)
**(mpi_ + petsc_ + numpy_ + libsupermesh_ + spatialindex_)
))
# pyop2/sparsity.pyx: petsc, numpy,
cython_list.append(Extension(
Expand Down
Loading