NEURON
cabcode.cpp File Reference
#include <../../nrnconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <nrnpython_config.h>
#include "section.h"
#include "nrniv_mf.h"
#include "membfunc.h"
#include "parse.hpp"
#include "hocparse.h"
#include "membdef.h"

Go to the source code of this file.

Macros

#define HOC_L_LIST   1
 
#define symlist   hoc_symlist
 
#define NSECSTACK   200
 
#define CAB_SIZE   10
 
#define PI   3.14159265358979323846
 
#define relative(pc)   (pc + (pc)->i)
 

Functions

static int range_vec_indx (Symbol *s)
 
int nrn_isecstack (void)
 
void nrn_secstack (int i)
 
void nrn_initcode (void)
 
void oc_save_cabcode (int *a1, int *a2)
 
void oc_restore_cabcode (int *a1, int *a2)
 
void nrn_pushsec (Section *sec)
 
void nrn_popsec (void)
 
void sec_access_pop (void)
 
void add_section (void)
 
Objectnrn_sec2cell (Section *sec)
 
int nrn_sec2cell_equals (Section *sec, Object *obj)
 
static Sectionnew_section (Object *ob, Symbol *sym, int i)
 
void new_sections (Object *ob, Symbol *sym, Item **pitm, int size)
 
void delete_section (void)
 
double section_length (Section *sec)
 
int arc0at0 (Section *sec)
 
double nrn_ra (Section *sec)
 
void cab_alloc (Prop *p)
 
void morph_alloc (Prop *p)
 
double nrn_diameter (Node *nd)
 
void nrn_chk_section (Symbol *s)
 
Sectionchk_access (void)
 
Sectionnrn_noerr_access (void)
 
void nrn_remove_sibling_list (Section *sec)
 
static double ncp_abs (Section *sec)
 
void nrn_add_sibling_list (Section *sec)
 
static void reverse_sibling_list (Section *sec)
 
void disconnect (void)
 
static void reverse_nodes (Section *sec)
 
void nrn_disconnect (Section *sec)
 
static void connectsec_impl (Section *parent, Section *sec)
 
void simpleconnectsection (void)
 
void connectsection (void)
 
static SectionSec_access (void)
 
void sec_access (void)
 
void sec_access_object (void)
 
void sec_access_push (void)
 
Sectionnrn_sec_pop (void)
 
void hoc_sec_internal_push (void)
 
voidhoc_sec_internal_name2ptr (const char *s, int eflag)
 
voidhoc_pysec_name2ptr (const char *s, int eflag)
 
void ob_sec_access_push (Item *qsec)
 
void ob_sec_access (void)
 
void mech_access (void)
 
void mech_insert1 (Section *sec, int type)
 
void mech_uninsert (void)
 
void mech_uninsert1 (Section *sec, Symbol *s)
 
void nrn_rangeconst (Section *sec, Symbol *s, double *pd, int op)
 
void range_const (void)
 
Propnrn_mechanism (int type, Node *nd)
 
Propnrn_mechanism_check (int type, Section *sec, int inode)
 
Prophoc_getdata_range (int type)
 
static Datumpdprop (Symbol *s, int indx, Section *sec, short inode)
 
void connectpointer (void)
 
void range_interpolate_single (void)
 
void range_interpolate (void)
 
int nrn_exists (Symbol *s, Node *node)
 
double * nrn_rangepointer (Section *sec, Symbol *s, double d)
 
double * nrnpy_rangepointer (Section *sec, Symbol *s, double d, int *err)
 
void rangevarevalpointer (void)
 
void rangevareval (void)
 
void rangepoint (void)
 
int node_index (Section *sec, double x)
 
int node_index_exact (Section *sec, double x)
 
double cable_prop_eval (Symbol *sym)
 
double * cable_prop_eval_pointer (Symbol *sym)
 
void keep_nseg_parm (void)
 
void nrn_change_nseg (Section *sec, int n)
 
void cable_prop_assign (Symbol *sym, double *pd, int op)
 
double nrn_connection_position (Section *sec)
 
double nrn_section_orientation (Section *sec)
 
int nrn_at_beginning (Section *sec)
 
static void nrn_rootnode_alloc (Section *sec)
 
Sectionnrn_trueparent (Section *sec)
 
void nrn_parent_info (Section *s)
 
void setup_topology (void)
 
const char * secname (Section *sec)
 
const char * nrn_sec2pysecname (Section *sec)
 
void section_owner (void)
 
char * hoc_section_pathname (Section *sec)
 
double nrn_arc_position (Section *sec, Node *node)
 
const char * sec_and_position (Section *sec, Node *nd)
 
int segment_limits (double *pdx)
 
Nodenode_exact (Section *sec, double x)
 
Nodenode_ptr (Section *sec, double x, double *parea)
 
int nrn_get_mechtype (const char *mechname)
 
int nrn_instance_count (int mechtype)
 
double * nrn_vext_pd (Symbol *s, int indx, Node *nd)
 
double * dprop (Symbol *s, int indx, Section *sec, short inode)
 
double * nrnpy_dprop (Symbol *s, int indx, Section *sec, short inode, int *err)
 
static char * objectname (void)
 
void forall_section (void)
 
void hoc_ifsec (void)
 
void issection (void)
 
int has_membrane (char *mechanism_name, Section *sec)
 
void ismembrane (void)
 
const char * secaccessname (void)
 
void sectionname (void)
 
void hoc_secname (void)
 
static double chk_void2dbl (void *vp, const char *mes)
 
void this_section (void)
 
void this_node (void)
 
void parent_section (void)
 
void parent_connection (void)
 
void section_orientation (void)
 
void parent_node (void)
 
void pop_section (void)
 
void hoc_level_pushsec (Section *sec)
 
void push_section (void)
 
Sectionnrn_section_exists (char *name, int indx, Object *cell)
 
void section_exists (void)
 

Variables

int hoc_execerror_messages
 
int tree_changed = 1
 
int diam_changed = 1
 
int nrn_shape_changed_
 
int v_structure_change
 
char *(* nrnpy_pysec_name_p_ )(Section *)
 
Object *(* nrnpy_pysec_cell_p_ )(Section *)
 
int(* nrnpy_pysec_cell_equals_p_ )(Section *, Object *)
 
static Sectionsecstack [NSECSTACK+1]
 
static int isecstack = 0
 
static int skip_secstack_check = 0
 
int keep_nseg_parm_
 

Macro Definition Documentation

◆ CAB_SIZE

#define CAB_SIZE   10

◆ HOC_L_LIST

#define HOC_L_LIST   1

Definition at line 4 of file cabcode.cpp.

◆ NSECSTACK

#define NSECSTACK   200

Definition at line 42 of file cabcode.cpp.

◆ PI

#define PI   3.14159265358979323846

Definition at line 1938 of file cabcode.cpp.

◆ relative

#define relative (   pc)    (pc + (pc)->i)

Definition at line 2135 of file cabcode.cpp.

◆ symlist

#define symlist   hoc_symlist

Definition at line 17 of file cabcode.cpp.

Function Documentation

◆ add_section()

void add_section ( void  )

Definition at line 186 of file cabcode.cpp.

◆ arc0at0()

int arc0at0 ( Section sec)

Definition at line 399 of file cabcode.cpp.

◆ cab_alloc()

void cab_alloc ( Prop p)

Definition at line 407 of file cabcode.cpp.

◆ cable_prop_assign()

void cable_prop_assign ( Symbol sym,
double *  pd,
int  op 
)

Definition at line 1598 of file cabcode.cpp.

◆ cable_prop_eval()

double cable_prop_eval ( Symbol sym)

Definition at line 1518 of file cabcode.cpp.

◆ cable_prop_eval_pointer()

double* cable_prop_eval_pointer ( Symbol sym)

Definition at line 1536 of file cabcode.cpp.

◆ chk_access()

Section* chk_access ( void  )

Definition at line 444 of file cabcode.cpp.

◆ chk_void2dbl()

static double chk_void2dbl ( void vp,
const char *  mes 
)
static

Definition at line 2288 of file cabcode.cpp.

◆ connectpointer()

void connectpointer ( void  )

Definition at line 1125 of file cabcode.cpp.

◆ connectsec_impl()

static void connectsec_impl ( Section parent,
Section sec 
)
static

Definition at line 615 of file cabcode.cpp.

◆ connectsection()

void connectsection ( void  )

Definition at line 673 of file cabcode.cpp.

◆ delete_section()

void delete_section ( void  )

Definition at line 322 of file cabcode.cpp.

◆ disconnect()

void disconnect ( void  )

Definition at line 569 of file cabcode.cpp.

◆ dprop()

double* dprop ( Symbol s,
int  indx,
Section sec,
short  inode 
)

Definition at line 2061 of file cabcode.cpp.

◆ forall_section()

void forall_section ( void  )

Definition at line 2137 of file cabcode.cpp.

◆ has_membrane()

int has_membrane ( char *  mechanism_name,
Section sec 
)

Definition at line 2236 of file cabcode.cpp.

◆ hoc_getdata_range()

Prop* hoc_getdata_range ( int  type)

Definition at line 1107 of file cabcode.cpp.

◆ hoc_ifsec()

void hoc_ifsec ( void  )

Definition at line 2211 of file cabcode.cpp.

◆ hoc_level_pushsec()

void hoc_level_pushsec ( Section sec)

Definition at line 2369 of file cabcode.cpp.

◆ hoc_sec_internal_push()

void hoc_sec_internal_push ( void  )

Definition at line 757 of file cabcode.cpp.

◆ hoc_secname()

void hoc_secname ( void  )

Definition at line 2273 of file cabcode.cpp.

◆ hoc_section_pathname()

char* hoc_section_pathname ( Section sec)

Definition at line 1835 of file cabcode.cpp.

◆ ismembrane()

void ismembrane ( void  )

Definition at line 2248 of file cabcode.cpp.

◆ issection()

void issection ( void  )

Definition at line 2227 of file cabcode.cpp.

◆ keep_nseg_parm()

void keep_nseg_parm ( void  )

Definition at line 1550 of file cabcode.cpp.

◆ mech_access()

void mech_access ( void  )

Definition at line 843 of file cabcode.cpp.

◆ mech_insert1()

void mech_insert1 ( Section sec,
int  type 
)

Definition at line 849 of file cabcode.cpp.

◆ mech_uninsert()

void mech_uninsert ( void  )

Definition at line 910 of file cabcode.cpp.

◆ mech_uninsert1()

void mech_uninsert1 ( Section sec,
Symbol s 
)

Definition at line 916 of file cabcode.cpp.

◆ morph_alloc()

void morph_alloc ( Prop p)

Definition at line 423 of file cabcode.cpp.

◆ ncp_abs()

static double ncp_abs ( Section sec)
static

Definition at line 519 of file cabcode.cpp.

◆ new_section()

static Section* new_section ( Object ob,
Symbol sym,
int  i 
)
static

Definition at line 259 of file cabcode.cpp.

◆ new_sections()

void new_sections ( Object ob,
Symbol sym,
Item **  pitm,
int  size 
)

Definition at line 289 of file cabcode.cpp.

◆ node_exact()

Node* node_exact ( Section sec,
double  x 
)

Definition at line 1940 of file cabcode.cpp.

◆ node_index()

int node_index ( Section sec,
double  x 
)

Definition at line 1471 of file cabcode.cpp.

◆ node_index_exact()

int node_index_exact ( Section sec,
double  x 
)

Definition at line 1497 of file cabcode.cpp.

◆ node_ptr()

Node* node_ptr ( Section sec,
double  x,
double *  parea 
)

Definition at line 1986 of file cabcode.cpp.

◆ nrn_add_sibling_list()

void nrn_add_sibling_list ( Section sec)

Definition at line 529 of file cabcode.cpp.

◆ nrn_arc_position()

double nrn_arc_position ( Section sec,
Node node 
)

Definition at line 1867 of file cabcode.cpp.

◆ nrn_at_beginning()

int nrn_at_beginning ( Section sec)

Definition at line 1648 of file cabcode.cpp.

◆ nrn_change_nseg()

void nrn_change_nseg ( Section sec,
int  n 
)

Definition at line 1557 of file cabcode.cpp.

◆ nrn_chk_section()

void nrn_chk_section ( Symbol s)

Definition at line 438 of file cabcode.cpp.

◆ nrn_connection_position()

double nrn_connection_position ( Section sec)

Definition at line 1639 of file cabcode.cpp.

◆ nrn_diameter()

double nrn_diameter ( Node nd)

Definition at line 432 of file cabcode.cpp.

◆ nrn_disconnect()

void nrn_disconnect ( Section sec)

Definition at line 594 of file cabcode.cpp.

◆ nrn_exists()

int nrn_exists ( Symbol s,
Node node 
)

Definition at line 1319 of file cabcode.cpp.

◆ nrn_get_mechtype()

int nrn_get_mechtype ( const char *  mechname)

Definition at line 2000 of file cabcode.cpp.

◆ nrn_initcode()

void nrn_initcode ( void  )

Definition at line 76 of file cabcode.cpp.

◆ nrn_instance_count()

int nrn_instance_count ( int  mechtype)

Definition at line 2012 of file cabcode.cpp.

◆ nrn_isecstack()

int nrn_isecstack ( void  )

Definition at line 54 of file cabcode.cpp.

◆ nrn_mechanism()

Prop* nrn_mechanism ( int  type,
Node nd 
)

Definition at line 1079 of file cabcode.cpp.

◆ nrn_mechanism_check()

Prop* nrn_mechanism_check ( int  type,
Section sec,
int  inode 
)

Definition at line 1092 of file cabcode.cpp.

◆ nrn_noerr_access()

Section* nrn_noerr_access ( void  )

Definition at line 472 of file cabcode.cpp.

◆ nrn_parent_info()

void nrn_parent_info ( Section s)

Definition at line 1678 of file cabcode.cpp.

◆ nrn_popsec()

void nrn_popsec ( void  )

Definition at line 123 of file cabcode.cpp.

◆ nrn_pushsec()

void nrn_pushsec ( Section sec)

Definition at line 99 of file cabcode.cpp.

◆ nrn_ra()

double nrn_ra ( Section sec)

Definition at line 403 of file cabcode.cpp.

◆ nrn_rangeconst()

void nrn_rangeconst ( Section sec,
Symbol s,
double *  pd,
int  op 
)

Definition at line 958 of file cabcode.cpp.

◆ nrn_rangepointer()

double* nrn_rangepointer ( Section sec,
Symbol s,
double  d 
)

Definition at line 1335 of file cabcode.cpp.

◆ nrn_remove_sibling_list()

void nrn_remove_sibling_list ( Section sec)

Definition at line 503 of file cabcode.cpp.

◆ nrn_rootnode_alloc()

static void nrn_rootnode_alloc ( Section sec)
static

Definition at line 1653 of file cabcode.cpp.

◆ nrn_sec2cell()

Object* nrn_sec2cell ( Section sec)

Definition at line 233 of file cabcode.cpp.

◆ nrn_sec2cell_equals()

int nrn_sec2cell_equals ( Section sec,
Object obj 
)

Definition at line 248 of file cabcode.cpp.

◆ nrn_sec2pysecname()

const char* nrn_sec2pysecname ( Section sec)

Definition at line 1811 of file cabcode.cpp.

◆ nrn_sec_pop()

Section* nrn_sec_pop ( void  )

Definition at line 751 of file cabcode.cpp.

◆ nrn_secstack()

void nrn_secstack ( int  i)

Definition at line 58 of file cabcode.cpp.

◆ nrn_section_exists()

Section* nrn_section_exists ( char *  name,
int  indx,
Object cell 
)

Definition at line 2404 of file cabcode.cpp.

◆ nrn_section_orientation()

double nrn_section_orientation ( Section sec)

Definition at line 1644 of file cabcode.cpp.

◆ nrn_trueparent()

Section* nrn_trueparent ( Section sec)

Definition at line 1666 of file cabcode.cpp.

◆ nrn_vext_pd()

double* nrn_vext_pd ( Symbol s,
int  indx,
Node nd 
)

Definition at line 2027 of file cabcode.cpp.

◆ nrnpy_dprop()

double* nrnpy_dprop ( Symbol s,
int  indx,
Section sec,
short  inode,
int *  err 
)

Definition at line 2092 of file cabcode.cpp.

◆ nrnpy_rangepointer()

double* nrnpy_rangepointer ( Section sec,
Symbol s,
double  d,
int *  err 
)

Definition at line 1375 of file cabcode.cpp.

◆ ob_sec_access()

void ob_sec_access ( void  )

Definition at line 831 of file cabcode.cpp.

◆ ob_sec_access_push()

void ob_sec_access_push ( Item qsec)

Definition at line 824 of file cabcode.cpp.

◆ objectname()

static char* objectname ( void  )
static

Definition at line 2125 of file cabcode.cpp.

◆ oc_restore_cabcode()

void oc_restore_cabcode ( int *  a1,
int *  a2 
)

Definition at line 91 of file cabcode.cpp.

◆ oc_save_cabcode()

void oc_save_cabcode ( int *  a1,
int *  a2 
)

Definition at line 86 of file cabcode.cpp.

◆ parent_connection()

void parent_connection ( void  )

Definition at line 2335 of file cabcode.cpp.

◆ parent_node()

void parent_node ( void  )

Definition at line 2347 of file cabcode.cpp.

◆ parent_section()

void parent_section ( void  )

Definition at line 2327 of file cabcode.cpp.

◆ pdprop()

static Datum* pdprop ( Symbol s,
int  indx,
Section sec,
short  inode 
)
static

Definition at line 1117 of file cabcode.cpp.

◆ pop_section()

void pop_section ( void  )

Definition at line 2356 of file cabcode.cpp.

◆ push_section()

void push_section ( void  )

Definition at line 2374 of file cabcode.cpp.

◆ range_const()

void range_const ( void  )

Definition at line 1053 of file cabcode.cpp.

◆ range_interpolate()

void range_interpolate ( void  )

Definition at line 1195 of file cabcode.cpp.

◆ range_interpolate_single()

void range_interpolate_single ( void  )

Definition at line 1153 of file cabcode.cpp.

◆ range_vec_indx()

static int range_vec_indx ( Symbol s)
static

Definition at line 1068 of file cabcode.cpp.

◆ rangepoint()

void rangepoint ( void  )

Definition at line 1465 of file cabcode.cpp.

◆ rangevareval()

void rangevareval ( void  )

Definition at line 1456 of file cabcode.cpp.

◆ rangevarevalpointer()

void rangevarevalpointer ( void  )

Definition at line 1410 of file cabcode.cpp.

◆ reverse_nodes()

static void reverse_nodes ( Section sec)
static

Definition at line 581 of file cabcode.cpp.

◆ reverse_sibling_list()

static void reverse_sibling_list ( Section sec)
static

Definition at line 552 of file cabcode.cpp.

◆ Sec_access()

static Section* Sec_access ( void  )
static

Definition at line 681 of file cabcode.cpp.

◆ sec_access()

void sec_access ( void  )

Definition at line 718 of file cabcode.cpp.

◆ sec_access_object()

void sec_access_object ( void  )

Definition at line 730 of file cabcode.cpp.

◆ sec_access_pop()

void sec_access_pop ( void  )

Definition at line 145 of file cabcode.cpp.

◆ sec_access_push()

void sec_access_push ( void  )

Definition at line 747 of file cabcode.cpp.

◆ sec_and_position()

const char* sec_and_position ( Section sec,
Node nd 
)

Definition at line 1908 of file cabcode.cpp.

◆ secaccessname()

const char* secaccessname ( void  )

Definition at line 2257 of file cabcode.cpp.

◆ secname()

const char* secname ( Section sec)

Definition at line 1776 of file cabcode.cpp.

◆ section_exists()

void section_exists ( void  )

Definition at line 2438 of file cabcode.cpp.

◆ section_length()

double section_length ( Section sec)

Definition at line 387 of file cabcode.cpp.

◆ section_orientation()

void section_orientation ( void  )

Definition at line 2341 of file cabcode.cpp.

◆ section_owner()

void section_owner ( void  )

Definition at line 1826 of file cabcode.cpp.

◆ sectionname()

void sectionname ( void  )

Definition at line 2261 of file cabcode.cpp.

◆ segment_limits()

int segment_limits ( double *  pdx)

Definition at line 1919 of file cabcode.cpp.

◆ setup_topology()

void setup_topology ( void  )

Definition at line 1724 of file cabcode.cpp.

◆ simpleconnectsection()

void simpleconnectsection ( void  )

Definition at line 664 of file cabcode.cpp.

◆ this_node()

void this_node ( void  )

Definition at line 2317 of file cabcode.cpp.

◆ this_section()

void this_section ( void  )

Definition at line 2309 of file cabcode.cpp.

Variable Documentation

◆ diam_changed

int diam_changed = 1

Definition at line 23 of file cabcode.cpp.

◆ hoc_execerror_messages

int hoc_execerror_messages
extern

Definition at line 680 of file hoc.cpp.

◆ isecstack

int isecstack = 0
static

Definition at line 44 of file cabcode.cpp.

◆ keep_nseg_parm_

int keep_nseg_parm_

Definition at line 1549 of file cabcode.cpp.

◆ nrn_shape_changed_

int nrn_shape_changed_
extern

Definition at line 33 of file neuron.h.

◆ nrnpy_pysec_cell_equals_p_

int(* nrnpy_pysec_cell_equals_p_) (Section *, Object *) ( Section ,
Object  
)

Definition at line 31 of file cabcode.cpp.

◆ nrnpy_pysec_cell_p_

Object*(* nrnpy_pysec_cell_p_) (Section *) ( Section )

Definition at line 30 of file cabcode.cpp.

◆ nrnpy_pysec_name_p_

char*(* nrnpy_pysec_name_p_) (Section *) ( Section )

Definition at line 29 of file cabcode.cpp.

◆ secstack

Section* secstack[NSECSTACK+1]
static

Definition at line 43 of file cabcode.cpp.

◆ skip_secstack_check

int skip_secstack_check = 0
static

Definition at line 50 of file cabcode.cpp.

◆ tree_changed

int tree_changed = 1

Definition at line 19 of file cabcode.cpp.

◆ v_structure_change

int v_structure_change
extern

Definition at line 99 of file cvodestb.cpp.