FEniCS/dolfinx

Introduce enum `FileMode` for I/O file mode

开放

#4,366 创建于 2026年8月5日

 (1 条评论) (0 个反应) (0 位负责人)C++ (255 个派生)auto 404
good first issueio

仓库指标

星标
 (1,158 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南