gmshparser is a lightweight and well-tested package that aims to reliably parse the Gmsh ascii file format (.msh). The package does not introduce any external dependencies and thus fits well with the needs of your own FEM research code.
Project description
gmshparser - parse Gmsh .msh file format
Package author: Jukka Aho (@ahojukka5)
Gmshparser is a small Python package which aims to do only one thing: parse Gmsh mesh file format. Package does not have any external dependencies to other packages and it aims to be a simple stand-alone solution for a common problem: how to import mesh to your favourite research FEM code?
Project documentation is located at: https://gmshparser.readthedocs.io/
Installing package
Using pip:
pip install gmshparser
Usage
To read mesh into Mesh
object, use command parse
:
>>> import gmshparser
>>> mesh = gmshparser.parse("data/testmesh.msh")
>>> print(mesh)
Output is
Mesh name: data/testmesh.msh
Mesh version: 4.1
Number of nodes: 6
Minimum node tag: 1
Maximum node tag: 6
Number of node entities: 1
Number of elements: 2
Minimum element tag: 1
Maximum element tag: 2
Number of element entities: 1
For further information on how to access nodes, elements, physical groups etc. look the documentation.
Contributing to project
Like in other open source projects, contributions are always welcome to this too! If you have some great ideas how to make this package better, feature requests etc., you can open an issue on gmshparser's issue tracker or contact me (ahojukka5 at gmail.com) directly.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gmshparser-0.1.2.tar.gz
.
File metadata
- Download URL: gmshparser-0.1.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9306b841e080a962152ca94f19cf7608069a66084a6129e5c5c976b29858da6 |
|
MD5 | 07aa46cd7d8d99b5ff639a5ee9aec771 |
|
BLAKE2b-256 | f34fa58cc72d40d05e7d3292348fdbd221bf94f2bd5551bfcce8f1740946341d |
File details
Details for the file gmshparser-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: gmshparser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a666864d383ee6c83e686240a4c219ab2eb68037dedc37a7b2a3e0cd09d8b3f4 |
|
MD5 | 6d27f7a3a54a6884664fc461bfd7727c |
|
BLAKE2b-256 | 0a4505f5e9a3990a3b440cb7506b4da19e6f76b281f27ccc4f4e8b07625b2b7e |