Installation instructions

  1. This extension requires gmsh to be installed as a dynamic library. Download the source code of the latest stable release of gmsh from https://gitlab.onelab.info/gmsh/gmsh/-/releases.

  2. Build gmsh from source with the dynamic build flag turned on:

    cd build
    cmake -DENABLE_BUILD_DYNAMIC=1 ..
    make
    make install
    
  3. In apigenerator/generate.py, set the correct version of gmsh that you have downloaded by modifying line 7:

    api_version = "gmsh_4_12_2" # For example
    
  4. Run the file:

    python generate.py
    
  5. Navigate to morpho-gmsh

  6. Build the extension by running the following:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make install
    
  7. Add the extension path to ~/.morphopackages:

    cd ..
    pwd >> ~/.morphopackages
    
  8. Try out the test example

    cd examples
    morpho6 testgmshapi.morpho