Documentation for Release 2024.1

User tutorials

The basics

These tutorials assume prior knowledge or understanding of various C++ language features and some libraries, including (at least): std::vectors, c_vectors, and object-oriented inheritance including abstract classes and virtual methods.

If you don’t know anything about these we recommend a first course in C++, there are plenty online (here is one from cplusplus.com). There is also a Scientific Computing in C++ book by some of our team available too.

To run any of these tutorials, it is assumed you have first configured Chaste using CMake:

cmake /path/to/chaste/src

Then, run

make <NAME_OF_TUTORIAL_FILE>

(without the .hpp on the end) to compile the tutorial source code, and

ctest -V -R <NAME_OF_TUTORIAL_FILE>

to run it. The -V is a flag to give verbose output, i.e. show the full output from the test on screen. The -R allows you to run all tests matching a ‘regular expression’, if you don’t know what that means don’t worry, if you just write the full tutorial class name it tells ctest to run that one in particular.

For instance:

make TestSolvingOdesTutorial
ctest -V -R TestSolvingOdesTutorial

Before you do anything else


Core functionality

Solving ODEs

Solving PDEs

Writing new PDE solvers (advanced)

Solid Mechanics


Cardiac

Executable users

The cardiac executable is a compiled CardiacSimulation object that uses an XML file to specify the settings that C++ users would do via HeartConfig. It is therefore a bit easier to use but less flexible than using Chaste classes via C++.

  • UserTutorials/CardiacExecutable - a submenu with links to various tutorials for users of the cardiac executable binary where settings are specified via an XML file (not the source code).

Single Cardiac Cell Simulations

Mono/Biodomain Simulations

Checkpointing (saving/loading)

Electro-mechanics


Cell-based

Where to start with cell-based simulations:

Running basic simulation types:

Running crypt-specific simulations:

More advanced examples:

Adding new functionality:

To do new things in Chaste that haven’t been coded before you’ll often have to add your own new C++ classes. Here are a set of examples to use as a basis for that.


Lung

Generation and manipulation of airway geometries

Simulating ventilation and impedance