Example b212i: Using Grid-based FEM with 3D BoxMG as the elliptic solver on a Nine-Element Domain


This example uses Grid-based FEM and BoxMG as a solver for the elliptic part of the bidomain equations. The model is a simple Cubic Ionic Activation model and BoxMG uses its plane relaxation method as a smoother. It is necessary for this problem because the elements are highly anisotropic, or stretched. If you switch to using the point smoother (replace bmgpl with bmtpt for ipsolv) then you will see the effect.

There are a few things to note about BoxMG. First, it can only be used for domains that can be mapped to a square in 2D or a cube in 3D. It was brought into CMISS for solving large scale cardiac tissue problems as it is ideally suited for such domains. We often say that such domains are logically rectangular. Second, there are many options when using BoxMG but I have hidden most of them from the unexperienced user. The most important option to be aware of is the relaxation (or smoothing) method. If the problem is highly anisotropric, either from conductivities or a stretched mesh, then you must use line relaxation in 2D and plane relaxation in 3D. Finally, it should be noted that no benefit will be gained until the number of unknowns begins approaching 500,000. For less than 250,000 unknowns it will probably be faster to use either LU or CG with ILU. These are not hard and fast rules but something to keep in mind.

References:

Solving the cardiac bidomain equations for discontinuous conductivities, IEEE Trans. Biomedical Engineering, 53, 7, pp. 1265-1272, 2006

Fast elliptic solvers for cardiac bioelectric modeling on structured meshes, submitted to Computers in Biology and Medicine in 2007


The comfile run by this example is as follows:

#
# Example b211i
#
# ------------

# -------------------------------------
# Set parameters and coors for problem
# -------------------------------------
fem define para;r;nine_cubes;example
fem define coor;r;nine_cubes;example

# -------------------------------------
# Define elements and fibres
# -------------------------------------
fem define node;r;nine_cubes;example
fem define base;r;nine_cubes;example
fem define elem;r;nine_cubes;example
fem define fibr;d
fem define elem;r;nine_cubes;example fibre

# -------------------------------------
# Define grids
# -------------------------------------
fem define grid;r;nine_cubes;example
fem update grid geometry
fem group grid external as boundary
fem group grid xi1 low as stimulus

# -------------------------------------
# Define equations, materials, and cells
# -------------------------------------
fem define equa;r;nine_cubes;example class 1,2
fem define mate;r;nine_cubes;example class 1,2
fem define cell;r;nine_cubes;example class 1,2

# ---------------------------------------------
# Define initial and boundary conds and solver
# ---------------------------------------------
fem define init;r;nine_cubes;example class 1,2
fem define solv;r;pcg;example class 1
fem define solv;r;pbmgpl;example class 2

# -------
#  SOLVE
# -------
fem solve to 1.0 class 1,2

Additional testing commands:

#Testing example b212h
fem li grid yq index v class 1

Files used by this example are:

Name               Modified     Size

example_b212i.com 27-Apr-2007 1.3k nine_cubes.ipbase 27-Apr-2007 2.4k nine_cubes.ipcell 27-Apr-2007 1.7k nine_cubes.ipcoor 27-Apr-2007 570 nine_cubes.ipelem 27-Apr-2007 2.9k nine_cubes.ipelfb 27-Apr-2007 1.4k nine_cubes.ipequa 27-Apr-2007 1.5k nine_cubes.ipgrid 27-Apr-2007 603 nine_cubes.ipinit 27-Apr-2007 897 nine_cubes.ipmate 27-Apr-2007 1.7k nine_cubes.ipnode 27-Apr-2007 5.5k nine_cubes.ippara 27-Apr-2007 5.9k pbmgpl.ipsolv 27-Apr-2007 2.4k pbmgpt.ipsolv 27-Apr-2007 2.4k pcg.ipsolv 27-Apr-2007 2.1k test_output.com 27-Apr-2007 54

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b212_b212i.tar.gz 28-Apr-2007 10k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:07:00 20161
last breakThu Sep 22 00:48:00 20112
cm-debugFailureSun Mar 6 00:09:44 20162
last breakThu Sep 22 00:53:00 20117
mips-irix
cmFailureTue Aug 21 01:32:45 20077
last breakSun Apr 29 01:31:00 20077
cm-debugFailureTue Aug 21 02:14:31 200727
last breakWed May 2 01:28:00 200732
cm-debug-clear-mallocFailureTue Aug 21 02:53:27 200743
last breakSat Apr 28 01:26:00 200738
cm-debug-clear-malloc7FailureTue Aug 21 02:40:14 200739
last breakMon Apr 30 01:29:00 200738
cm64FailureTue Aug 21 01:42:59 20077
last breakSun Apr 29 01:31:00 20077
cm64-debugFailureTue Aug 21 02:39:33 200731
last breakTue May 1 01:29:00 200731
rs6000-aix
cmFailureWed Mar 4 01:10:30 20091
last breakSun Apr 29 02:28:00 20071
cm-debugFailureWed Mar 4 01:19:24 20097
last breakSat Jun 28 01:14:00 20087
cm64FailureWed Mar 4 01:10:30 20091
last breakSat Jun 28 01:10:00 20082
cm64-debugFailureWed Mar 4 01:19:27 20097
last breakSat Jun 28 01:14:00 20087
x86_64-linux
cmFailureSun Mar 6 00:01:38 20160
last breakThu Sep 22 00:27:00 20110
cm-debugFailureSun Mar 6 00:01:39 20161
last breakThu Sep 22 00:27:00 20112

Testing status by file:


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

Input last modified: Fri Apr 27 08:50:52 2007


CMISS Help / Examples / b / b2 / b21 / b212 / b212i