Example b211u: Large 3d 2/3 heart example

Large 3d 2/3 heart example


Features include: Noble 98 ionic current model, Monodomain, 520K collocation points, Implicit with GMRES, Adams Moulton integrator, creates dipole sources and activation times field file.

WARNING:- needs 64 bit cmiss and takes about 4 days to run on hpc1 with 8 threads


The comfile run by this example is as follows:

# Example b211u
# 2/3 heart mesh in RC coordinates - 520K grid points
#  with a Noble 98 ionic current model - monodomain -
#  implicit solution with Adams Moulton integrator.
#
# Output: dipoles.ipsour - dipole source file for use
#          inside passive torso
#         activ.exelem - activation times from each
#          collocation point
#
# WARNING - takes approx 4 days to solve on HPC1 with
#  8 threads.

# Geometry file string
$GEOMSTRING = "translated";

# Stimulus sites
$ACTIV1 = "307003,416419,409772,307643,307644,307659,308283";
$ACTIV2 = "316265,425989,317184,317185,340563,317208,318105";
$ACTIV3 = " 36057,192817, 37376, 37377, 37378, 37410, 38697";

#=================================================

{
  eval { require Time::HiRes };
  if( $@ )
    {
      print "warning: $@";
    }
  else
    {
      import Time::HiRes qw(time);
    }
}

sub cpu_time()
  {
    # Add user/system parent/child cpu_times.
    my $result = 0;
    map { $result += $_ } times;
    $result;
  }

sub print_timing($$$)
  {
    my ($message,$wall,$cpu) = @_;
    printf "%s: %.3fs wall, %.3fs cpu.\n", $message, $wall, $cpu;
  }

sub print_memory_use()
  {
    # Different operating systems have different data and ps uses different
    # arguments so try a series of commands in an attempt to collect the
    # information.
    system qw(ps -o vsz -p), $$;
    system qw(ps -l -p), $$;
    system qw(ps v), $$;
  }

# Read in the 2/3 rc heart mesh
FEM define para;r;$GEOMSTRING;example;
FEM define coor 3,1;
FEM define node;r;$GEOMSTRING;example;
FEM define base;r;$GEOMSTRING;example;
FEM define elem;r;$GEOMSTRING;example;
FEM define fibr;r;$GEOMSTRING;example;
FEM define elem;r;$GEOMSTRING;example fibre;

# Create a collocation mesh
FEM define grid;r;full_res;example;

FEM update grid geometry;
FEM update grid metric;
FEM group grid external as boundary;
FEM group grid grid $ACTIV1 as stimulus1;
FEM group grid grid $ACTIV2 as stimulus2;
FEM group grid grid $ACTIV3 as stimulus3;

# Set up the problem ready for solution
FEM define equa;r;mono;example;
FEM define mate;r;621;example;
FEM define cell;r;n98;example;
FEM define mate;r;n98;example cell;
FEM update grid material;
FEM define init;r;n98;example;
FEM define solv;r;implicit_05;example;
FEM solve to 0 calc_activ;

($wall_setup,$cpu_setup) = (time, cpu_time);
print_timing 'setup', $wall_setup - $^T, $cpu_setup;

$iterations = $full_problem ? 500 : 2;

for( my $i = 0; $i < $iterations; $i++ ) {
    FEM solve restart to "$i" calc_activ;
    FEM define sour;c grid grregion 1 grclass 1 time "$i" fixed;
}

($wall_solve,$cpu_solve) = (time, cpu_time);
print_timing 'solve', $wall_solve - $wall_setup, $cpu_solve - $cpu_setup;

#Export the geometry of the mesh
FEM export node;heart as heart;
FEM export elem;heart as heart;
FEM update grid activation_times;
FEM export elem;activ as heart iy 4 field;
FEM define sour;w;dipoles grid grregion 1 grclass 1;

print_memory_use;

Files used by this example are:

Name                    Modified     Size

example_b211u.com 18-Jan-2005 2.9k 621.ipmate 26-Feb-2001 1.8k activ.exelem 26-Feb-2001 7.5M dipoles.ipsour 26-Feb-2001 6.7M full_res.ipgrid 18-Jan-2005 3.3k implicit_05.ipsolv 13-Apr-2007 2.6k implicit_05.ipsolv.old 26-Feb-2001 2.1k mono.ipequa 26-May-2003 1.4k n98.ipcell 26-Feb-2001 9.2k n98.ipinit 26-Feb-2001 212 n98.ipmatc 18-Jan-2005 1.7k translated.ipbase 26-Feb-2001 11k translated.ipelem 26-Feb-2001 20k translated.ipelfb 26-Feb-2001 18k translated.ipfibr 26-Feb-2001 48k translated.ipnode 26-Feb-2001 85k translated.ippara 18-Jan-2005 5.8k

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b211_b211u.tar.gz 14-Apr-2007 1.5M

Testing status by version:

StatusTestedReal time (s)
hpc_cm64_irixSuccessFri Jul 29 03:31:26 20054177
hpc_cmo64_irixSuccessSun Jul 31 02:24:01 2005935
rs6000-aix
cm64SuccessWed Mar 4 01:44:26 2009309
cm64-debugSuccessTue Mar 3 03:52:57 20093254
x86_64-linux
cmSuccessSun Mar 6 00:06:13 2016142
cm-debugSuccessSat Mar 5 00:17:53 2016510

Testing status by file:


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

Input last modified: Fri Apr 13 10:38:14 2007


CMISS Help / Examples / b / b2 / b21 / b211 / b211u