-
Notifications
You must be signed in to change notification settings - Fork 20
/
GridapGmsh.jl
55 lines (45 loc) · 1.1 KB
/
GridapGmsh.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module GridapGmsh
using Libdl
using Gridap.Arrays
using Gridap.TensorValues
using Gridap.Fields
using Gridap.ReferenceFEs
using Gridap.Geometry
using Gridap.Geometry: max_cells_arround_vertex
using Gridap.Geometry: _fill_cells_around_scratch!
using Gridap.Geometry: _set_intersection!
export GmshDiscreteModel
deps_jl = joinpath(@__DIR__, "..", "deps", "deps.jl")
if !isfile(deps_jl)
s = """
Package GridapGmsh not installed properly.
Run Pkg.build(\"GridapGmsh\"), restart Julia and try again.
"""
error(s)
end
include(deps_jl)
if GMSH_FOUND
include(gmsh_jl)
# Hack taken from MPI.jl
function __init__()
@static if Sys.isunix()
Libdl.dlopen(gmsh.lib, Libdl.RTLD_LAZY | Libdl.RTLD_GLOBAL)
end
end
else
s = """
Gmsh not found in system paths.
Install Gmsh or export path to Gmsh and rebuild the project.
Run Pkg.build(\"GridapGmsh\"), restart Julia and try again.
"""
@warn s
end
macro check_if_loaded()
quote
if ! GMSH_FOUND
error("GridapGmsh is not loaded or installed properly.")
end
end
end
include("GmshDiscreteModels.jl")
end # module