Skip to main content

Fix missing IPOBO records in SERAFIN (.slf) mesh files generated by q4ts

Project description

fix-slf-mesh-ot

Fix missing IPOBO (boundary node index) records in SERAFIN (.slf) mesh files generated by q4ts. Patches the binary file in-place by reading boundary node numbers from a .cli file.

Installation

pip install fix-slf-mesh-ot

Usage

fix-slf-mesh-ot mesh.slf boundary.cli

How it works

  1. find_ipobo_offset — Parses the SERAFIN binary format (tries big/little endian) to locate the IPOBO record offset. Walks the header: title → variable count → variable names → params → geometry (NELEM, NPOIN, NDP) → IKLE → IPOBO position.
  2. fix_ipobo — Reads the .cli file to build a boundary-node-to-index mapping, then writes the IPOBO array at the found offset via a temp file + os.replace.

The SERAFIN format uses Fortran-style records (4-byte length prefix/suffix around each data block).

License

MIT

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

fix_slf_mesh_ot-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

fix_slf_mesh_ot-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file fix_slf_mesh_ot-0.1.0.tar.gz.

File metadata

  • Download URL: fix_slf_mesh_ot-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fix_slf_mesh_ot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8be79559a6d4486fca589a77db80ad5c06a37d99640bd610ed71895bf9eff8f
MD5 f7ffad815898abb837fe2c87c5ca934f
BLAKE2b-256 651158399ea33203aeebb8671759c5d4e79da0093917da2b079d8ad6c8e33b9c

See more details on using hashes here.

File details

Details for the file fix_slf_mesh_ot-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fix_slf_mesh_ot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43df7c9e22ee6af4becdc562a536b94288b4eacc8580ad675fc42b8f8d78da17
MD5 ff66dc4d7ba79cdb3549d5def71a29db
BLAKE2b-256 406e2a38da4dd2e8ff58d058c80c0051bbd8bf24dd53bd5678287375747ea96e

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