Skip to content

VTK export broken #36

Description

@termi-official

This fails

using FerriteInterfaceElements

    grid = generate_grid(Quadrilateral, (10,10))
    addcellset!(grid, "Pacemaker", x->norm(x,Inf) ≤ 0.5)
    addcellset!(grid, "Myocardium", setdiff(OrderedSet(1:getncells(grid)), getcellset(grid, "Pacemaker")))
    grid2 = insert_interfaces(grid, ["Pacemaker", "Myocardium"])

    VTKGridFile("debug.vtu", grid2) do vtk
    end
ERROR: MethodError: no method matching cell_to_vtkcell(::Type{InterfaceCell{RefQuadrilateral, Line, 4}})
The function `cell_to_vtkcell` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  cell_to_vtkcell(::Type{SerendipityQuadraticHexahedron})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:90
  cell_to_vtkcell(::Type{Tetrahedron})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:92
  cell_to_vtkcell(::Type{Line})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:80
  ...

Stacktrace:
 [1] create_vtk_griddata(grid::Grid{2, Union{Quadrilateral, InterfaceCell{RefQuadrilateral, Line, 4}}, Float64})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:132
 [2] #create_vtk_grid#316
   @ ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:146 [inlined]
 [3] create_vtk_grid
   @ ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:142 [inlined]
 [4] #VTKGridFile#314
   @ ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:45 [inlined]
 [5] VTKGridFile(filename::String, grid::Grid{2, Union{Quadrilateral, InterfaceCell{RefQuadrilateral, Line, 4}}, Float64})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:44
 [6] VTKGridFile(::var"#50#51", ::String, ::Vararg{Any}; kwargs::@Kwargs{})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:50
 [7] VTKGridFile(::Function, ::String, ::Vararg{Any})
   @ Ferrite ~/.julia/packages/Ferrite/pNZMB/src/Export/VTK.jl:49
 [8] top-level scope
   @ REPL[53]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions