Skip to main content

Import and export from and to various mesh formats including dat files

Project description

Meshio for BACI

pipeline

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


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.4.tar.gz (627.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lnmmeshio-5.6.4-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

Details for the file lnmmeshio-5.6.4.tar.gz.

File metadata

  • Download URL: lnmmeshio-5.6.4.tar.gz
  • Upload date:
  • Size: 627.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for lnmmeshio-5.6.4.tar.gz
Algorithm Hash digest
SHA256 19cdf302b7b3e2bd07d0aa4f3ed4a381c7cdb2e2cf484648431ebcc2afb1655c
MD5 9f9582671ac18d435a9253f6b8f5a665
BLAKE2b-256 b9170325120df2bfd2308bd4527b07c5b434ba503474ff11d87fd26c7b16c515

See more details on using hashes here.

File details

Details for the file lnmmeshio-5.6.4-py3-none-any.whl.

File metadata

  • Download URL: lnmmeshio-5.6.4-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.23

File hashes

Hashes for lnmmeshio-5.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6aabaaf0d3d907c8c689bb5e3a00508d0f9306e15d3ef3800e373a6cba9200ca
MD5 f6f365801c4eba4b37c82ea8ff9f57d8
BLAKE2b-256 1880344ce92774930d2516b04c532809a85ea7336e07eafb8d83a7ae3d2bc078

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page