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.
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;
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 \
98  4 /* added on to list of mechanism variables.These are \
99 pointers which connect variables from other mechanisms via the _ppval array. \
100 */
101 
102 #define _AMBIGUOUS 5
103 
104 #endif /* nrn_memb_func_h */
short type
Definition: cabvars.h:9
void
static int ode_count(int type)
Definition: kschan.cpp:111
static void ode_spec(NrnThread *, Memb_list *ml, int type)
Definition: kschan.cpp:122
static void ode_matsol(NrnThread *nt, Memb_list *ml, int type)
Definition: kschan.cpp:127
static void ode_map(int ieq, double **pv, double **pvdot, double *p, Datum *pd, double *atol, int type)
Definition: kschan.cpp:117
struct BAMech BAMech
void(* nrn_bamech_t)(Node *, double *, Datum *, Datum *, struct NrnThread *)
Definition: membfunc.h:24
void(* Pvmp)(Prop *)
Definition: membfunc.h:19
void hoc_register_prop_size(int type, int psize, int dpsize)
Definition: init.cpp:704
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(* nrn_ode_synonym_t)(int, double **, Datum **)
Definition: membfunc.h:22
void(* Pvmi)(struct NrnThread *, Memb_list *, int)
Definition: membfunc.h:18
struct Memb_func Memb_func
int * nrn_prop_param_size_
Definition: init.cpp:140
Memb_func * memb_func
Definition: init.cpp:123
BAMech ** bamech_
Definition: init.cpp:129
int * nrn_prop_dparam_size_
Definition: init.cpp:141
int n_memb_func
Definition: init.cpp:440
Memb_list * memb_list
Definition: init.cpp:124
short * memb_order_
Definition: init.cpp:125
struct BAMech * next
Definition: membfunc.h:82
nrn_bamech_t f
Definition: membfunc.h:80
int type
Definition: membfunc.h:81
void * hoc_mech
Definition: membfunc.h:54
int * dparam_semantics
Definition: membfunc.h:56
Pvmi jacob
Definition: membfunc.h:34
int is_point
Definition: membfunc.h:53
Pvmi current
Definition: membfunc.h:33
void(* setdata_)(struct Prop *)
Definition: membfunc.h:55
Pvmi state
Definition: membfunc.h:35
void(* thread_table_check_)(double *, Datum *, Datum *, NrnThread *, int)
Definition: membfunc.h:51
int thread_size_
Definition: membfunc.h:48
void(* _update_ion_pointers)(Datum *)
Definition: membfunc.h:52
Pvmp alloc
Definition: membfunc.h:32
int vectorized
Definition: membfunc.h:47
Pvmp destructor
Definition: membfunc.h:37
void(* thread_mem_init_)(Datum *)
Definition: membfunc.h:49
void(* thread_cleanup_)(Datum *)
Definition: membfunc.h:50
Symbol * sym
Definition: membfunc.h:38
Pvmi initialize
Definition: membfunc.h:36
Definition: section.h:133
Represent main neuron object computed by single thread.
Definition: multicore.h:58
Definition: section.h:214
Definition: model.h:57
Definition: hocdec.h:177