Skip to content

VTXWriter check unique names - #4034

Merged
schnellerhase merged 4 commits into
mainfrom
schnellerhase/vtx-names-unique
Jan 5, 2026
Merged

VTXWriter check unique names#4034
schnellerhase merged 4 commits into
mainfrom
schnellerhase/vtx-names-unique

Conversation

@schnellerhase

@schnellerhase schnellerhase commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Following MWE previously failed on read in Paraview not on output, due to duplicate function name f.

from pathlib import Path

import dolfinx
from mpi4py import MPI

comm = MPI.COMM_WORLD

mesh = dolfinx.mesh.create_unit_square(comm, 10, 10)

V = dolfinx.fem.functionspace(mesh, ("P", 1))
f = dolfinx.fem.Function(V, name="f")

W = dolfinx.fem.functionspace(mesh, ("P", 1, (3, )))
g = dolfinx.fem.Function(W, name="f")

with dolfinx.io.VTXWriter(comm, f"{Path(__file__).stem}_output_test.bp", [f, g]) as writer:
    writer.write(0.0)

ADIOS2 requires unique names - https://adios2.readthedocs.io/en/latest/api_full/api_full.html#_CPPv4I0EN6adios22IO16InquireAttributeE9AttributeI1TERKNSt6stringERKNSt6stringEKNSt6stringE.
This adds a check to the name extraction. Also removes raw pointer logic.

@schnellerhase
schnellerhase marked this pull request as ready for review January 5, 2026 13:21
@schnellerhase
schnellerhase added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit afec7b1 Jan 5, 2026
18 of 19 checks passed
@schnellerhase
schnellerhase deleted the schnellerhase/vtx-names-unique branch January 5, 2026 14:32
@schnellerhase schnellerhase mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants