Skip to main content

block_diag_ilu is a C++ implementation of an incomplete LU factorization, ILU(0).

Project description

Build status

block_diag_ilu is an open source C++ single header-file implementation of an incomplete LU decomposition routine suitable for diagonally dominant (square) block diagonal matrices with sub- and super diagonals of small magnitude. It is useful for preconditioning linear systems. The use-case in mind is for integrating discretized PDEs of mixed chemical kinetics / diffusion problems where the diffusion process may be accurately considered a mild perturbation.

A picture is worth a thousand words, so if your matrix looks anything like this:

Diagonally dominant block diagonal matrix with sub- and super-diagonals

then its LU decomposition then looks like this:

LU decomposition of same matrix

then block_diag_ilu should be able to save quite a bit of time when solving linear systems approximately, e.g. for preconditioning.

Conditional compilation

The following macros affect the compilation:

Macro name

Action (when defined)

Default

NDEBUG

use std::unique_ptr instead of std::vector as underlying data structure.

undefined

BLOCK_DIAG_ILUT_WITH_OPENMP

factorize blocks in parallel. Set the environment variable BLOCK_DIAG_ILU_NUM_THREADS to control number of threads.

undefined

setup.py will set these when envinronment variables with those are set to “1”.

License

The source code is Open Source and is released under the very permissive “simplified (2-clause) BSD license”. See LICENSE.txt for further details.

Contributors are welcome to suggest improvements at https://github.com/chemreac/block_diag_ilu

Author

Björn Dahlgren, contact:
  • gmail adress: bjodah

  • kth.se adress: bda

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

block_diag_ilu-0.4.2.tar.gz (95.8 kB view details)

Uploaded Source

File details

Details for the file block_diag_ilu-0.4.2.tar.gz.

File metadata

  • Download URL: block_diag_ilu-0.4.2.tar.gz
  • Upload date:
  • Size: 95.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.5.2

File hashes

Hashes for block_diag_ilu-0.4.2.tar.gz
Algorithm Hash digest
SHA256 b7af50f9b93a42265ada98e1e72e9d9b3f8230db73cf066e03e1529c61dc29a5
MD5 c0a8bf05baabfb1728fe851500abb0ba
BLAKE2b-256 e676fd3b6ac2f27c35bf80784202ba94dcd0f5135d6093d6f246456da52c4ef0

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