gridap / GridapGmsh.jl

Gmsh generated meshes for Gridap
MIT License
42 stars 19 forks source link

GmshDiscreteModel errors #48

Closed ThomasHaine closed 2 years ago

ThomasHaine commented 2 years ago

Hi Folks,

With the latest release I hit GmshDiscreteModel MethodErrors. E.g., from the README.md:

julia> using Gridap

julia> using GridapGmsh

julia> model = GmshDiscreteModel("demo/demo.msh")
Info    : Reading 'demo/demo.msh'...
Info    : 188 entities
Info    : 10257 nodes
Info    : 41006 elements
Info    : Done reading 'demo/demo.msh'
ERROR: MethodError: no method matching Gridap.Geometry.UnstructuredGrid(::Vector{VectorValue{3, Float64}}, ::Gridap.Arrays.Table{Int64, Vector{Int64}, Vector{Int32}}, ::Vector{Gridap.ReferenceFEs.GenericLagrangianRefFE{Gridap.ReferenceFEs.GradConformity, 3}}, ::Vector{Int8}, ::Gridap.Geometry.Oriented, ::Nothing)
Closest candidates are:
  Gridap.Geometry.UnstructuredGrid(::Array{VectorValue{Dp, Tp}, 1}, ::Gridap.Arrays.Table{Ti, Vd, Vp} where {Vd<:AbstractVector{Ti}, Vp<:(AbstractVector{T} where T)}, ::Vector{var"#s340"} where var"#s340"<:Gridap.ReferenceFEs.LagrangianRefFE{Dc}, ::Vector{T} where T, ::Gridap.Geometry.OrientationStyle) where {Dc, Dp, Tp, Ti} at /Users/thaine1/.julia/packages/Gridap/J87be/src/Geometry/UnstructuredGrids.jl:28
  Gridap.Geometry.UnstructuredGrid(::Array{VectorValue{Dp, Tp}, 1}, ::Gridap.Arrays.Table{Ti, Vd, Vp} where {Vd<:AbstractVector{Ti}, Vp<:(AbstractVector{T} where T)}, ::Vector{var"#s341"} where var"#s341"<:Gridap.ReferenceFEs.LagrangianRefFE{Dc}, ::Vector{T} where T) where {Dc, Dp, Tp, Ti} at /Users/thaine1/.julia/packages/Gridap/J87be/src/Geometry/UnstructuredGrids.jl:28
  Gridap.Geometry.UnstructuredGrid(::AbstractArray{var"#s342", N} where {var"#s342"<:(VectorValue), N}) at /Users/thaine1/.julia/packages/Gridap/J87be/src/Geometry/UnstructuredGrids.jl:144
Stacktrace:
 [1] _setup_grid(gmsh::Module)
   @ GridapGmsh ~/.julia/packages/GridapGmsh/aUVSW/src/GmshDiscreteModels.jl:66
 [2] GmshDiscreteModel(mshfile::String; renumber::Bool)
   @ GridapGmsh ~/.julia/packages/GridapGmsh/aUVSW/src/GmshDiscreteModels.jl:21
 [3] GmshDiscreteModel(mshfile::String)
   @ GridapGmsh ~/.julia/packages/GridapGmsh/aUVSW/src/GmshDiscreteModels.jl:7
 [4] top-level scope
   @ REPL[55]:1
fverdugo commented 2 years ago

Which version of Gridap are you using?

ThomasHaine commented 2 years ago
(@v1.6) pkg> status Gridap
      Status `~/.julia/environments/v1.6/Project.toml`
  [56d4f2e9] Gridap v0.16.5

Thanks for the quick response!

fverdugo commented 2 years ago

With Gridap 0.17 should work

ThomasHaine commented 2 years ago

OK, my package manager won't update to Gridap 0.17 (don't know why). BUT, updating to GridapGmsh 0.4.5 now fixes this issue with Gridap 0.16.5.

fverdugo commented 2 years ago

Yes. 0.4.5 should work with Gridap 0.16.