Example b211l:
Implicit LR2 over a 2d square.
Implicitly solve the LR2 model over a square sheet
of tissue, using the Adams integrator. If the geometry and fields
are exported, they can be viewed using the cmiss_input/cmiss_input/movie.com command file. The
signal file can be viewed using UnEMAP.
The comfile run by this example is as follows:
# Example b211k - Implicitly solve the LR2 model over a square sheet
# of tissue, using the Adams integrator. If the geometry and fields
# are exported, they can be viewed using the draw.com command file. The
# signal file can be viewed using UnEMAP.
# 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;
}
#Set up problem size
fem define para;r;$example/test;
#Define geometry of the problem
# Define underlying geometry
fem define base;r;$example/test;
fem define mesh;r;$example/test;
# Define grid geometry
fem define grid;r;$example/test;
fem update grid geometry;
fem update grid metric;
# Some useful groups
fem group grid external as boundary;
fem group grid grid 1889,2353,1881,1888,1946 as stimulus_site;
#Define equation to solve
# Define monodomain with LR2 kinetics
fem define equa;r;$example/test;
#Define material properties for the problem
# Define cellular material properties
fem define cell;r;$example/lr;
# Define cell variants and spatially varying material parameters
if ($TESTING) {
# When testing we don't won't to apply a stimulus as we start from a
# solution that is already stimuluated
fem define mate;r;$example/test_noStim cell;
} else {
fem define mate;r;$example/test cell;
}
# Define continuum material parameters
fem define mate;r;$example/test;
fem update grid material;
#Define continuum initial conditions
# Set no-flux boundary condition
fem define init;r;$example/test;
#Define the implicit solve, using the adams integrator
fem def solve;r;$example/test;
#The geometry can be exported to CMGUI via these commands
#fem export node;test as sheet !Export node geometry
#fem export elem;test as sheet !Export element geometry
#Solve the problem
# Initialise the solve
fem solve to 0;
# Open a binary history file to store the membrane potential (YQ(1))
fem open history;test write variables yq niqlist 1 binary unit 21;
# For testing, we simply read in a previous solution and solve one time
# step.
if ($TESTING) {
set echo;
fem read matrix;$example/test binary;
fem solve restart to 1;
fem write history time 10 variables yq binary unit 21;
fem export elem;test_1010 field as sheet;
} else {
# Loop through time
for $HUN ( 0..0 ) {
for $TEN ( 0..1 ) {
for $UNIT ( 0..9 ) {
# Solve for the current time
fem solve restart to "${HUN}${TEN}$UNIT";
# Write the membrane potential to the history file
fem write history time "${HUN}${TEN}$UNIT" variables yq binary unit 21;
fem export elem;test_1${HUN}${TEN}$UNIT field as sheet;
}
}
}
}
# Close the history file
fem close history binary unit 21;
if (!$TESTING) {
# Calculate the binary signal file from the history file
fem evaluate electrode;test history test from grid binary;
# Define UnEmap export properties
fem define export;r;$example/test;
# Export the binary signal file to UnEmap
fem export signal;test electrode signal test;
}
Files used by this example are:
Name Modified Size
example_b211l.com 23-Jan-2003 3.2k
draw.com 20-Nov-2001 2.2k
lr.ipcell 23-Jan-2003 4.5k
movie.com 10-Apr-2000 441
test.binmat 23-Jan-2003 990k
test.ipbase 10-Apr-2000 1.1k
test.ipcell 10-Apr-2000 13k
test.ipequa 26-May-2003 1.4k
test.ipexpo 10-Apr-2000 661
test.ipgrid 06-Mar-2003 538
test.ipinit 10-Apr-2000 213
test.ipmatc 30-Jan-2003 727
test.ipmate 10-Apr-2000 3.2k
test.ipmesh 10-Apr-2000 765
test.ippara 12-Nov-2002 5.9k
test.ipsolv 13-Apr-2007 2.2k
test.ipsolv.old 10-Apr-2000 1.8k
test_noStim.ipmatc 30-Jan-2003 724
Download the entire example:
Name Modified Size
examples_b_b2_b21_b211_b211l.tar.gz 14-Apr-2007 270k
Testing status by version:
Testing status by file:
- signal
i686-linux | | | |
SIGABRT | cm-debug: | exit due to SIGABRT signal. |
- cmiss_test.log
- test_1010.exelem
i686-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Missing | cm-debug: | output file not generated for ndiff;
generic answer. |
mips-irix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
rs6000-aix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
x86_64-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Html last generated: Sun Mar 6 05:51:09 2016
Input last modified: Fri Apr 13 10:38:04 2007
CMISS Help /
Examples /
b /
b2 /
b21 /
b211 /
b211l