Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ jobs:
--extra-index-url https://download.pytorch.org/whl/cpu \
"$(echo ./firedrake-repo/dist/firedrake-*.tar.gz)[ci]"

pip install --force-reinstall git+https://github.com/firedrakeproject/ufl.git@connorjward/dag-traverser-ufl2unicode

firedrake-clean
pip list

Expand Down
6 changes: 2 additions & 4 deletions firedrake/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
from ufl.core.ufl_type import UFLType
from ufl.corealg.multifunction import MultiFunction
from ufl.formatting.ufl2unicode import (
Expression2UnicodeHandler, UC, subscript_number, PrecedenceRules,
colorama,
Expression2UnicodeHandler, UC, subscript_number, colorama,
)
from functools import cached_property
from ufl.utils.counted import Counted
Expand Down Expand Up @@ -192,7 +191,7 @@ def _unicode_format_firedrake_constant(self, o):


# This monkey patches ufl2unicode support for Firedrake constants
Expression2UnicodeHandler.firedrake_constant = _unicode_format_firedrake_constant
Expression2UnicodeHandler.process.register(Constant, _unicode_format_firedrake_constant)

# This is internally done in UFL by the ufl_type decorator, but we cannot
# do the same here, because we want to use the class name Constant
Expand All @@ -209,4 +208,3 @@ def _unicode_format_firedrake_constant(self, o):

# These caches need rebuilding for the new type to be registered
MultiFunction._handlers_cache = {}
ufl.formatting.ufl2unicode._precrules = PrecedenceRules()
Loading