Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteVTK: MeshCell not a concrete type #1107

Open
fredrikekre opened this issue Nov 7, 2024 · 0 comments
Open

WriteVTK: MeshCell not a concrete type #1107

fredrikekre opened this issue Nov 7, 2024 · 0 comments

Comments

@fredrikekre
Copy link
Member

fredrikekre commented Nov 7, 2024

For VTK export we allocate the vector of output like this

cls = WriteVTK.MeshCell[]
which, when this code was written, was a concrete type. Since JuliaVTK/WriteVTK.jl@1850714 this isn't the case anymore, and the MeshCell type have changed a couple of times after this commit too. Current definition: https://github.com/JuliaVTK/VTKBase.jl/blob/1f48d195fdf5bf35254228cca4797452c7b94d3d/src/mesh_cells.jl#L55-L66

It looks like it can now stored the node id tuple directly too, meaning we can remove the allocation of a small vector for each cell by removing the call to collect here:

nodes_to_vtkorder(cell::AbstractCell) = collect(cell.nodes)

xref: JuliaVTK/WriteVTK.jl#156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant