Skip to content

Commit

Permalink
Merge pull request #65 from antoine-levitt/gmsh
Browse files Browse the repository at this point in the history
overload DiscreteModelFromFile
  • Loading branch information
fverdugo authored Dec 6, 2022
2 parents 069744c + 322ed9b commit 727db90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/GmshDiscreteModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -828,3 +828,7 @@ end
function GmshDiscreteModel(parts::Nothing, args...;kwargs...)
GmshDiscreteModel(args...;kwargs...)
end

function Gridap.DiscreteModelFromFile(filename::AbstractString,::Val{:msh})
GmshDiscreteModel(filename)
end
1 change: 1 addition & 0 deletions src/GridapGmsh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module GridapGmsh

using Libdl

using Gridap
using Gridap.Helpers
using Gridap.Arrays
using Gridap.TensorValues
Expand Down
2 changes: 2 additions & 0 deletions test/GmshDiscreteModelsTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ uh = solve(op)
mshfile = joinpath(@__DIR__,"full_periodic.msh")
model = GmshDiscreteModel(mshfile)
test_discrete_model(model)
model2 = Gridap.DiscreteModelFromFile(mshfile)
test_discrete_model(model2)

end # module

0 comments on commit 727db90

Please sign in to comment.