membfunc.h

Go to the documentation of this file.
00001 #ifndef nrn_memb_func_h
00002 #define nrn_memb_func_h
00003 #if defined(__cplusplus)
00004 extern "C" {
00005 #endif
00006 
00007 typedef Datum *(*Pfrpdat)();
00008 
00009 #define NULL_CUR (Pfri)0
00010 #define NULL_ALLOC (Pfri)0
00011 #define NULL_STATE (Pfri)0
00012 #define NULL_INITIALIZE (Pfri)0
00013 
00014 typedef struct Memb_func {
00015    Pfri  alloc;
00016    Pfri  current;
00017    Pfri  jacob;
00018    Pfri  state;
00019    Pfri  initialize;
00020    Pfri  destructor; /* only for point processes */
00021    Symbol   *sym;
00022 #if CVODE
00023    Pfri  ode_count;
00024    Pfri  ode_map;
00025    Pfri  ode_spec;
00026    Pfri  ode_matsol;
00027    Pfri  ode_synonym;
00028    Pfri  singchan_; /* managed by kschan for variable step methods */
00029 #endif
00030    int vectorized;
00031    int thread_size_; /* how many Datum needed in Memb_list if vectorized */
00032    void (*thread_mem_init_)(Datum*); /* after Memb_list._thread is allocated */
00033    void (*thread_cleanup_)(Datum*); /* before Memb_list._thread is freed */
00034    void (*thread_table_check_)(double*, Datum*, Datum*, void*, int);
00035    void (*_update_ion_pointers)(Datum*);
00036    int is_point;
00037    void* hoc_mech;
00038 } Memb_func;
00039 
00040 #if VECTORIZE
00041 #include "nrnoc_ml.h"
00042 #endif
00043 
00044 #define VINDEX -1
00045 #define CABLESECTION 1
00046 #define MORPHOLOGY   2
00047 #define CAP 3
00048 #if EXTRACELLULAR
00049 #define EXTRACELL 5
00050 #endif
00051 
00052 #define CONST 1
00053 #define DEP 2
00054 #define STATE 3   /*See init.c and cabvars.h for order of CONST, DEP, and STATE */
00055 
00056 #define BEFORE_INITIAL 0
00057 #define AFTER_INITIAL 1
00058 #define BEFORE_BREAKPOINT 2
00059 #define AFTER_SOLVE 3
00060 #define BEFORE_STEP 4
00061 #define BEFORE_AFTER_SIZE 5 /* 1 more than the previous */
00062 typedef struct BAMech {
00063    Pfri f;
00064    int type;
00065    struct BAMech* next;
00066 } BAMech;
00067 extern BAMech** bamech_;
00068 
00069 extern Memb_func* memb_func;
00070 extern int n_memb_func;
00071 #if VECTORIZE
00072 extern Memb_list* memb_list;
00073 /* for finitialize, order is same up through extracellular, then ions,
00074 then mechanisms that write concentrations, then all others. */
00075 extern short* memb_order_; 
00076 #endif
00077 #define NRNPOINTER 4 /* added on to list of mechanism variables.These are
00078 pointers which connect variables  from other mechanisms via the _ppval array.
00079 */
00080 
00081 #define _AMBIGUOUS 5
00082 
00083 #if defined(__cplusplus)
00084 }
00085 #endif
00086 
00087 #endif /* nrn_memb_func_h */
Generated on Mon Jun 13 08:10:26 2011 for NEURON by  doxygen 1.6.3