JuliaFEM/JuliaFEM.jl

FreeCad med file exports Seg3 and Tri6 elements

TeroFrondelius opened this issue · 1 comments

I am building full Open source example and I used FreeCAD for geometry and because there is meshing I thought why not. The problem is that your option are Calculix inp or Code Aster binary med. This med file have Seg3 and Tri6 elements included, which are not needed in the analysis.

Also the error message could be clearer.

MethodError: no method matching assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{FEMBasis.Seg3},1}, ::Float64, ::Type{Val{:continuum}})
Closest candidates are:
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{El<:Union{FEMBasis.Hex20, FEMBasis.Hex27, FEMBasis.Hex8, FEMBasis.Pyr5, FEMBasis.Tet10, FEMBasis.Tet4, FEMBasis.Wedge15, FEMBasis.Wedge6}},1}, ::Any, ::Type{Val{:continuum}}) where El<:Union{FEMBasis.Hex20, FEMBasis.Hex27, FEMBasis.Hex8, FEMBasis.Pyr5, FEMBasis.Tet10, FEMBasis.Tet4, FEMBasis.Wedge15, FEMBasis.Wedge6} at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity.jl:106
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{El<:Union{FEMBase.Poi1, FEMBasis.Quad4, FEMBasis.Quad8, FEMBasis.Quad9, FEMBasis.Tri3, FEMBasis.Tri6}},1}, ::Any, ::Type{Val{:continuum}}) where El<:Union{FEMBase.Poi1, FEMBasis.Quad4, FEMBasis.Quad8, FEMBasis.Quad9, FEMBasis.Tri3, FEMBasis.Tri6} at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity.jl:350
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Union{Array{FEMBase.Element,1}, Array{FEMBase.Element{T},1}}, ::Any, ::Type{Val{:plane_stress}}) where T at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity_2d.jl:10
  ...

This is because 3d elasticity does not know what to do with Seg3 elements. Maybe we should give warning in this kind of situations instead of throwing an error. At least give a more clear error message.