openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Namespaces | Macros | Functions
MULTI_ION_IF.cc File Reference

Define multiple ionic models to be used in different regions. More...

#include "MULTI_ION_IF.h"
#include "limpet_types.h"
#include <stdio.h>
#include "SF_init.h"
#include "petsc_utils.h"
Include dependency graph for MULTI_ION_IF.cc:

Go to the source code of this file.

Namespaces

 limpet
 

Macros

#define FILENAME_BUF   1024
 
#define MAX_TRACE_LINE_LEN   8196
 
#define MEMFREE(A)   free(A)
 

Functions

void limpet::initialize_params_MIIF (MULTI_IF *pMIIF)
 
void limpet::initialize_ionic_IF (MULTI_IF *pMIIF)
 
void limpet::CreateIIFLocalNodeLsts (MULTI_IF *pMIIF)
 
void limpet::CreateIIFNodeLsts_ (int, char *, int **, int ***, int)
 
void limpet::alloc_MIIF (MULTI_IF *pMIIF)
 
void limpet::initializeIMPData (MULTI_IF *pMIIF)
 
void limpet::freeIMPData (MULTI_IF *pMIIF)
 
void limpet::allocate_shared_data (MULTI_IF *)
 
int limpet::getGlobalNodalIndex (IonIfBase &pIF, int relIdx)
 
void limpet::CreateIIFGlobalNodeLsts (MULTI_IF *pMIIF)
 
bool limpet::isIMPdata (const char *)
 
int limpet::current_global_node (int local_node)
 
float limpet::current_global_time ()
 
int limpet::should_print_bounds_exceeded_messages ()
 
int limpet::set_print_bounds_exceeded_messages (int newval)
 
int limpet::int_cmp (const void *a, const void *b)
 
void limpet::open_trace (MULTI_IF *MIIF, int n_traceNodes, int *traceNodes, int *label, opencarp::sf_mesh *imesh)
 Set up ionic model traces at some global node numbers. More...
 
void limpet::dump_trace (MULTI_IF *MIIF, limpet::Real time)
 
void limpet::close_trace (MULTI_IF *MIIF)
 
char * limpet::get_sv (void *tab, int offset, int n, int svSize, int size, int dlo_vector_size)
 
int limpet::get_plug_flag (char *plgstr, int *out_num_plugins, IonTypeList &out_plugins)
 
int limpet::determine_write_ranges (int N, size_t *offset, size_t bufsize, int **ranges)
 
void limpet::free_doppel (MULTI_IF *m)
 
void limpet::doppel_update (MULTI_IF *orig, MULTI_IF *miif_doppel)
 
void limpet::doppel_MIIF (MULTI_IF *orig, MULTI_IF *miif_doppel)
 
int limpet::IMPdataLabel2Index (const char *sv)
 
void limpet::dup_IMP_node_state (IonIfBase &IF, int from, int to, GlobalData_t **localdata)
 

Detailed Description

Define multiple ionic models to be used in different regions.

Author
Edward Vigmond
Version
Date
2019-10-25

Define multiple ionic models to be used in different regions

To use multiple ionic interfaces:

  1. load any IMP modules
  2. define consecutive integers starting from 0 to represent each region which will have a different ionic model and plugin combination
  3. specify the number of regions (MULTI_IF::N_IIF)
  4. assign the ionic model to be used in each region (MULTI_IF::IIF_IDs)
  5. specify the plugins for each region Or'ed together (MULTI_IF::IIF_PLUGS)
  6. For each node, specify the region it is in (MULTI_IF::IIF_Mask)
  7. If using PETSc, allocate the transmembrane voltage vector (#RVector) and assign it to MULTI_IF:gdata[Vm]. Other vectors can be manually assigned or will be done automatically
  8. Initialize the MULTI_IF structure with initialize_MIIF(MULTI_IF*)
  9. Adjust any model specific parameters. Use ::tune_IMPs
  10. Initialize the "current" computation with initialize_currents()
  11. set transmembrane stimulation currents with set_tm_simulus()
  12. Now you can compute "currents" with compute_ionic_current()
  13. clean up with free_MIIF()

It is possible to have multiple multiple ionic interfaces. However, all imp modules needed to be loaded before any MIIFs are initialized

Definition in file MULTI_ION_IF.cc.

Macro Definition Documentation

◆ FILENAME_BUF

#define FILENAME_BUF   1024

Definition at line 306 of file MULTI_ION_IF.cc.

◆ MAX_TRACE_LINE_LEN

#define MAX_TRACE_LINE_LEN   8196

◆ MEMFREE

#define MEMFREE (   A)    free(A)

Definition at line 1795 of file MULTI_ION_IF.cc.