Ferrite-FEM / Ferrite.jl

Finite element toolbox for Julia
https://ferrite-fem.github.io
Other
328 stars 85 forks source link

VTKExporter #828

Open KnutAM opened 8 months ago

KnutAM commented 8 months ago

As suggested by @fredrikekre on Slack during the discussions about #692, this issue contains the notes for one potential way this could be implemented on top of #692

Having a type that can cache the transformation to the vtk data structures makes sense to avoid having to redo this each time step when using a VTKFileCollection.

Furthermore, this could then be customized to contain the special mappings required for e.g. discontinuous interpolations (xref) and user customizations (perhaps for, e.g., IGA/Embedded, @lijas?).

For example, we could have

struct VTKFile{VTK<:WriteVTK.VTKFile, VTKExp<:VTKExporter}
    vtk::VTK
    vtk_exporter::VTKExp
end
termi-official commented 8 months ago

Related to this we might also want to check out if we want to do some kine of VTKImporter, which can e.g. help for post-processingin Julia.

fredrikekre commented 1 week ago

Done in #692.

KnutAM commented 1 week ago

Some developments towards this in #867 for one case, but I would keep this open to remind that it might make sense to have the buffer general there (to support also other types of discontinuous interpolations / cases. (But to be done after 1.0!)

KnutAM commented 1 week ago

See also https://github.com/lijas/IGA.jl/pull/11, seems like having a "vtk_exporter" field would allow re-using VTKFile there, and dispatch some methods on VTKFile{<:Any, IGAExporter}, such that users could call VTKFile in both cases (Maybe type-params in VTKFile should be switched to simplify this...