Propag source code excerpts

extracellular potentials on a model of the human
              ventricles, computed by propag
Propag is the central piece in a large software base that is sometimes referred to as "the Montreal heart model." It is a highly configurable reaction-diffusion model for cardiac propagation that can run either in monodomain or bidomain mode. Propag is used most often for simulations with a human-heart model, but it has been used for simulations ranging from single-cell to a two-billion-node bidomain. Since 2002, I have worked so much on this software that more than 80% of the code is now mine. However, some programs that are part of the model are more than 30 years old. Some of these have developed so much that their original authors wouldn't recognize them; others are very close to their initial versions. This kind of software is not suitable to give away, so I do not make compilable source code available online. However, some parts of source code, documented with the cweb system are available here.

memory.pdf contains the code for memory allocation, which is quite an issue in a large, experimental, parallelized program.

status.pdf contains the code for saving and loading checkpoint files ("status dumps"). These files are written at regular intervals by the program and are used to continue a simulation if it is stopped unexpectedly. This happens relatively often in this kind of software, because it typically runs for hours or days, and on bleeding-edge hardware that breaks more often than mainstream computers. Checkpoint files can also be useful to start several simulations from a common starting point, or to interrupt a simulation and continue with different parameter settings. A useful example is switching between monodomain and bidomain mode. Checkpointing safely and efficiently on a parallel computer requires some extra attention, as you may see in this document.

bernus.pdf is our implementation of the membrane model by Bernus et al, AJP-H 282:H2296-2308, 2002. It uses Rush-Larsen integration for gating variables, and tabulates some of the computationally expensive functions that are involved.

bicgstab.pdf implements parallel BiCGStab, BiCGStab-p, QMRCGStab, QMRCGStab-2, and CG solvers. The code is only slightly dependent on other parts of the program. The algorithm contains some novelties, such as restarting and constraining of the residuals to avoid divergence when solving very large models without grounding. (Grounding very large bidomain models is somewhat like immobilizing a grizzly by holding its ear - it hurts a lot but it won't immobilize very well).

further reading

Introduction: about propag

Features: details of the model

Research: model applications and development

Date: 2009/06/10 19:14:04