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

Use meshio to write a XDMF output #6

Open
tianyikillua opened this issue Feb 5, 2020 · 3 comments
Open

Use meshio to write a XDMF output #6

tianyikillua opened this issue Feb 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@tianyikillua
Copy link

I suppose

p = FRDParser.Parse(self.file_name)

contains mesh nodes / elements as well as fields defined on nodes / elements. Instead of writing the legacy PVD / VTK files (one file per time step), a more modern format to use is XDMF which supports natively time-steps. Maybe meshio can be used to a generate an easy-to-use XDMF output.

with meshio.xdmf.TimeSeriesWriter(filename) as writer:
    writer.write_points_cells(points, cells)
    for t in [0.0, 0.1, 0.21]:
        writer.write_data(t, point_data={"phi": data})
@tianyikillua tianyikillua changed the title Use meshio to write a XDMF outout Use meshio to write a XDMF output Feb 5, 2020
@imirzov
Copy link
Collaborator

imirzov commented Feb 6, 2020

Yep, I have plans to get acquainted with meshio. But also it's not so difficult to write separate XMF writer. Anyway, thank you for the tip!
To me it's a surprise, that meshio deals not only with meshes, but also with data fields. In this case it would be good to merge/integrate this project with/into meshio. As I can see meshio has no FRD parser.

@tianyikillua
Copy link
Author

That's right...I suppose you could contribute a "read-only" FRD format into meshio...If you need any help please let me know!

@tianyikillua
Copy link
Author

A limitation with current meshio is that the Mesh class doesn't consider properly data fields that vary in time...If you want to propose a FRD reader that parses FRD to a Mesh class that would be tricky for time data. On the other hand, you can use meshio to write a time-series data using its XDMF interface.

@imirzov imirzov added the enhancement New feature or request label Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants