Skip to main content

CI github pages codecov

Laplace-Dirichlet Rule-Based (LDRB) algorithm for assigning myocardial fiber orientations

A software for assigning myocardial fiber orientations based on the Laplace Dirichlet Ruled-Based algorithm.

Bayer, J.D., Blake, R.C., Plank, G. and Trayanova, N.A., 2012. A novel rule-based algorithm for assigning myocardial fiber orientation to computational heart models. Annals of biomedical engineering, 40(10), pp.2243-2254.(https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518842/)

# Decide on the angles you want to use
angles = dict(
    alpha_endo_lv=30,  # Fiber angle on the LV endocardium
    alpha_epi_lv=-30,  # Fiber angle on the LV epicardium
    beta_endo_lv=0,  # Sheet angle on the LV endocardium
    beta_epi_lv=0,  # Sheet angle on the LV epicardium
    alpha_endo_sept=60,  # Fiber angle on the Septum endocardium
    alpha_epi_sept=-60,  # Fiber angle on the Septum epicardium
    beta_endo_sept=0,  # Sheet angle on the Septum endocardium
    beta_epi_sept=0,  # Sheet angle on the Septum epicardium
    alpha_endo_rv=80,  # Fiber angle on the RV endocardium
    alpha_epi_rv=-80,  # Fiber angle on the RV epicardium
    beta_endo_rv=0,  # Sheet angle on the RV endocardium
    beta_epi_rv=0,  # Sheet angle on the RV epicardium
)

# Choose space for the fiber fields
# This is a string on the form {family}_{degree}
fiber_space = "P_2"

# Compute the microstructure
fiber, sheet, sheet_normal = ldrb.dolfin_ldrb(
    mesh=mesh, fiber_space=fiber_space, ffun=ffun, markers=markers, **angles
)
# Store files using a built in xdmf viewer that also works for functions
# defined in quadrature spaces
ldrb.fiber_to_xdmf(fiber, "fiber")
# And visualize it in Paraview

_

Installation

Install with pip

In order to install the software you need to have installed FEniCS (versions older than 2016 are not supported)

The package can be installed with pip.

python -m pip install ldrb

or if you need the most recent version you can install the source

python -m pip install git+https://github.com/finsberg/ldrb.git

Documentation

Documentation is hosted at http://finsberg.github.io/ldrb

Getting started

Check out the demos

License

ldrb is licensed under the GNU LGPL, version 3 or (at your option) any later version. ldrb is Copyright (2011-2019) by the authors and Simula Research Laboratory.

Contributors

Henrik Finsberg (henriknf@simula.no)

Metadata

Release files for ldrb 2023.2.0

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

Source distribution (sdist)

Source distribution for ldrb 2023.2.0
File Size Uploaded
ldrb-2023.2.0.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ldrb 2023.2.0
File Interpreter ABI Platform
ldrb-2023.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / ldrb-2023.2.0.tar.gz

Download URL ldrb-2023.2.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
83d993abc44f9cec20d87c6286e7c6a6f9a05f05a37760fb973441735670c14f
BLAKE2b-256 checksum
How to use checksums
960f9443cc87b925b02c5a30f4948bd6f7049969dea1f708eea6e89df368fdc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / ldrb-2023.2.0-py3-none-any.whl

Download URL ldrb-2023.2.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44af67bdbf19f2a3f17c4a089dbbf47d92daaacac61ee27f7efed1072e170b07
BLAKE2b-256 checksum
How to use checksums
195582af83ec2e9a2a308b3dc9e9780bfa429d45873050dea9e2839cc633c4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8
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