Example b212h: Using Grid-based FEM with 3D BoxMG as the elliptic solver on a One-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 b211h
#
# ------------

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

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

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

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

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

#############################################
#
# With this example if you replace bmgpl in  
# the above line with bmtpt you will see the
# poor convergence as a result of the stretched
# mesh.  Note that the domain is
#
#      [0,10] X [0,1] X [0,1]
#
#############################################

# -------
#  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_b212h.com 27-Apr-2007 1.6k bmgpl.ipsolv 27-Apr-2007 2.4k bmgpt.ipsolv 27-Apr-2007 2.5k cube.ipbase 27-Apr-2007 2.4k cube.ipcell 27-Apr-2007 1.7k cube.ipcoor 27-Apr-2007 570 cube.ipelem 27-Apr-2007 404 cube.ipelfb 27-Apr-2007 233 cube.ipequa 27-Apr-2007 1.5k cube.ipgrid 27-Apr-2007 600 cube.ipinit 27-Apr-2007 905 cube.ipmate 27-Apr-2007 1.7k cube.ipnode 27-Apr-2007 1.8k cube.ippara 27-Apr-2007 6.2k cube.ipsolv 27-Apr-2007 1.8k 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_b212h.tar.gz 28-Apr-2007 10k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:06:59 20160
last breakSun Apr 29 01:24:00 20072
cm-debugFailureSun Mar 6 00:07:09 20162
last breakSat Apr 28 01:52:00 200710
mips-irix
cmFailureTue Aug 21 01:47:33 20076
last breakSun Apr 29 01:31:00 20077
cm-debugFailureTue Aug 21 02:03:22 200727
last breakWed May 2 01:28:00 200727
cm-debug-clear-mallocFailureTue Aug 21 02:09:19 200725
last breakSat Apr 28 01:26:00 200726
cm-debug-clear-malloc7FailureTue Aug 21 02:09:45 200726
last breakMon Apr 30 01:29:00 200725
cm64FailureTue Aug 21 01:44:58 20076
last breakSun Apr 29 01:31:00 20078
cm64-debugFailureTue Aug 21 02:14:02 200727
last breakTue May 1 01:29:00 200732
rs6000-aix
cmFailureWed Mar 4 01:10:39 20091
last breakSun Apr 29 02:28:00 20072
cm-debugFailureWed Mar 4 01:18:13 20096
last breakThu Sep 13 02:09:00 20076
cm64FailureWed Mar 4 01:10:30 20091
last breakSun Apr 29 02:28:00 20072
cm64-debugFailureWed Mar 4 01:19:05 20096
last breakThu Sep 13 02:09:00 20076
x86_64-linux
cmFailureSun Mar 6 00:01:38 20160
last breakTue Mar 11 00:20:00 20081
cm-debugFailureSun Mar 6 00:01:39 20161
last breakSat Apr 28 01:17:00 20073

Testing status by file:


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

Input last modified: Fri Apr 27 08:54:23 2007


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