{"id":17360985,"url":"https://github.com/gnikit/gmsh-fpm","last_synced_at":"2026-01-06T23:05:45.642Z","repository":{"id":65725696,"uuid":"531922733","full_name":"gnikit/gmsh-fpm","owner":"gnikit","description":"Gmsh API using the Fortran Package Manager (fpm)","archived":false,"fork":false,"pushed_at":"2025-03-20T09:22:12.000Z","size":1032,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T09:33:31.644Z","etag":null,"topics":["finite-element-mesh","fortran","fortran-package-manager","gmsh","mesh","mesh-generation"],"latest_commit_sha":null,"homepage":"https://gmsh.info/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnikit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gnikit"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-09-02T12:46:58.000Z","updated_at":"2025-03-20T09:22:16.000Z","dependencies_parsed_at":"2023-11-27T23:29:43.783Z","dependency_job_id":"70dd8753-2050-49f1-9afe-428462a6abb8","html_url":"https://github.com/gnikit/gmsh-fpm","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Fgmsh-fpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Fgmsh-fpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Fgmsh-fpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Fgmsh-fpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnikit","download_url":"https://codeload.github.com/gnikit/gmsh-fpm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882064,"owners_count":20687825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finite-element-mesh","fortran","fortran-package-manager","gmsh","mesh","mesh-generation"],"created_at":"2024-10-15T19:29:29.176Z","updated_at":"2026-01-06T23:05:40.591Z","avatar_url":"https://github.com/gnikit.png","language":"Fortran","funding_links":["https://github.com/sponsors/gnikit"],"categories":[],"sub_categories":[],"readme":"# gmsh-fpm\n\n![GitHub Release](https://img.shields.io/github/v/release/gnikit/gmsh-fpm?logo=github\u0026label=Release)\n[![Examples](https://github.com/gnikit/gmsh-fpm/actions/workflows/examples.yml/badge.svg)](https://github.com/gnikit/gmsh-fpm/actions/workflows/examples.yml)\n[![Update API](https://github.com/gnikit/gmsh-fpm/actions/workflows/main.yml/badge.svg)](https://github.com/gnikit/gmsh-fpm/actions/workflows/main.yml)\n\nAdds the [Gmsh](https://gmsh.info/) finite element mesh generator library to the\n[Fortran Package Manager (fpm)](https://fpm.fortran-lang.org/en/index.html).\n\n\u003e This repository automatically downloads the Gmsh API every hour from the upstream repo\n\u003e \u003chttps://gitlab.onelab.info/gmsh/gmsh.git\u003e.\n\u003e Releases are automatically authored based on the upstream repository.\n\n## Features\n\nThe repository provides:\n\n- Access to the Fortran F2018 API of Gmsh\n- Examples of how to use the Fortran API\n- A Fortran compiled executable for Gmsh itself\n\n## Usage\n\nTo use `gmsh-fpm` within your fpm project, add the following to your `fpm.toml` file:\n\nPin to a specific version **(Recommended)**:\n\n```toml\n[dependencies]\ngmsh = { git=\"https://github.com/gnikit/gmsh-fpm.git\", tag = \"4.12.2\" }\n```\n\nor live at head:\n\n```toml\n[dependencies]\ngmsh = { git=\"https://github.com/gnikit/gmsh-fpm.git\" }\n```\n\n## Build\n\nTo build the `gmsh` executable and all the examples, run:\n\n```bash\nfpm build --link-flag \"-L/path/to/gmsh/lib\"\n```\n\nor by setting the `FPM_LDFLAGS=-L/path/to/gmsh-sdk/lib` environment variable.\n\nTo run any of the examples or the Gmsh executable itself, you need to add the `lib`\ndirectory to the `LD_LIBRARY_PATH`.\nYou can do that only for `fpm` via:\n\n\u003c!-- ```bash\nexport LD_LIBRARY_PATH=/path/to/gmsh/lib:$LD_LIBRARY_PATH\nfpm run --link-flag \"-L/path/to/gmsh/lib\"\n```\n\nor in a more compact manner --\u003e\n\n```bash\nexport FPM_LDFLAGS=\"-L/path/to/gmsh/lib -Wl,-rpath,/path/to/gmsh/lib\"\nfpm run\n```\n\n### Running the examples\n\nWith `FPM_LDFLAGS` defined as above, normally one can run the examples in the usual way:\n\n```bash\nfpm run --example t1\n```\n\nIf the example requires input files, one will need to change to the\nexample directory and run the executable from there:\n\n```bash\nfpm run --example t13 --runner cp -- example/fortran/; pushd example/fortran/; ./t13; rm t13; popd\n```\n\nFor the fpm feature request that would simplify the above command see Issue\n[#410](https://github.com/fortran-lang/fpm/issues/410).\n\n## Requirements\n\n- `libgmsh.so` or `libgmsh.a`, see [Installing Gmsh](#installing-gmsh)\n- A Fortran compiler with F2018 support, [Compiler](#compiler) section\n\n### Installing Gmsh\n\nThis `fpm` package requires `libgmsh` to be already installed on your system.\nYou can download relevant Software Development Kit (SDK) from the [Gmsh website](https://gmsh.info/#Download).\n\n| ❗ Important | Download the same Gmsh SDK version as the one used in `gmsh-fpm` |\n| ------------ | ---------------------------------------------------------------- |\n\nFor building Gmsh from source, instead of downloading an SDK, checkout the Gmsh\n[repository](https://gitlab.onelab.info/gmsh/gmsh) or\n[source distributions](https://gmsh.info/src/) and follow the relevant instructions.\n\n\u003c!--\n#### 1. Download the Software Development Kit (SDK)\n\nThe Gmsh SDK is available for download on the [Gmsh website](https://gmsh.info/#Download).\nOnce downloaded and unzipped, simply include the path to the `lib` directory in\nyour `fpm` command, e.g.:\n\n```bash\nfpm run --link-flag \"-L/path/to/gmsh-sdk/lib\"\n```\n\n#### 2. Compile from source\n\nDownload the latest source code from the [Gmsh website](https://gmsh.info/#Download)\nand unzip it. Then follow the instructions in the `INSTALL` file to compile Gmsh\n\n```bash\ncmake -B build -DENABLE_BUILD_DYNAMIC=1 -DCMAKE_INSTALL_PREFIX=/path/to/gmsh-inst\ncmake --build build --parallel 16\ncmake --install build --config Release\n```\n\n#### 3. Compile from git\n\n```bash\ngit clone https://gitlab.onelab.info/gmsh/gmsh.git\ncd gmsh\ncmake -B build -DENABLE_BUILD_DYNAMIC=1 -DCMAKE_INSTALL_PREFIX=/path/to/gmsh-inst\ncmake --build build --parallel 16\ncmake --install build --config Release\n```\n\n| 📝️ Note | You might need to install [FLTK](https://github.com/fltk/fltk) and [OpenCASCADE](https://dev.opencascade.org/release) to get the full functionality of the library. |\n| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n\n--\u003e\n\n### Compiler\n\nThe API uses `optional` arguments in C interoperable procedures, a feature available\nin the F2018 standard. The following Fortran compilers are known to work:\n\n| Vendor                                                                                        | Compiler       |\n| --------------------------------------------------------------------------------------------- | -------------- |\n| [GNU](https://gcc.gnu.org/wiki/GFortran)                                                      | `gfortran`     |\n| [Intel](https://www.intel.com/content/www/us/en/developer/tools/oneapi/fortran-compiler.html) | `ifort`, `ifx` |\n| [NAG](https://www.nag.com/)                                                                   | `nagfor`       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Fgmsh-fpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnikit%2Fgmsh-fpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Fgmsh-fpm/lists"}