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

Move Mesh.save logic to a separate module #291

Closed
kinnala opened this issue Dec 29, 2019 · 4 comments · Fixed by #350
Closed

Move Mesh.save logic to a separate module #291

kinnala opened this issue Dec 29, 2019 · 4 comments · Fixed by #350

Comments

@kinnala
Copy link
Owner

kinnala commented Dec 29, 2019

I think it would make sense to move this logic to skfem.exporters or similar:

def save(self,

Also, there isn't always 1-to-1 mapping with the solution+mesh and their representation in a specific format (such as VTK). Maybe we should make this explicit, i.e. export using a combination of a solution vector and a GlobalBasis object, and make the conversion to a representation such as VTK happen automatically if there will be no loss of information, and display a warning if the conversion required interpolation/projection.

@gdmcbain
Copy link
Contributor

+1 for skfem.exporters though I think we should continue to use meshio where possible and aim to fix or extend it elsewhere. In some cases it's true that different formats aren't isomorphic but often it's meshio that is incomplete. I think we get a multiplier for doing the work there rather than here, where possible; more people using, testing, and reviewing the code, writing extensions, updates, optimizations, &c.

@gdmcbain
Copy link
Contributor

gdmcbain commented Dec 30, 2019

A possible exception to that thinking, which would particularly justify the skfem.exporters package, is for formats which have Python APIs which are eschewed by meshio (to avoid dependence). There might be cases where these offer advantages over meshio (faster, more complete, more authoritative, access to specific functionality beyond mere conversion, e.g. VTK, Gmsh).

@gdmcbain
Copy link
Contributor

gdmcbain commented Jan 3, 2020

A partial lightening of the burden of dependencies incurred with meshio was achieved with the eschewal of the lxml package for writing XDMF in nschloe/meshio#613.

@gdmcbain gdmcbain mentioned this issue Jan 6, 2020
@kinnala
Copy link
Owner Author

kinnala commented Jan 20, 2020

Should be moved to skfem.io after #305 is merged.

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

Successfully merging a pull request may close this issue.

2 participants