Skip to main content

FEniCSx-Warp

fenicsx-warp is a specialized Python library designed for robust volumetric mesh generation of cardiac geometries using Template Warping.

Traditional mesh generation for Statistical Shape Models (SSMs) often fails at extreme PCA modes due to surface self-intersections. This library solves that problem by taking a high-quality template mesh (the mean shape) and mathematically warping it to target geometries using partial differential equations (PDEs) in FEniCSx.

Install

python3 -m pip install fenicsx-warp

Quick Start

See example in the documentation.

Solver options and convergence

warp_mesh(..., petsc_options={...}) passes PETSc options to the solver: the Newton solver (SNES) of the hyperelastic warp, or the linear solver (KSP) of the Laplace warp. Global PETSc options with the prefix warp_hyperelastic_ or warp_laplace_ are read as well. If the solver does not converge, warp_mesh raises warp.ConvergenceError and leaves the mesh unchanged.

import warp

try:
    warp.warp_mesh(mesh, points_mean, points_target,
                   petsc_options={"ksp_type": "preonly", "pc_type": "lu"})
except warp.ConvergenceError as e:
    print(e)  # e.g. "SNES (warp_hyperelastic_) did not converge: DIVERGED_LINE_SEARCH (-6) ..."

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for fenicsx-warp 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fenicsx-warp 0.2.1
File Size Uploaded Provenance Actions
fenicsx_warp-0.2.1.tar.gz 9.5 kB With provenance Details for fenicsx_warp-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fenicsx-warp 0.2.1
File Interpreter ABI Platform Actions
fenicsx_warp-0.2.1-py3-none-any.whl Python 3 none any Details for fenicsx_warp-0.2.1-py3-none-any.whl

Total release size: 17.6 kB

Release files / fenicsx_warp-0.2.1.tar.gz

Download URL fenicsx_warp-0.2.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5b9604e4a2d2c59365a4836590725b63f5c9aba79b7b0129db990caa9343b53f
BLAKE2b-256 checksum
How to use checksums
3edbc4b5ca0cf74e94ba88018852359c0384973a060539adcd0a94669c46ec41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / fenicsx_warp-0.2.1-py3-none-any.whl

Download URL fenicsx_warp-0.2.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d6a7b11b04f9b9f67cdb40b97ac27eb3b0a86cdde0445ed80cb1095953692bd
BLAKE2b-256 checksum
How to use checksums
c045a2a59fa1708cde08327052a1877d660ad8813eaf1abb39e2cc4f0efcc205
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for fenicsx-warp 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fenicsx_warp-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page