Chaste HOWTO Index
As well as ensuring that Chaste functions as expected, the many Chaste tests can be effective for learning how to use Chaste. There are often aspects of Chaste's capabilities that do not warrant a full user tutorial, but are still worth noting. Equally, users often ask "how do I do...", and in many cases there is already a test that does something similar and can be used as a basis.
This page contains a (probably partial) index of links to useful code. Some of the links are to code in tutorials. The others are links to test code. For the latter, note that since tests are written primarily for checking functionality, they are not commented to the same degree as user tutorials. Never-the-less they should be reasonably readable and useful.
Note that this page is generated automatically based on tags in the Chaste code. Do not edit it manually, as your changes will be overwritten!
Cardiac
Electro-mechanics
- Run basic electro-mechanics simulations; specify different models, boundary conditions, fibres -- see line 118 of heart/test/tutorials/TestCardiacElectroMechanicsTutorial.hpp
- Run electro-mechanical simulations using bidomain instead of monodomain -- see line 214 of heart/test/mechanics/TestCardiacElectroMechanicsProblem.hpp
- Run electro-mechanics with inflation pressures -- see line 272 of heart/test/tutorials/TestAnotherCardiacElectroMechanicsTutorial.hpp
- Run electro-mechanics with mechano-electric feedback -- see line 103 of heart/test/tutorials/TestAnotherCardiacElectroMechanicsTutorial.hpp
- Visualise results in cmgui (very brief description) -- see line 206 of heart/test/tutorials/TestCardiacElectroMechanicsTutorial.hpp
Output
- Calculating and outputting ionic currents ('derived quantities') in a single cell simulation using class:OdeSolution - see also this page. -- see line 355 of heart/test/ionicmodels/TestCvodeCells.hpp
- Calculating and outputting ionic currents ('derived quantities') in a tissue simulation using class:HeartConfig - see also this page. -- see line 190 of heart/test/monodomain/TestMonodomainProblem.hpp
- Only output data for particular nodes -- see line 444 of heart/test/bidomain/TestBidomainProblem.hpp
- Output all cell model state variables for the cell model used in a particular simulation -- see line 803 of heart/test/bidomain/TestBidomainProblem.hpp
Post-processing
- Compute action potential properties (APD50, APD90, max upstroke velocities, etc) given voltage traces. -- see line 55 of heart/test/postprocessing/TestCellProperties.hpp
- Compute pseudo-ECGs -- see line 59 of heart/test/postprocessing/TestPseudoEcgCalculator.hpp
- Convert already generated simulation results to any of the visualiser formats -- see line 62 of heart/test/postprocessing/TestHdf5ToVisualizerConverters.hpp
Problem definition
- Fix phi_e at particular nodes (note: this is not required) -- see line 130 of heart/test/bidomain/TestBidomainProblem.hpp
- Generate a slab (cuboid) mesh rather than read a mesh in, and pass it to solver -- see line 103 of heart/test/tutorials/TestMonodomain3dExampleTutorial.hpp
- Generate fibre field definitions for cardiac geometries using a mathematical rule approach -- see line 47 of heart/test/TestStreeterFibreGenerator.hpp
- Run bidomain simulations with a perfusing bath, and apply shocks using electrodes -- see line 47 of heart/test/tutorials/TestBidomainWithBathTutorial.hpp
- Save ('checkpoint') and reload simulations -- see line 49 of heart/test/tutorials/TestCardiacCheckpointingAndRestartingTutorial.hpp
- Set up and run basic bidomain simulations -- see line 48 of heart/test/tutorials/TestRunningBidomainSimulationsTutorial.hpp
- Specify fibre directions -- see line 88 of heart/test/tutorials/TestAnotherBidomainSimulationTutorial.hpp
- Specify output formats (for different visualisers) -- see line 134 of heart/test/tutorials/TestAnotherBidomainSimulationTutorial.hpp
- Use a CVODE adaptor solver in a tissue simulation -- see line 121 of heart/test/performance/Test1dMonodomainShannonCvodeBenchmarks.hpp
- Use a genuinely Neumann intracellular stimulus, rather than default volume stimulus -- see line 54 of heart/test/TestNeumannStimulus.hpp
- Use a native CVODE cell in a tissue simulation -- see line 168 of heart/test/performance/Test1dMonodomainShannonCvodeBenchmarks.hpp
- Use different cell models, defined using cellml files -- see line 74 of heart/test/tutorials/TestRunningBidomainSimulationsTutorial.hpp
Solver
- Run using (simple, user-defined) time-adaptivity -- see line 51 of heart/test/monodomain/TestMonodomainWithTimeAdaptivity.hpp
- Run using operator-splitting -- see line 58 of heart/test/monodomain/TestOperatorSplittingMonodomainSolver.hpp
- Use state-variable interpolation to improve accuracy -- see line 89 of heart/test/bidomain/TestBidomainWithSvi.hpp
- Using specialised Backward Euler implementation to solve the cell models (allows for much larger timesteps) -- see line 64 of heart/test/tutorials/TestBidomainWithBathTutorial.hpp
Continuum mechanics
- Get or output stresses during a solve -- see line 624 of continuum_mechanics/test/TestIncompressibleNonlinearElasticitySolver.hpp
- Solve Stokes' flow problems (this functionality is work-in-progress). -- see line 51 of continuum_mechanics/test/TestStokesFlowSolver.hpp
- Solve nonlinear elasticity problems -- see line 105 of continuum_mechanics/test/TestSolvingElasticityProblemsTutorial.hpp
- Specify more complicated boundary conditions in elasticity problems -- see line 77 of continuum_mechanics/test/TestSolvingMoreElasticityProblemsTutorial.hpp
- Write VTK output (for Paraview visualiser) -- see line 1204 of continuum_mechanics/test/TestIncompressibleNonlinearElasticitySolver.hpp
- Write strain after solve -- see line 934 of continuum_mechanics/test/TestCompressibleNonlinearElasticitySolver.hpp
General
- Read and use parameters from the command line -- see line 44 of global/test/TestCommandLineArguments.hpp
Mesh
- Apply transformations to meshes -- see line 49 of mesh/test/TestTransformations.hpp
- Convert a linear tetrahedral mesh to quadratic and write back to file. -- see line 631 of mesh/test/TestQuadraticMesh.hpp
- Write meshes to file -- see line 56 of mesh/test/writer/TestMeshWriters.hpp
PDE
- Define and solve a particular type of coupled ODE/PDE system -- see line 47 of pde/test/tutorials/TestSolvingLinearParabolicPdeSystemsWithCoupledOdeSystemsTutorial.hpp
- Define and solve linear elliptic or parabolic PDEs -- see line 47 of pde/test/tutorials/TestSolvingLinearPdesTutorial.hpp
- Define and solve nonlinear elliptic PDEs -- see line 52 of pde/test/tutorials/TestSolvingNonlinearPdesTutorial.hpp
- Evaluate integrals (using a solution from a PDE solve say) over a finite element mesh -- see line 49 of pde/test/utilities/TestAbstractFunctionalCalculator.hpp
- Output results to file for time-dependent PDE solvers -- see line 341 of pde/test/tutorials/TestSolvingLinearPdesTutorial.hpp
- Write a solver for coupled nonlinear PDEs (advanced) -- see line 53 of pde/test/TestSolvingCoupledNonlinearPdes.hpp
- Write new PDE solvers (especially for linear coupled elliptic/parabolic systems) -- see line 54 of pde/test/tutorials/TestWritingPdeSolversTutorial.hpp
Creating new HOWTOs
Any C-style block comment found in a test file that looks like the following will be given an entry in the index.
* HOW_TO_TAG Section/Subsection * Short description (ideally one-liner)
The short description may run over multiple lines; it will be considered to end either at the end of the comment, or at a blank comment line, whichever comes first.