Region Reunification (gvec)

Author: Patrick Boyle

This example details how to output the values of state variables over time during a simulation using the gvec[] interface. This example is a stub to demonstrate the most basic functionality and should be expanded when possible. To run the experiments of this example change directories as follows:

Problem Setup

This example will run one simulation using a 2D sheet model (1 cm x 1 cm) that has been divided into four regions, each of which uses a different ionic model. All four models have an implementation of the fast sodium current (\(I_{Na}\)), but in one of the models the state variable names are upper-case instead of lower-case (i.e., \(M/H/J\) vs. \(m/h/j\)). The gvec[] interface is used to reunify these state variables from the four regions and output three IGB files: I_Na_m.igb, I_Na_h.igb, and I_Na_j.igb.


No optional arguments are available.

If the program is run with the --visualize option, meshalyzer will automatically load the produced I_Na_m.igb file, which shows \(I_{Na}(t)\) for the entire simulation domain.

What's Going On Under The Hood?

The relevant part of the .par file for this example is shown below:

Each gvec[] structure contains information about one variable that is to be reunified and output. Note that unlike gregion[] and imp_region[], there are no .num_ID variables here. That is because the number of entries in each .ID array is actually determined by num_imp_regions. In this example, the relevant imp_region details are as follows:

  • imp_region[0].im = converted_LRDII_F
  • imp_region[0].im = converted_RNC
  • imp_region[0].im = converted_TT2
  • imp_region[0].im = converted_UCLA_RAB

As noted above, state variables associated with the fast sodium current are \(M/H/J\) in the TT2 implementation vs. \(m/h/j\) in the other 3. This is why the gvec[].ID[2] entries, which are linked to TT2 in imp_region[2], are upper-case instead of lower-case.

© Copyright 2020 openCARP project    Supported by DFG    Contact    Imprint and data protection