Example cellml/rogers_mcculloch_1994: Rogers modified FitzHugh-Nagumo

This example solves the modified FitzHugh-Nagumo activation model by Rogers and McCulloch (1994), defined by a CellML version of the model.

NOTE: This example requires a CellML 1.0 enabled version of CMISS to run.

The comfile run by this example is as follows:

# Example showing how to use a cellml model

# If the example path is not set, default to current directory
if (! defined $example) {
    $example = "./";
# Drop off the trailing / in the example path
$chopped = chop $example;
if ($chopped ne "/") {
    $example .= $chopped;

fem define parameters;r;$example/fhn;

# default nodes, elements and grids to get a single grid point
fem define node;d;
fem define bas;d;
fem define elem;d;
fem define grid;d;
fem update grid geometry;
fem update grid metric;

# Define the a user defined CellML electrophysiological model
fem define equation;r;$example/cellml;

# Define the CellML model to use and map the parameters to CMISS and
# specify initial/boundary conditions for the cell model.
# Note: the "save temporary files" question is set to yes for testing
#       of the generated code. You might want to turn this off if you
#       are not running this as a test example.
fem define cell;r;$example/fhn_rogers;

# Initialise the spatial properties of the model (there are none).
fem define material;r;$example/fhn cell;
fem define material;r;$example/fhn;
fem update grid material;

# Define the zero transmembrane flux boundary condition.
fem define initial;r;$example/fhn;

# Define an explicit LSODA integrator.
fem define solve;r;$example/lsoda;

# Initialise the solve.
fem solve to 0;

# Create a history file to store output variables of interest.
fem open history;fhn_rogers write variables yqs niqslist 1..5 binary;

# Loop through time integrating the cellular model.
$Tend = 1000;
$dt = 1.0;
for ($time=0;$time<$Tend;$time+=$dt) {
    fem solve restart to $time;
    fem write history time $time variables yqs binary;

fem close history binary;

# Evaluate signals for the variables from the history file.
fem evaluate electrode;fhn_rogers history fhn_rogers from grid yqs iy 1..5 binary;

# Define an export of the CMISS signals to UnEMAP signals..
fem define export;r;$example/fhn;

# ..and export the signals to a UnEMAP signal file.
fem export signal;fhn_rogers electrodes signal fhn_rogers names cell;

# For testing we compare the generated CMISS signal files
if ($TESTING) {
    fem compare signal;fhn_rogers basis both masterfile $example/fhn_rogers comparefile fhn_rogers binary;

Files used by this example are:

Name                       Modified     Size

rogers_mcculloch_1994.com 11-Jun-2003 2.2k cellml.ipequa 11-Jun-2003 1.5k fhn.ipexpo 11-Jun-2003 657 fhn.ipinit 11-Jun-2003 214 fhn.ipmatc 11-Jun-2003 356 fhn.ipmate 11-Jun-2003 3.2k fhn.ippara 11-Jun-2003 5.9k fhn_rogers.binsig 17-Feb-2004 53k fhn_rogers.cml 17-Feb-2004 16k fhn_rogers.ipcell 11-Jun-2003 3.4k lsoda.ipsolv 11-Jun-2003 1.2k

Download the entire example:

Name                                          Modified     Size

examples_cellml_rogers_mcculloch_1994.tar.gz 19-Aug-2006 26k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:03:14 20163
cm-debugSuccessSat Mar 5 00:11:55 20164
cmSuccessSun Aug 19 02:16:00 200745
cm-debugSuccessWed Aug 15 01:59:01 200780
cm-debug-clear-mallocSuccessSat Aug 18 02:14:01 200784
cm-debug-clear-malloc7SuccessMon Aug 20 02:15:08 200791
cm64SuccessSun Aug 19 02:16:58 200745
cm64-debugSuccessTue Aug 21 01:59:10 200781
cm64-debug-clear-mallocSuccessThu Apr 1 11:50:14 200434
cmSuccessWed Mar 4 01:09:50 20092
cm-debugSuccessMon Mar 2 01:10:51 200912
cm64SuccessWed Mar 4 01:09:20 20092
cm64-debugSuccessTue Mar 3 01:15:40 200911
cmSuccessSun Mar 6 00:01:11 20161
cm-debugSuccessSat Mar 5 00:01:50 20162

Testing status by file:

Html last generated: Sun Mar 6 05:51:21 2016

Input last modified: Tue Feb 17 12:07:41 2004

CMISS Help / Examples / cellml / rogers_mcculloch_1994