FEniCS/dolfinx

Introduce enum `FileMode` for I/O file mode

Aperta

#4366 aperta il 5 ago 2026

 (1 commento) (0 reazioni) (0 assegnatari)C++ (255 fork)auto 404
good first issueio

Metriche repository

Star
 (1158 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Currently the file mode in which an output file is opened is specified by a string.

with XDMFFile(mesh.comm, filename, "w", encoding=encoding) as file:
        file.write_mesh(mesh)

This should be altered to be enum based and back end independent, ref. https://github.com/FEniCS/dolfinx/pull/4177#discussion_r3608425522.

Guida contributor