-
Notifications
You must be signed in to change notification settings - Fork 33
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
Using push! to create MeshCell vector raises a MethodError. #133
Comments
For completeness I ran your julia> test1()
ERROR: MethodError: no method matching vtk_grid(::String, ::Vector{SVector{3, Float64}}, ::Vector{Any})
Closest candidates are:
vtk_grid(::AbstractString, ::AbstractVector{T}, ::AbstractVector{T}, ::AbstractVector{T}; kwargs...) where T
@ WriteVTK ~/.julia/dev/WriteVTK/src/gridtypes/structured/rectilinear.jl:57
vtk_grid(::AbstractString, ::AbstractVector{T}, ::AbstractVector{T}, ::AbstractVector{<:VTKBase.AbstractMeshCell}, ::Any...; kwargs...) where T
@ WriteVTK ~/.julia/dev/WriteVTK/src/gridtypes/unstructured/unstructured.jl:213
vtk_grid(::AbstractString, ::AbstractVector{T}, ::AbstractVector{T}, ::AbstractVector{T}, ::AbstractVector{<:VTKBase.AbstractMeshCell}, ::Any...; kwargs...) where T
@ WriteVTK ~/.julia/dev/WriteVTK/src/gridtypes/unstructured/unstructured.jl:201
... The issue is that, in For example, in your For now, in polys = MeshCell{PolyData.Polys, NTuple{4, Int64}}[] I agree this is not very convenient, and it would be nice to have a friendlier way of creating an empty vector of cells. |
Thank you for your excellent and prompt reply. EDIT: I found that |
Isn't it strange that in this code, the function
test1()
raises MethodError, buttest2()
works normally? I would expect them to do the same thing.The text was updated successfully, but these errors were encountered: