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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lnmmeshio-5.5.0.tar.gz
  • Upload date:
  • Size: 622.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for lnmmeshio-5.5.0.tar.gz
Algorithm Hash digest
SHA256 8f955daeb2e61a54266add9a6dec27c748c3f2efee2d850ba8290271c0a090bb
MD5 083dac38db3b21feace23b6f0313c72a
BLAKE2b-256 b5129ce9640aca15e19f449baceaac9703e0089faf2e8eaa5940a11835686e2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lnmmeshio-5.5.0-py3-none-any.whl
  • Upload date:
  • Size: 44.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for lnmmeshio-5.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 404824150fbd6cb267f5f73548a99ba130f7c2607d57f41abfe1e8570a55b538
MD5 7d9167995d6b3430c8b764395b102b26
BLAKE2b-256 6042a80b70597566e1ea527384c206c1c9c94c16c56223a427cbae5f3b5471ad

See more details on using hashes here.

Supported by

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