GmshTools.jl
Install
(v1.6) pkg> add GmshTools
Use Existed Library
using Pkg
julia> ENV["GMSHROOT"] = "/opt/gmsh"; # here is your root directory of Gmsh SDK
julia> Pkg.build("GmshTools")
SDK Version
Please check gmsh_jll for the SDK version automatically downloaded.
Basic Usage
using GmshTools
gmsh.initialize()
gmsh.finalize()
@gmsh_do begin
# automatically handle initialize and finalize
end
@gmsh_open msh_file begin
gmsh.model.getDimension()
# any gmsh API here ...
end
@gmsh_do begin
@addPoint begin
x1, y1, z1, mesh_size_1, point_tag_1
x2, y2, z2, mesh_size_2, point_tag_2
...
end
@addLine begin
point_tag_1, point_tag_2, line_tag_1
point_tag_2, point_tag_3, line_tag_2
...
end
@setTransfiniteCurve begin
line_tag_1, num_points_1, Algorithm_1, coefficient_1
line_tag_2, num_points_2, Algorithm_2, coefficient_2
...
end
@addField FieldTag FieldName begin
name_1, value_1
name_2, value_2
...
# all added to `FieldTag` field
end
@addOption begin
name_1, value_1
name_2, value_2
...
end
# more gmsh APIs ...
end
You may see test files for more concrete examples. More convenient macros will come in the future.
To retrieve various mesh information, please refer the Gmsh Julia API.