Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.
/ GmshSDK Public archive

Artifact for Gmsh Software Development Kit

License

Notifications You must be signed in to change notification settings

WaveProp/GmshSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GmshSDK.jl

Julia artifacts for Gmsh Software Development Kit

Stable Dev Build Status codecov

Installation

Install from the Pkg REPL:

pkg> add https://github.com/WaveProp/GmshSDK

Usage

This package provides in its Artifacts.toml the information required to download and use the Gmsh Software Development Toolkit, as well as some convenience functions to interface meshes and domains created by Gmsh with solvers in the WaveProp organization.

To simply use the Gmsh API, you can do the following:

using GmshSDK
gmsh.initialize()
# do gmsh-fu
gmsh.finalize()

where gmsh-fu stands for anything described on the official gmsh api manual.

As mentioned, the package also provides some convenience functions for converting meshes and/or domains created in Gmsh to internal representations defined in WavePropBase. An example of such a usage would be:

using GmshSDK, Plots
import WavePropBase as WPB
Ω,M = @gmsh begin
    WPB.clear_entities!()
    gmsh.model.occ.addSphere(0,0,0,1)
    gmsh.model.occ.synchronize()
    gmsh.model.mesh.generate(3)
    Ω = GmshSDK.domain()
    M = GmshSDK.meshgen(Ω)
    return Ω,M
end
Γ = WPB.boundary(Ω) # extract the boundary
plot(view(M,Γ)) # plot the elements of the mesh on Γ

Version and Artifact generation

The version of gmsh used is stored in the GmshSDK.GMSH_VERSION variable. You can also query the Gmsh version through gmsh.GMSH_API_VERSION, gmsh.GMSH.API_VERSION_MAJOR, and gmsh.GMSH_API_VERSION_MINOR. If you need a specific version of Gmsh, you can run scripts/generate_artifacts.jl to create your own Artifacts.toml file locally.

Related packages

If you simply need a wrapper for the Gmsh api, see also:

Issues

Please file an issue if you run into a problem when trying to install this package.

About

Artifact for Gmsh Software Development Kit

Resources

License

Stars

Watchers

Forks

Packages

No packages published