Ferrite.jl icon indicating copy to clipboard operation
Ferrite.jl copied to clipboard

Save the grids

Open Firimo opened this issue 1 year ago • 5 comments

Is nobody thinking of the grids? TOML can save the grids!

Firimo avatar Jul 19 '24 11:07 Firimo

Is nobody thinking of the grids?

https://github.com/Ferrite-FEM/Ferrite.jl/issues/678#issuecomment-1810739315

Instead of parsing to TOML, then I think @koehlerson's idea of supporting saving to HDF5 should be easier and more efficient.

KnutAM avatar Jul 19 '24 13:07 KnutAM

I personally rather not add a bespoke textual format for this. I don't really see the use case. I find it best to go all out Julia which means using Serializatin stdlib or something standard like HDF5, Arrow, etc.

KristofferC avatar Jul 19 '24 21:07 KristofferC

Yes. All you make good arguments. I could counter them, but that annoys me. Let me just ask you this: Should there not be the option of plain-text?

Firimo avatar Jul 22 '24 07:07 Firimo

Perhaps it could/should live in https://github.com/Ferrite-FEM/FerriteMeshParser.jl?

fredrikekre avatar Jul 22 '24 08:07 fredrikekre

Let me just ask you this: Should there not be the option of plain-text?

From my point of view, I'm not sure what the advantage is of having a plain text format? Especially since you normally don't create the grid using Ferrite, and rather import it from some other format? But I'd be interested to hear your thoughts, maybe I'm missing an important case here?

Perhaps it could/should live in https://github.com/Ferrite-FEM/FerriteMeshParser.jl?

There, I would suggest to follow some existing mesh format in that case.

  • The vtk can be written in ASCII format, so perhaps that would be an easy way to allow reading in VTK by using ReadVTK?
  • I don't think using the Abaqus input file format is nice, since the element codes are not bijective (e.g. CPS3 and CPE3 are both Triangle).
  • Perhaps there are other existing nice plain-text formats to which it could make sense to have a writer and parser?

KnutAM avatar Jul 22 '24 12:07 KnutAM