Skip to content

OpenHeartDevelopers/pycemrg-meshing

Repository files navigation

pycemrg-meshing

Python wrapper for the meshtools3d C++ binaries. Lets Python users:

  1. Author meshtools3d parameter files programmatically.
  2. Fetch versioned binaries automatically from the meshtools3d GitHub Releases.
  3. Run meshtools3d and laplace_solver with structured output handling.

Built on top of pycemrg (CommandRunner, ModelManager).

Status: v0.1 in development. API may shift before the first tagged release.

Install

pip install pycemrg-meshing

Quick start

from pycemrg_meshing import MeshingParameters, MeshtoolsRunner

params = MeshingParameters()
params.set("meshing", "facet_size", 0.5)
params.set("output", "outdir", "/data/case01/mesh")
params.save("heart.par")

runner = MeshtoolsRunner()           # binary fetched via ModelManager
runner.run("heart.par")

CLI

pycemrg-meshing init-par [-o PATH]
pycemrg-meshing run     PARFILE [--binary PATH] [--cwd D]
pycemrg-meshing laplace PARFILE [--binary PATH] [--cwd D]

macOS users

On Apple Silicon the prebuilt binaries are unsigned, so macOS SIGKILLs them (zsh: killed) and the automatic download path stops with a MacOSGatekeeperError. The preferred workflow is to install meshtools3d manually, ad-hoc sign it once, and pass the path explicitly:

pycemrg-meshing run heart.par --binary /path/to/meshtools3d

See docs/macos_gatekeeper.md for the signing commands and details.

License

MIT.

About

Meshing functionalities from the pycemrg suite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors