Ferrite-FEM/Ferrite.jl

Ability to add prefixes and suffixes to implied names in vtk export

Open

#1,308 opened on Mar 18, 2026

View on GitHub
 (0 comments) (2 reactions) (0 assignees)Julia (109 forks)github user discovery
good first issue

Repository metrics

Stars
 (439 stars)
PR merge metrics
 (PR metrics pending)

Description

Currently, the functions write_solution accepts the arg suffix to append to the field name when exporting. However, write_cellset does not provide this option.

A more consistent way to handle this would be to have

Ferrite.write_solution(vtk, dh, a; prefix = "", suffix = "")
Ferrite.write_cellset(vtk, grid; prefix = "", suffix = "")
Ferrite.write_facetset(vtk, grid; prefix = "", suffix = "")
Ferrite.write_nodeset(vtk, grid; prefix = "", suffix = "")

for all cases. This can be achieved without any breaking API, and IMO the keyword args make this easier to work with than the current suffix arg in write_solution, but that would of course remain supported for backwards compatibility.

This interface would also resolve the discussion here.

Contributor guide