Skip to content

Rework marking interface to use Vectors - #4476

Open
schnellerhase wants to merge 3 commits into
mainfrom
schnellerhase/fix-marking
Open

Rework marking interface to use Vectors#4476
schnellerhase wants to merge 3 commits into
mainfrom
schnellerhase/fix-marking

Conversation

@schnellerhase

@schnellerhase schnellerhase commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

#4156 missed the handling of ghost entries; caught by @jhale in extending upon PR #4187.

The underlying issue is that marker computation needs to happen on locally owned entities; while the marked entities (output) need to include ghost members. The dolfinx native way to achieve this is to just rely on a vector which carries exactly the infrastructure to differentiate between ghosted and non-ghosted contributions. Also this makes the caller interface simpler; as usually markers are $\mathcal{DG}_0$ functions anyhow.

  • mark_maximum now computes the max over the locally owned entries (no change here, max. is insensitive to duplicates - but delicate for other markers)
  • and returns the marked ghost entities as well
  • tests extended to include non-trivial ghost setups
  • Python wrapper pulled in from Add equidistribution marking #4187

@schnellerhase schnellerhase changed the title Rework marking interface to be rely on Vectors Rework marking interface to use Vectors Sep 5, 2026
@schnellerhase schnellerhase added the enhancement New feature or request label Sep 5, 2026
@schnellerhase schnellerhase self-assigned this Sep 5, 2026
@schnellerhase
schnellerhase force-pushed the schnellerhase/fix-marking branch from 7374302 to 494fe36 Compare September 5, 2026 13:02
import pytest

from dolfinx import mesh
import dolfinx
@schnellerhase
schnellerhase force-pushed the schnellerhase/fix-marking branch from cbc220c to 46092bc Compare September 5, 2026 14:42
@schnellerhase
schnellerhase marked this pull request as ready for review September 5, 2026 14:58
@jhale

jhale commented Sep 7, 2026

Copy link
Copy Markdown
Member

Looks good.

I have a few small suggestions to make, but away from PC until Wednesday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants