BUG: no way to query non-empty boundary segments without generating warnings

Aperta
#5,275 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@connorjward ci sta già lavorando.

Dal 24/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

Thetis and https://github.com/mesh-adaptation/movement/tree/main/movement use mesh.exterior_facets.unique_markers to figure out which boundary markers exist to do some preprocessing for each of those. Since #5005 this list contains all of the original markers with those that "disappear" as a periodic boundary now corresponding to an empty set - where as previously IIRC exterior_facets.unique_markers would only contain the remaining, active markers. In Thetis it hasn't immediately broken anything, because it just computes some integrals over the empty boundary segments - but it does produce quite a few menacing warning messages

firedrake:WARNING Subdomain (np.int32(1),) is empty. This is likely an error. Did you choose the right label?
firedrake:WARNING Subdomain (np.int32(2),) is empty. This is likely an error. Did you choose the right label?
firedrake:WARNING Subdomain (np.int32(3),) is empty. This is likely an error. Did you choose the right label?
firedrake:WARNING Subdomain (np.int32(4),) is empty. This is likely an error. Did you choose the right label?

Would it break anything to leave out the empty/periodic boundary markers from that list? So it would just be [1,2] or [3,4], or [] for a doubly periodic rectangle? Or alternatively, is there/could we have a mechanism to query which ones are empty without triggering warnings? - e.g. even if I do:

  boundary_markers = [bm for bm in mesh.exterior_facets.unique_markers if mesh.exterior_facets.subset(bm).size > 0]

I get the same warning messages triggered by accessing .subset(bm)

Lingua principale
Python
Stelle
684
Fork
204
Merge medio
4g 14h
PR unite (30g)
46

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firedrakeproject/firedrake

Tutte le issue di firedrakeproject/firedrake

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.