NEURON
membfunc.h
Go to the documentation of this file.
1 #ifndef nrn_memb_func_h
2 #define nrn_memb_func_h
3 
4 #if defined(__cplusplus)
5 extern "C" {
6 #endif
7 
8 extern void hoc_register_prop_size(int type, int psize, int dpsize);
9 
10 #if defined(__cplusplus)
11 }
12 #endif
13 
14 #include "nrnoc_ml.h"
15 
16 typedef struct NrnThread NrnThread;
17 typedef Datum *(*Pfrpdat)();
18 typedef void(*Pvmi)(struct NrnThread*, Memb_list*, int);
19 typedef void (*Pvmp)(Prop*);
20 typedef int (*nrn_ode_count_t)(int);
21 typedef void (*nrn_ode_map_t)(int, double**, double**, double*, Datum*, double*, int);
22 typedef void (*nrn_ode_synonym_t)(int, double**, Datum**);
23 /* eventually replace following with Pvmp */
24 typedef void (*nrn_bamech_t)(Node*, double*, Datum*, Datum*, struct NrnThread*);
25 
26 #define NULL_CUR (Pfri)0
27 #define NULL_ALLOC (Pfri)0
28 #define NULL_STATE (Pfri)0
29 #define NULL_INITIALIZE (Pfri)0
30 
31 typedef struct Memb_func {
37  Pvmp destructor; /* only for point processes */
39 #if CVODE
42  Pvmi ode_spec;
44  nrn_ode_synonym_t ode_synonym;
45  Pvmi singchan_; /* managed by kschan for variable step methods */
46 #endif
48  int thread_size_; /* how many Datum needed in Memb_list if vectorized */
49  void (*thread_mem_init_)(Datum*); /* after Memb_list._thread is allocated */
50  void (*thread_cleanup_)(Datum*); /* before Memb_list._thread is freed */
51  void (*thread_table_check_)(double*, Datum*, Datum*, NrnThread*, int);
53  int is_point;
54  void* hoc_mech;
55  void (*setdata_)(struct Prop*);
56  int* dparam_semantics; // for nrncore writing.
57 } Memb_func;
58 
59 
60 #define IMEMFAST -2
61 #define VINDEX -1
62 #define CABLESECTION 1
63 #define MORPHOLOGY 2
64 #define CAP 3
65 #if EXTRACELLULAR
66 #define EXTRACELL 5
67 #endif
68 
69 #define nrnocCONST 1
70 #define DEP 2
71 #define STATE 3 /*See init.cpp and cabvars.h for order of nrnocCONST, DEP, and STATE */
72 
73 #define BEFORE_INITIAL 0
74 #define AFTER_INITIAL 1
75 #define BEFORE_BREAKPOINT 2
76 #define AFTER_SOLVE 3
77 #define BEFORE_STEP 4
78 #define BEFORE_AFTER_SIZE 5 /* 1 more than the previous */
79 typedef struct BAMech {
81  int type;
82  struct BAMech* next;
83 } BAMech;
84 extern BAMech** bamech_;
85 
86 extern Memb_func* memb_func;
87 extern int n_memb_func;
88 extern int* nrn_prop_param_size_;
89 extern int* nrn_prop_dparam_size_;
90 
91 #if VECTORIZE
92 extern Memb_list* memb_list;
93 /* for finitialize, order is same up through extracellular, then ions,
94 then mechanisms that write concentrations, then all others. */
95 extern short* memb_order_;
96 #endif
97 #define NRNPOINTER 4 /* added on to list of mechanism variables.These are
98 pointers which connect variables from other mechanisms via the _ppval array.
99 */
100 
101 #define _AMBIGUOUS 5
102 
103 #endif /* nrn_memb_func_h */
short type
Definition: cabvars.h:10
int thread_size_
Definition: membfunc.h:48
static void ode_map(int ieq, double **pv, double **pvdot, double *p, Datum *pd, double *atol, int type)
Definition: kschan.cpp:119
void
Pvmi current
Definition: membfunc.h:33
Represent main neuron object computed by single thread.
Definition: multicore.h:58
static int ode_count(int type)
Definition: kschan.cpp:114
void(* thread_cleanup_)(Datum *)
Definition: membfunc.h:50
void * hoc_mech
Definition: membfunc.h:54
int type
Definition: membfunc.h:81
void(* nrn_ode_synonym_t)(int, double **, Datum **)
Definition: membfunc.h:22
Pvmp destructor
Definition: membfunc.h:37
Symbol * sym
Definition: membfunc.h:38
int * nrn_prop_dparam_size_
Definition: init.cpp:179
struct Memb_func Memb_func
void(* nrn_bamech_t)(Node *, double *, Datum *, Datum *, struct NrnThread *)
Definition: membfunc.h:24
Pvmi state
Definition: membfunc.h:35
Memb_list * memb_list
Definition: init.cpp:162
void(* thread_mem_init_)(Datum *)
Definition: membfunc.h:49
void(* Pvmp)(Prop *)
Definition: membfunc.h:19
void(* Pvmi)(struct NrnThread *, Memb_list *, int)
Definition: membfunc.h:18
int
Definition: nrnmusic.cpp:71
Pvmp alloc
Definition: membfunc.h:32
short * memb_order_
Definition: init.cpp:163
nrn_bamech_t f
Definition: membfunc.h:80
Definition: model.h:57
Pvmi initialize
Definition: membfunc.h:36
Memb_func * memb_func
Definition: init.cpp:161
Definition: section.h:213
BAMech ** bamech_
Definition: init.cpp:167
void(* _update_ion_pointers)(Datum *)
Definition: membfunc.h:52
Pvmi jacob
Definition: membfunc.h:34
int vectorized
Definition: membfunc.h:47
struct BAMech BAMech
int is_point
Definition: membfunc.h:53
void(* thread_table_check_)(double *, Datum *, Datum *, NrnThread *, int)
Definition: membfunc.h:51
static void ode_matsol(NrnThread *nt, Memb_list *ml, int type)
Definition: kschan.cpp:130
int n_memb_func
Definition: init.cpp:471
int * nrn_prop_param_size_
Definition: init.cpp:178
void hoc_register_prop_size(int type, int psize, int dpsize)
Definition: init.cpp:721
int * dparam_semantics
Definition: membfunc.h:56
Definition: section.h:132
struct BAMech * next
Definition: membfunc.h:82
Definition: hocdec.h:176
static void ode_spec(NrnThread *, Memb_list *ml, int type)
Definition: kschan.cpp:125
void(* nrn_ode_map_t)(int, double **, double **, double *, Datum *, double *, int)
Definition: membfunc.h:21
int(* nrn_ode_count_t)(int)
Definition: membfunc.h:20
void(* setdata_)(struct Prop *)
Definition: membfunc.h:55