132 #ifndef MULTI_ION_IF_H
133 #define MULTI_ION_IF_H
139 #include <sys/resource.h>
147 #define FARADAY 96485
153 static const unsigned int MIIF_Format = 2;
154 static const char *Magic_MIIF_ID =
"Dump_MIIF_ID";
202 std::vector<IonIfBase*>
IIF;
260 char *,
double,
double);
290 char*
tokstr_r(
char *s1,
const char *s2,
char **lasts);
301 #define USED_DAT(I, F) ( (I)->get_reqdat()&F || (I)->get_moddat()&F)
314 #define get_plug_params(M, R, P) (P ## _Params *)get_IIF_plugparam(*(M.IIF[R]), P ## _ID)
326 #define SVD_add(I, R, T, M) {T ## _state *sv; int dtype = 0; sv_dump_add(&I, R, \
327 T ## _ID, offsetof(T ## _state, \
329 sizeof(sv->M), dtype, # R "." # T "." # M, # T, \
Represents the ionic model and plug-in (IMP) data structure.
Abstract class representing an ionic model type.
bool extUpdateVm
flag indicating update function for Vm
std::vector< IonIfBase * > IIF
array of IIF's
opencarp::sf_vec * gdata[NUM_IMP_DATA_TYPES]
data used by all IMPs
void sv_dump_add_by_name_list(int, char *, char *, char *, char *, char *, double, double)
node_count_t numNode
local number of nodes
size_t dump_svs(opencarp::base_timer *)
int * numplugs
number of plugins for each region
std::vector< Target > targets
target for each region
std::vector< IonTypeList > plugtypes
plugins types for each region
IonTypeList iontypes
type for each region
void dump_state(char *, float, opencarp::mesh_t gid, bool, unsigned int)
SV_DUMP svd
state variable dump
void sv_dump_add(int, const IonType &, int, int, int, const char *, const char *)
void * thread_initialize_MIIF()
void transmem_stim_species(float, const char *, float, int *, int)
void initialize_currents(double, int)
GlobalData_t *** ldata
data local to each IMP
float restore_state(const char *, opencarp::mesh_t gid, bool)
int N_IIF
how many different IIF's
void compute_ionic_current(bool flag_send=1, bool flag_receive=1)
GPU kernel to emulate the add_scaled call made to adjust the Vm values when the update to Vm is not m...
int sv_dump_add_by_name(int, char *, char *, char *, char *)
Trace_Info * trace_info
Information about traces.
node_count_t * N_Nodes
#nodes for each IMP
GlobalData_t * procdata[NUM_IMP_DATA_TYPES]
data for this processor
void dump_luts_MIIF(bool)
bool * contiguous
whether a region is contiguously numbered
opencarp::FILE_SPEC logger
int numSubDt
number of sub-dt time steps
node_index_t ** NodeLists
local partitioned node lists for each IMP stored
void MIIF_change_dt(double)
IIF_Mask_t * IIFmask
region for each node
int adjust_MIIF_variables(const char *variable, const SF::vector< SF_int > &indices, const SF::vector< SF_real > &values)
std::string name
name for MIIF region
bool doppel
is this a shallow clone?
void releaseRealDataDuringInit()
Structs and types for (electric) FEM.
void doppel_MIIF(MULTI_IF *orig, MULTI_IF *miif_doppel)
int get_plug_flag(char *plgstr, int *out_num_plugins, IonTypeList &out_plugins)
void doppel_update(MULTI_IF *orig, MULTI_IF *miif_doppel)
int IMPdataLabel2Index(const char *sv)
std::vector< std::reference_wrapper< IonType > > IonTypeList
void dup_IMP_node_state(IonIfBase &IF, node_index_t from, node_index_t to, GlobalData_t **localdata)
opencarp::local_index_t node_count_t
void dump_trace(MULTI_IF *MIIF, limpet::Real time)
void 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.
void free_doppel(MULTI_IF *m)
opencarp::local_index_t node_index_t
char * tokstr_r(char *s1, const char *s2, char **lasts)
void * get_IIF_plugparam(IonIfBase &, int)
mesh_t
The enum identifying the different meshes we might want to load.
data structure to manage state variable file dumps
size_t * svsize
state variable sizes
char ** fn
array to store file names
double intv
time interval for sv dumps
int n_dumps
keep track of number of dumped time slices
node_count_t * num
number of nodes
long nwr
keep track of number of written tokens
int * size
sizes of SV to dump
void ** svtab
state variable tables
int * reg
array to store region ids
double t_dump
next instant for sv dump
char ** svnames
array to store sv names
int n
#state variables we want to dump
int * offset
offsets into structure for SV
opencarp::FILE_SPEC * hdls
array of file handles to sv output files
data structure to manage trace dumps. Should eventually be combined with the state variable dumps,...
bool ignored
globally not found
node_index_t node_idx
local node number
bool found
found on this node
Timers and timer manager.