Using the cardiac executable

This page provides examples of how to use the Chaste cardiac executable.

Commands

Downloaded executable

If you have downloaded the executable you can run it with

./Chaste.sh <PATH TO CONFIG FILE>/ChasteParameters.xml

(the script will set up the necessary library paths etc. and then call the Chaste executable). The downloadable executable is specially built with an old mpi version to run in parallel on most machines, so you can do

./Chaste.sh -np N <PATH TO CONFIG FILE>/ChasteParameters.xml

where N is the number of processes to run with.

Compiled executable

If you have built the executable yourself from source (this is required only for dynamic loading of CellML files), then your paths will (probably) be set up already, and you can simply run

./apps/src/Chaste <PATH TO CONFIG FILE>/ChasteParameters.xml

Then to run this in parallel you should use mpirun (or perhaps mpiexec) associated with the mpi you used to compile Chaste:

mpirun -np N ./apps/src/Chaste <PATH TO CONFIG FILE>/ChasteParameters.xml

where N is the number of processes to run with.

Visualization

In all of these examples, you can change to use the visualizer that you want by setting one of these options (meshalyzer, vtk, cmgui) in the <Simulation> block:

<OutputVisualizer meshalyzer="yes" vtk="yes" cmgui="yes" precision="8"/>

vtk (visualized using paraview) seems to be the most well supported and likely to still work if you are reading this in a few years, if not the simplest to use!

Basic simulations

Examples of further functionality

Further examples using dynamic loading of CellML files

These require a full developer install and the executable to be built from the source, since the CellML files need to be converted into code and compiled, see CodeGenerationFromCellML for more details.

Utilities


Alphabetical listing