Import and export from and to various mesh formats including dat files
Project description
Meshio for BACI
Relies on meshio: https://github.com/nschloe/meshio
Install
You can install the latest version with pip:
pip install lnmmeshio
Documentation
Does only read the discretization and currently completely ignores all other sections.
Read/write a mesh into/from the Discretization class
import lnmmeshio
# tested formats are Exodus, Gmsh and .dat (only the discretization, all other sections are discarded)
dis = lnmmeshio.read('pathtofile.ext')
# do what ever you want with the discretization (like add options to the elements or sth like that)
# iterate over all structural elements
for ele in dis.elements.structure:
# do sth with the element
ele.options["KINEM"] = "nonlinear"
ele.options["MAT"] = 1
# iterate over all nodes
for node in dis.nodes:
# do sth with the node
pass
# iterate over all surface elements with id 0
for ele in dis.get_dsurf_elements(0):
# do sth with this element
pass
# iterate over all surface nodeset nodes with id 0
for node in dis.surfacenodesets[0]:
# do sth with the node
pass
# write discretization into an arbitrary format (.dat, .vtu, ...)
lnmmeshio.write('pathtofile.ext', dis)
See also https://github.com/nschloe/meshio
Make changes and upgrade
- Make your changes and test changes.
- Adapt version number in pyproject.toml
- Create a feature branch (best reference it with corresponding issue)
- Create a merge request from feature branch
- Push changes to Gitlab and wait for the pipeline to pass
- Once the MR is merged, the new version is available in the package repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lnmmeshio-5.6.3.tar.gz
(627.6 kB
view details)
Built Distribution
lnmmeshio-5.6.3-py3-none-any.whl
(44.0 kB
view details)
File details
Details for the file lnmmeshio-5.6.3.tar.gz
.
File metadata
- Download URL: lnmmeshio-5.6.3.tar.gz
- Upload date:
- Size: 627.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4bed02dda2d45a8693936de00863e2eac757953ea0989fc15d3f15b262ade0b1
|
|
MD5 |
3c9cfa8ae7e185f45140c745b77fdb9c
|
|
BLAKE2b-256 |
82cb646623f7f1dd02d09e823ecc247e3c507ce54713a832f9da4fb84f0e6a26
|
File details
Details for the file lnmmeshio-5.6.3-py3-none-any.whl
.
File metadata
- Download URL: lnmmeshio-5.6.3-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ac6288733820f393efacc092d7a2393c8ac5dd72f6ce0f81f8b785e708fe2214
|
|
MD5 |
23521e3605afd7feb5a05327d0a80de0
|
|
BLAKE2b-256 |
b9aa97eee0176bcb8bc43014fe07e02e0123179f7366226dd61da6514bcdfc97
|