-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Describe the bug
When extracting a 2D submesh from a 3D mesh via fd.Submesh(mesh3d, 2, tag), the boundary facets of the resulting submesh correspond to edges of the parent 3D mesh. However, Firedrake only propagates "Face Sets" labels to the submesh's exterior facet markers — "Edge Sets" are ignored entirely.
This means submesh.exterior_facets.unique_markers is missing the edge-based boundary markers, making it impossible to apply boundary conditions on the submesh without manually copying "Edge Sets" into "Face Sets" on the parent mesh before calling Submesh.
Actual: The edge-based markers are missing.
Current workaround: Before calling fd.Submesh, copy "Edge Sets" into "Face Sets" on the parent mesh via DMPlex label manipulation (shown in the MFE).
Steps to Reproduce
The attached MFE (firedrake_submesh_edge_sets_mfe.py + submesh_edge_sets_mfe.msh) demonstrates this on a unit cube with:
A tagged face at z=0 (Face Set 100)
Two tagged edges on that face (Edge Sets 1 and 2)
python firedrake_submesh_edge_sets_mfe.py
Expected behavior
submesh.exterior_facets.unique_markers is [1, 2, 100].
Error message
No error, but the face sets are incorrectly read, submesh.exterior_facets.unique_markers is only [100].
Environment:
- OS: MacOs, Linux
- Python version: 3.11.14
- Output of
pip list:
alabaster 1.0.0
annotated-types 0.7.0
asttokens 3.0.1
attrs 25.4.0
babel 2.18.0
cachetools 7.0.0
cattrs 25.2.0
certifi 2026.1.4
cfgv 3.5.0
cgen 2025.1
charset-normalizer 3.4.4
checkpoint_schedules 1.0.4
click 8.2.1
codepy 2025.1
colorama 0.4.6
constantdict 2025.3
contourpy 1.3.3
coverage 7.12.0
cycler 0.12.1
Cython 3.1.3
decorator 4.4.2
defusedxml 0.7.1
deptry 0.24.0
distlib 0.4.0
docutils 0.21.2
execnet 2.1.2
executing 2.2.1
fenics-ufl 2025.2.1
filelock 3.20.3
firedrake 2025.10.2
firedrake-fiat 2025.10.1
flexcache 0.3
flexparser 0.4
fonttools 4.61.1
genpy 2022.1
gitdb 4.0.12
GitPython 3.1.41
gmsh 4.11.1
grimp 3.14
h5py 3.15.0
identify 2.6.16
idna 3.11
ImageHash 4.3.1
ImageIO 2.37.2
imagesize 1.4.1
immutabledict 4.2.2
import-linter 2.9
iniconfig 2.3.0
ipython 9.10.0
ipython_pygments_lexers 1.1.1
islpy 2026.1
jedi 0.19.2
Jinja2 3.1.6
kiwisolver 1.4.9
lazy_loader 0.4
libsupermesh 2025.4
loopy 2025.2
Mako 1.3.10
markdown-it-py 4.0.0
MarkupSafe 3.0.3
matplotlib 3.10.8
matplotlib-inline 0.2.1
mdurl 0.1.2
memory-profiler 0.61.0
meshio 5.3.5
mistune 3.2.0
mpi-pytest 2025.7
mpi4py 4.1.1
mpmath 1.3.0
mypy 1.18.2
mypy_extensions 1.1.0
networkx 3.6.1
nodeenv 1.10.0
numexpr 2.14.1
numpy 2.2.3
opencv-contrib-python 4.13.0.90
opencv-python 4.13.0.90
packaging 26.0
parso 0.8.5
pathspec 1.0.4
petsc4py 3.24.0
petsctools 2025.3
pexpect 4.9.0
pillow 11.3.0
Pint 0.25
pip 25.3
pkgconfig 1.5.5
platformdirs 4.5.1
pluggy 1.6.0
pre_commit 4.2.0
progress 1.6.1
prompt_toolkit 3.0.52
psutil 7.2.1
ptyprocess 0.7.0
pure_eval 0.2.3
pyadjoint-ad 2025.10.1
pycparser 3.0
pydantic 2.12.5
pydantic_core 2.41.5
Pygments 2.19.2
pymbolic 2025.1
pyparsing 3.3.2
pytest 8.4.2
pytest-cov 7.0.0
pytest-proceed 0.1.5
pytest-split 0.10.0
pytest-timeout 2.3.1
pytest-xdist 3.7.0
python-dateutil 2.9.0.post0
pytools 2025.2.5
PyWavelets 1.9.0
PyYAML 6.0.3
rdp 0.8
recursivenodes 0.2.0
requests 2.32.5
requirements-parser 0.13.0
rich 14.2.0
rtree 1.4.1
ruff 0.12.1
scikit-image 0.26.0
scipy 1.16.3
setuptools 80.10.1
setuptools-scm 9.2.2
shapely 2.1.1
siphash24 1.8
six 1.17.0
slepc4py 3.24.0
smmap 5.0.2
snowballstemmer 3.0.1
sortedcontainers 2.4.0
Sphinx 8.0.2
sphinx-autodoc-typehints 2.5.0
sphinx-click 6.2.0
sphinx_mdinclude 0.6.2
sphinx_rtd_theme 3.1.0
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 2.0.0
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-mermaid 1.0.0
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
SQLAlchemy 2.0.46
sqlmodel 0.0.22
stack-data 0.6.3
symengine 0.14.1
sympy 1.14.0
tifffile 2026.1.28
traitlets 5.14.3
types-Pillow 10.2.0.20240822
typing_extensions 4.15.0
typing-inspection 0.4.2
urllib3 2.6.3
virtualenv 20.36.1
vtk 9.4.1
wcwidth 0.5.3
yamllint 1.37.0
- Any relevant environment variables or modifications [eg: PYOP2_DEBUG=1]
Additional Info
Add any other context about the problem here.