NEURON
nrnpy_nrn.cpp File Reference
#include <nrnpython.h>
#include <structmember.h>
#include <InterViews/resource.h>
#include <nrnoc2iv.h>
#include "nrnpy_utils.h"
#include <cmath>
#include <membfunc.h>
#include <parse.hpp>
#include "nrnpy_nrn.h"

Go to the source code of this file.

Classes

struct  NPySecObj
 
struct  NPyAllSegOfSecIter
 
struct  NPySegOfSecIter
 
struct  NPySegObj
 
struct  NPyMechOfSegIter
 
struct  NPyMechObj
 
struct  NPyVarOfMechIter
 
struct  NPyRVItr
 
struct  NPyRangeVar
 

Macros

#define M_PI   (3.14159265358979323846)
 

Functions

void nrn_pt3dremove (Section *sec, int i0)
 
void nrn_pt3dinsert (Section *sec, int i0, double x, double y, double z, double d)
 
void nrn_pt3dclear (Section *sec, int req)
 
void nrn_pt3dchange1 (Section *sec, int i, double d)
 
void nrn_pt3dchange2 (Section *sec, int i, double x, double y, double z, double diam)
 
void stor_pt3d (Section *sec, double x, double y, double z, double d)
 
void nrn_pt3dstyle1 (Section *sec, double x, double y, double z)
 
void nrn_pt3dstyle0 (Section *sec)
 
void nrn_area_ri (Section *sec)
 
void sec_free (hoc_Item *)
 
Sectionnrn_noerr_access ()
 
double * nrnpy_rangepointer (Section *, Symbol *, double, int *)
 
PyObject * nrn_ptr_richcmp (void *self_ptr, void *other_ptr, int op)
 
int has_membrane (char *, Section *)
 
NPySecObjnewpysechelp (Section *sec)
 
Sectionnrnpy_newsection (NPySecObj *)
 
void simpleconnectsection ()
 
void nrn_change_nseg (Section *, int)
 
double section_length (Section *)
 
double nrn_ra (Section *)
 
int can_change_morph (Section *)
 
void nrn_diam_change (Section *)
 
void nrn_length_change (Section *, double)
 
void mech_insert1 (Section *, int)
 
void mech_uninsert1 (Section *, Symbol *)
 
PyObject * nrn_hocobj_ptr (double *)
 
int nrn_is_hocobj_ptr (PyObject *, double *&)
 
PyObject * nrnpy_forall (PyObject *self, PyObject *args)
 
Objectnrnpy_po2ho (PyObject *)
 
Objectnrnpy_pyobject_in_obj (PyObject *)
 
int nrnpy_ho_eq_po (Object *, PyObject *)
 
PyObject * nrnpy_hoc2pyobject (Object *)
 
PyObject * nrnpy_ho2po (Object *)
 
static void nrnpy_reg_mech (int)
 
static int ob_is_seg (Object *)
 
static Objectseg_from_sec_x (Section *, double x)
 
static Sectiono2sec (Object *)
 
static void o2loc (Object *, Section **, double *)
 
static void nrnpy_unreg_mech (int)
 
static char * pysec_name (Section *)
 
static Objectpysec_cell (Section *)
 
static PyObject * pysec2cell (NPySecObj *)
 
static int pysec_cell_equals (Section *, Object *)
 
static void remake_pmech_types ()
 
void nrnpy_sec_referr ()
 
static int NPySecObj_contains (PyObject *sec, PyObject *obj)
 
static void NPySecObj_dealloc (NPySecObj *self)
 
static void NPyAllSegOfSecIter_dealloc (NPyAllSegOfSecIter *self)
 
static void NPySegOfSecIter_dealloc (NPySegOfSecIter *self)
 
static void NPySegObj_dealloc (NPySegObj *self)
 
static void NPyRangeVar_dealloc (NPyRangeVar *self)
 
static void NPyMechObj_dealloc (NPyMechObj *self)
 
static void NPyMechOfSegIter_dealloc (NPyMechOfSegIter *self)
 
static void NPyVarOfMechIter_dealloc (NPyVarOfMechIter *self)
 
static int NPySecObj_init (NPySecObj *self, PyObject *args, PyObject *kwds)
 
static int NPyAllSegOfSecIter_init (NPyAllSegOfSecIter *self, PyObject *args, PyObject *kwds)
 
PyObject * NPySecObj_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
PyObject * NPyAllSegOfSecIter_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
PyObject * nrnpy_newsecobj (PyObject *self, PyObject *args, PyObject *kwds)
 
static PyObject * NPySegObj_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
static PyObject * NPyMechObj_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
static PyObject * NPyRangeVar_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
static int NPySegObj_init (NPySegObj *self, PyObject *args, PyObject *kwds)
 
static void o2loc2 (Object *o, Section **psec, double *px)
 
static int NPyMechObj_init (NPyMechObj *self, PyObject *args, PyObject *kwds)
 
static int NPyRangeVar_init (NPyRangeVar *self, PyObject *args, PyObject *kwds)
 
static PyObject * NPySecObj_name (NPySecObj *self)
 
static PyObject * NPySecObj_n3d (NPySecObj *self)
 
static PyObject * NPySecObj_pt3dremove (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_pt3dclear (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_pt3dchange (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_pt3dinsert (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_pt3dadd (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_pt3dstyle (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_x3d (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_y3d (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_z3d (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_arc3d (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_diam3d (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_spine3d (NPySecObj *self, PyObject *args)
 
static PyObject * pysec_repr (PyObject *p)
 
static PyObject * pyseg_repr (PyObject *p)
 
static PyObject * hoc_internal_name (NPySecObj *self)
 
static PyObject * nrnpy_set_psection (PyObject *self, PyObject *args)
 
static PyObject * NPySecObj_psection (NPySecObj *self)
 
static PyObject * is_pysec (NPySecObj *self)
 
static PyObject * newpyseghelp (Section *sec, double x)
 
static PyObject * pysec_disconnect (NPySecObj *self)
 
static PyObject * pysec_parentseg (NPySecObj *self)
 
static PyObject * pysec_trueparentseg (NPySecObj *self)
 
static PyObject * pysec_orientation (NPySecObj *self)
 
static bool lappendsec (PyObject *const sl, Section *const s)
 
static PyObject * pysec_children1 (PyObject *const sl, Section *const sec)
 
static PyObject * pysec_children (NPySecObj *const self)
 
static PyObject * pysec_subtree1 (PyObject *const sl, Section *const sec)
 
static PyObject * pysec_subtree (NPySecObj *const self)
 
static PyObject * pysec_wholetree (NPySecObj *const self)
 
static long pysec_hash (PyObject *self)
 
static long pyseg_hash (PyObject *self)
 
static PyObject * pyseg_richcmp (NPySegObj *self, PyObject *other, int op)
 
static PyObject * pysec_richcmp (NPySecObj *self, PyObject *other, int op)
 
static PyObject * pysec_same (NPySecObj *self, PyObject *args)
 
static PyObject * NPyMechObj_name (NPyMechObj *self)
 
static PyObject * NPyMechObj_is_ion (NPyMechObj *self)
 
static PyObject * NPyMechObj_segment (NPyMechObj *self)
 
static PyObject * pymech_repr (PyObject *p)
 
static PyObject * NPyRangeVar_name (NPyRangeVar *self)
 
static PyObject * NPyRangeVar_mech (NPyRangeVar *self)
 
static PyObject * NPySecObj_connect (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_insert (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_uninsert (NPySecObj *self, PyObject *args)
 
static PyObject * NPySecObj_has_membrane (NPySecObj *self, PyObject *args)
 
PyObject * nrnpy_pushsec (PyObject *sec)
 
static PyObject * NPySecObj_push (NPySecObj *self, PyObject *args)
 
static PyObject * seg_of_section_iter (NPySecObj *self)
 
static PyObject * allseg (NPySecObj *self)
 
static PyObject * allseg_of_sec_iter (NPyAllSegOfSecIter *self)
 
static PyObject * allseg_of_sec_next (NPyAllSegOfSecIter *self)
 
static PyObject * seg_of_sec_next (NPySegOfSecIter *self)
 
static PyObject * seg_point_processes (NPySegObj *self)
 
static PyObject * node_index1 (NPySegObj *self)
 
static PyObject * seg_area (NPySegObj *self)
 
static double scaled_frustum_volume (double length, double d0, double d1)
 
static double interpolate (double x0, double x1, double y0, double y1, double xnew)
 
static int arg_bisect_arc3d (Section *sec, int npt3d, double x)
 
static PyObject * seg_volume (NPySegObj *self)
 
static PyObject * seg_ri (NPySegObj *self)
 
static Propmech_of_segment_prop (Prop *p)
 
static PyObject * mech_of_segment_iter (NPySegObj *self)
 
static Object ** pp_get_segment (void *vptr)
 
static void rv_noexist (Section *sec, const char *n, double x, int err)
 
static NPyRangeVarrvnew (Symbol *sym, NPySecObj *sec, double x)
 
static PyObject * section_getattro (NPySecObj *self, PyObject *pyname)
 
static int section_setattro (NPySecObj *self, PyObject *pyname, PyObject *value)
 
static PyObject * mech_of_seg_next (NPyMechOfSegIter *self)
 
static PyObject * var_of_mech_iter (NPyMechObj *self)
 
static PyObject * var_of_mech_next (NPyVarOfMechIter *self)
 
static PyObject * segment_getattro (NPySegObj *self, PyObject *pyname)
 
int nrn_pointer_assign (Prop *prop, Symbol *sym, PyObject *value)
 
static int segment_setattro (NPySegObj *self, PyObject *pyname, PyObject *value)
 
static bool striptrail (char *buf, int sz, const char *n, const char *m)
 
static PyObject * mech_getattro (NPyMechObj *self, PyObject *pyname)
 
static int mech_setattro (NPyMechObj *self, PyObject *pyname, PyObject *value)
 
double ** nrnpy_setpointer_helper (PyObject *pyname, PyObject *mech)
 
static PyObject * NPySecObj_call (NPySecObj *self, PyObject *args)
 
static Py_ssize_t rv_len (PyObject *self)
 
static PyObject * rv_getitem (PyObject *self, Py_ssize_t ix)
 
static int rv_setitem (PyObject *self, Py_ssize_t ix, PyObject *value)
 
static char * cpstr (const char *s)
 
PyObject * nrnpy_cas (PyObject *self, PyObject *args)
 
static void rangevars_add (Symbol *sym)
 
PyObject * nrnpy_nrn (void)
 

Variables

Symlisthoc_built_in_symlist
 
PyTypeObject * psection_type
 
static PyTypeObject * pallseg_of_sec_iter_type
 
static PyTypeObject * pseg_of_sec_iter_type
 
static PyTypeObject * psegment_type
 
static PyTypeObject * pmech_of_seg_iter_generic_type
 
static PyTypeObject * pmech_generic_type
 
static PyTypeObject * pvar_of_mech_iter_generic_type
 
static PyTypeObject * range_type
 
PyObject * pmech_types
 
PyObject * rangevars_
 
PyTypeObject * hocobject_type
 
short * nrn_is_artificial_
 
cTemplate ** nrn_pnt_template_
 
int diam_changed
 
Symbolnrnpy_pyobj_sym_
 
void(* nrnpy_reg_mech_p_ )(int)
 
int(* nrnpy_ob_is_seg )(Object *)
 
Object *(* nrnpy_seg_from_sec_x )(Section *, double x)
 
Section *(* nrnpy_o2sec_p_ )(Object *)
 
void(* nrnpy_o2loc_p_ )(Object *, Section **, double *)
 
void(* nrnpy_o2loc2_p_ )(Object *, Section **, double *)
 
char *(* nrnpy_pysec_name_p_ )(Section *)
 
Object *(* nrnpy_pysec_cell_p_ )(Section *)
 
int(* nrnpy_pysec_cell_equals_p_ )(Section *, Object *)
 
static PyObject * nrnpy_psection
 
static PyMethodDef NPySecObj_methods []
 
static PyMethodDef NPySegObj_methods []
 
static PyMemberDef NPySegObj_members []
 
static PyMethodDef NPyMechObj_methods []
 
static PyMethodDef NPyRangeVar_methods []
 
static PyMemberDef NPyMechObj_members [] = {{NULL}}
 
static PyMethodDef nrnpy_methods []
 
static PyObject * nrnmodule_
 

Macro Definition Documentation

◆ M_PI

#define M_PI   (3.14159265358979323846)

Definition at line 9 of file nrnpy_nrn.cpp.

Function Documentation

◆ allseg()

static PyObject* allseg ( NPySecObj self)
static

Definition at line 1300 of file nrnpy_nrn.cpp.

◆ allseg_of_sec_iter()

static PyObject* allseg_of_sec_iter ( NPyAllSegOfSecIter self)
static

Definition at line 1310 of file nrnpy_nrn.cpp.

◆ allseg_of_sec_next()

static PyObject* allseg_of_sec_next ( NPyAllSegOfSecIter self)
static

Definition at line 1316 of file nrnpy_nrn.cpp.

◆ arg_bisect_arc3d()

static int arg_bisect_arc3d ( Section sec,
int  npt3d,
double  x 
)
static

Definition at line 1417 of file nrnpy_nrn.cpp.

◆ can_change_morph()

int can_change_morph ( Section )

Definition at line 1245 of file treeset.cpp.

◆ cpstr()

static char* cpstr ( const char *  s)
static

Definition at line 2355 of file nrnpy_nrn.cpp.

◆ has_membrane()

int has_membrane ( char *  ,
Section  
)

Definition at line 2246 of file cabcode.cpp.

◆ hoc_internal_name()

static PyObject* hoc_internal_name ( NPySecObj self)
static

Definition at line 824 of file nrnpy_nrn.cpp.

◆ interpolate()

static double interpolate ( double  x0,
double  x1,
double  y0,
double  y1,
double  xnew 
)
inlinestatic

Definition at line 1406 of file nrnpy_nrn.cpp.

◆ is_pysec()

static PyObject* is_pysec ( NPySecObj self)
static

Definition at line 863 of file nrnpy_nrn.cpp.

◆ lappendsec()

static bool lappendsec ( PyObject *const  sl,
Section *const  s 
)
static

Definition at line 948 of file nrnpy_nrn.cpp.

◆ mech_getattro()

static PyObject* mech_getattro ( NPyMechObj self,
PyObject *  pyname 
)
static

Definition at line 2027 of file nrnpy_nrn.cpp.

◆ mech_insert1()

void mech_insert1 ( Section ,
int   
)

Definition at line 845 of file cabcode.cpp.

◆ mech_of_seg_next()

static PyObject* mech_of_seg_next ( NPyMechOfSegIter self)
static

Definition at line 1744 of file nrnpy_nrn.cpp.

◆ mech_of_segment_iter()

static PyObject* mech_of_segment_iter ( NPySegObj self)
static

Definition at line 1519 of file nrnpy_nrn.cpp.

◆ mech_of_segment_prop()

static Prop* mech_of_segment_prop ( Prop p)
static

Definition at line 1502 of file nrnpy_nrn.cpp.

◆ mech_setattro()

static int mech_setattro ( NPyMechObj self,
PyObject *  pyname,
PyObject *  value 
)
static

Definition at line 2094 of file nrnpy_nrn.cpp.

◆ mech_uninsert1()

void mech_uninsert1 ( Section ,
Symbol  
)

Definition at line 913 of file cabcode.cpp.

◆ newpysechelp()

NPySecObj* newpysechelp ( Section sec)

Definition at line 871 of file nrnpy_nrn.cpp.

◆ newpyseghelp()

static PyObject* newpyseghelp ( Section sec,
double  x 
)
static

Definition at line 890 of file nrnpy_nrn.cpp.

◆ node_index1()

static PyObject* node_index1 ( NPySegObj self)
static

Definition at line 1377 of file nrnpy_nrn.cpp.

◆ NPyAllSegOfSecIter_dealloc()

static void NPyAllSegOfSecIter_dealloc ( NPyAllSegOfSecIter self)
static

Definition at line 224 of file nrnpy_nrn.cpp.

◆ NPyAllSegOfSecIter_init()

static int NPyAllSegOfSecIter_init ( NPyAllSegOfSecIter self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 333 of file nrnpy_nrn.cpp.

◆ NPyAllSegOfSecIter_new()

PyObject* NPyAllSegOfSecIter_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 361 of file nrnpy_nrn.cpp.

◆ NPyMechObj_dealloc()

static void NPyMechObj_dealloc ( NPyMechObj self)
static

Definition at line 248 of file nrnpy_nrn.cpp.

◆ NPyMechObj_init()

static int NPyMechObj_init ( NPyMechObj self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 542 of file nrnpy_nrn.cpp.

◆ NPyMechObj_is_ion()

static PyObject* NPyMechObj_is_ion ( NPyMechObj self)
static

Definition at line 1089 of file nrnpy_nrn.cpp.

◆ NPyMechObj_name()

static PyObject* NPyMechObj_name ( NPyMechObj self)
static

Definition at line 1080 of file nrnpy_nrn.cpp.

◆ NPyMechObj_new()

static PyObject* NPyMechObj_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 404 of file nrnpy_nrn.cpp.

◆ NPyMechObj_segment()

static PyObject* NPyMechObj_segment ( NPyMechObj self)
static

Definition at line 1097 of file nrnpy_nrn.cpp.

◆ NPyMechOfSegIter_dealloc()

static void NPyMechOfSegIter_dealloc ( NPyMechOfSegIter self)
static

Definition at line 254 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_dealloc()

static void NPyRangeVar_dealloc ( NPyRangeVar self)
static

Definition at line 242 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_init()

static int NPyRangeVar_init ( NPyRangeVar self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 555 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_mech()

static PyObject* NPyRangeVar_mech ( NPyRangeVar self)
static

Definition at line 1133 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_name()

static PyObject* NPyRangeVar_name ( NPyRangeVar self)
static

Definition at line 1116 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_new()

static PyObject* NPyRangeVar_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 421 of file nrnpy_nrn.cpp.

◆ NPySecObj_arc3d()

static PyObject* NPySecObj_arc3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 749 of file nrnpy_nrn.cpp.

◆ NPySecObj_call()

static PyObject* NPySecObj_call ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 2169 of file nrnpy_nrn.cpp.

◆ NPySecObj_connect()

static PyObject* NPySecObj_connect ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1143 of file nrnpy_nrn.cpp.

◆ NPySecObj_contains()

static int NPySecObj_contains ( PyObject *  sec,
PyObject *  obj 
)
static

Definition at line 173 of file nrnpy_nrn.cpp.

◆ NPySecObj_dealloc()

static void NPySecObj_dealloc ( NPySecObj self)
static

Definition at line 204 of file nrnpy_nrn.cpp.

◆ NPySecObj_diam3d()

static PyObject* NPySecObj_diam3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 766 of file nrnpy_nrn.cpp.

◆ NPySecObj_has_membrane()

static PyObject* NPySecObj_has_membrane ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1258 of file nrnpy_nrn.cpp.

◆ NPySecObj_init()

static int NPySecObj_init ( NPySecObj self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 276 of file nrnpy_nrn.cpp.

◆ NPySecObj_insert()

static PyObject* NPySecObj_insert ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1189 of file nrnpy_nrn.cpp.

◆ NPySecObj_n3d()

static PyObject* NPySecObj_n3d ( NPySecObj self)
static

Definition at line 565 of file nrnpy_nrn.cpp.

◆ NPySecObj_name()

static PyObject* NPySecObj_name ( NPySecObj self)
static

Definition at line 559 of file nrnpy_nrn.cpp.

◆ NPySecObj_new()

PyObject* NPySecObj_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 348 of file nrnpy_nrn.cpp.

◆ NPySecObj_psection()

static PyObject* NPySecObj_psection ( NPySecObj self)
static

Definition at line 851 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dadd()

static PyObject* NPySecObj_pt3dadd ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 652 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dchange()

static PyObject* NPySecObj_pt3dchange ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 604 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dclear()

static PyObject* NPySecObj_pt3dclear ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 586 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dinsert()

static PyObject* NPySecObj_pt3dinsert ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 636 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dremove()

static PyObject* NPySecObj_pt3dremove ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 570 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dstyle()

static PyObject* NPySecObj_pt3dstyle ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 664 of file nrnpy_nrn.cpp.

◆ NPySecObj_push()

static PyObject* NPySecObj_push ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1278 of file nrnpy_nrn.cpp.

◆ NPySecObj_spine3d()

static PyObject* NPySecObj_spine3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 783 of file nrnpy_nrn.cpp.

◆ NPySecObj_uninsert()

static PyObject* NPySecObj_uninsert ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1233 of file nrnpy_nrn.cpp.

◆ NPySecObj_x3d()

static PyObject* NPySecObj_x3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 701 of file nrnpy_nrn.cpp.

◆ NPySecObj_y3d()

static PyObject* NPySecObj_y3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 717 of file nrnpy_nrn.cpp.

◆ NPySecObj_z3d()

static PyObject* NPySecObj_z3d ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 733 of file nrnpy_nrn.cpp.

◆ NPySegObj_dealloc()

static void NPySegObj_dealloc ( NPySegObj self)
static

Definition at line 236 of file nrnpy_nrn.cpp.

◆ NPySegObj_init()

static int NPySegObj_init ( NPySegObj self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 434 of file nrnpy_nrn.cpp.

◆ NPySegObj_new()

static PyObject* NPySegObj_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 379 of file nrnpy_nrn.cpp.

◆ NPySegOfSecIter_dealloc()

static void NPySegOfSecIter_dealloc ( NPySegOfSecIter self)
static

Definition at line 230 of file nrnpy_nrn.cpp.

◆ NPyVarOfMechIter_dealloc()

static void NPyVarOfMechIter_dealloc ( NPyVarOfMechIter self)
static

Definition at line 260 of file nrnpy_nrn.cpp.

◆ nrn_area_ri()

void nrn_area_ri ( Section sec)

Definition at line 773 of file treeset.cpp.

◆ nrn_change_nseg()

void nrn_change_nseg ( Section ,
int   
)

Definition at line 1561 of file cabcode.cpp.

◆ nrn_diam_change()

void nrn_diam_change ( Section )

Definition at line 1201 of file treeset.cpp.

◆ nrn_hocobj_ptr()

PyObject* nrn_hocobj_ptr ( double *  )

Definition at line 881 of file nrnpy_hoc.cpp.

◆ nrn_is_hocobj_ptr()

int nrn_is_hocobj_ptr ( PyObject *  ,
double *&   
)

Definition at line 889 of file nrnpy_hoc.cpp.

◆ nrn_length_change()

void nrn_length_change ( Section ,
double   
)

Definition at line 1220 of file treeset.cpp.

◆ nrn_noerr_access()

Section* nrn_noerr_access ( )

Definition at line 464 of file cabcode.cpp.

◆ nrn_pointer_assign()

int nrn_pointer_assign ( Prop prop,
Symbol sym,
PyObject *  value 
)

Definition at line 1913 of file nrnpy_nrn.cpp.

◆ nrn_pt3dchange1()

void nrn_pt3dchange1 ( Section sec,
int  i,
double  d 
)

Definition at line 1149 of file treeset.cpp.

◆ nrn_pt3dchange2()

void nrn_pt3dchange2 ( Section sec,
int  i,
double  x,
double  y,
double  z,
double  diam 
)

Definition at line 1156 of file treeset.cpp.

◆ nrn_pt3dclear()

void nrn_pt3dclear ( Section sec,
int  req 
)

Definition at line 1103 of file treeset.cpp.

◆ nrn_pt3dinsert()

void nrn_pt3dinsert ( Section sec,
int  i0,
double  x,
double  y,
double  z,
double  d 
)

Definition at line 1120 of file treeset.cpp.

◆ nrn_pt3dremove()

void nrn_pt3dremove ( Section sec,
int  i0 
)

Definition at line 1177 of file treeset.cpp.

◆ nrn_pt3dstyle0()

void nrn_pt3dstyle0 ( Section sec)

Definition at line 993 of file treeset.cpp.

◆ nrn_pt3dstyle1()

void nrn_pt3dstyle1 ( Section sec,
double  x,
double  y,
double  z 
)

Definition at line 1002 of file treeset.cpp.

◆ nrn_ptr_richcmp()

PyObject* nrn_ptr_richcmp ( void self_ptr,
void other_ptr,
int  op 
)

Definition at line 2104 of file nrnpy_hoc.cpp.

◆ nrn_ra()

double nrn_ra ( Section )

Definition at line 392 of file cabcode.cpp.

◆ nrnpy_cas()

PyObject* nrnpy_cas ( PyObject *  self,
PyObject *  args 
)

Definition at line 2385 of file nrnpy_nrn.cpp.

◆ nrnpy_forall()

PyObject* nrnpy_forall ( PyObject *  self,
PyObject *  args 
)

Definition at line 1585 of file nrnpy_hoc.cpp.

◆ nrnpy_ho2po()

PyObject* nrnpy_ho2po ( Object )

Definition at line 503 of file nrnpy_hoc.cpp.

◆ nrnpy_ho_eq_po()

int nrnpy_ho_eq_po ( Object ho,
PyObject *  po 
)

Definition at line 177 of file nrnpy_p2h.cpp.

◆ nrnpy_hoc2pyobject()

PyObject* nrnpy_hoc2pyobject ( Object )

Definition at line 191 of file nrnpy_p2h.cpp.

◆ nrnpy_newsecobj()

PyObject* nrnpy_newsecobj ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 375 of file nrnpy_nrn.cpp.

◆ nrnpy_newsection()

Section* nrnpy_newsection ( NPySecObj )

◆ nrnpy_nrn()

PyObject* nrnpy_nrn ( void  )

Definition at line 2417 of file nrnpy_nrn.cpp.

◆ nrnpy_po2ho()

Object* nrnpy_po2ho ( PyObject *  )

Definition at line 524 of file nrnpy_hoc.cpp.

◆ nrnpy_pushsec()

PyObject* nrnpy_pushsec ( PyObject *  sec)

Definition at line 1270 of file nrnpy_nrn.cpp.

◆ nrnpy_pyobject_in_obj()

Object* nrnpy_pyobject_in_obj ( PyObject *  )

Definition at line 205 of file nrnpy_p2h.cpp.

◆ nrnpy_rangepointer()

double* nrnpy_rangepointer ( Section ,
Symbol ,
double  ,
int  
)

Definition at line 1374 of file cabcode.cpp.

◆ nrnpy_reg_mech()

void nrnpy_reg_mech ( int  type)
static

Definition at line 2517 of file nrnpy_nrn.cpp.

◆ nrnpy_sec_referr()

void nrnpy_sec_referr ( )

Definition at line 135 of file nrnpy_nrn.cpp.

◆ nrnpy_set_psection()

static PyObject* nrnpy_set_psection ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 833 of file nrnpy_nrn.cpp.

◆ nrnpy_setpointer_helper()

double** nrnpy_setpointer_helper ( PyObject *  pyname,
PyObject *  mech 
)

Definition at line 2149 of file nrnpy_nrn.cpp.

◆ nrnpy_unreg_mech()

void nrnpy_unreg_mech ( int  type)
static

Definition at line 2554 of file nrnpy_nrn.cpp.

◆ o2loc()

static void o2loc ( Object o,
Section **  psec,
double *  px 
)
static

Definition at line 480 of file nrnpy_nrn.cpp.

◆ o2loc2()

static void o2loc2 ( Object o,
Section **  psec,
double *  px 
)
static

Definition at line 497 of file nrnpy_nrn.cpp.

◆ o2sec()

static Section * o2sec ( Object o)
static

Definition at line 468 of file nrnpy_nrn.cpp.

◆ ob_is_seg()

static int ob_is_seg ( Object o)
static

Definition at line 457 of file nrnpy_nrn.cpp.

◆ pp_get_segment()

static Object** pp_get_segment ( void vptr)
static

Definition at line 1556 of file nrnpy_nrn.cpp.

◆ pymech_repr()

static PyObject* pymech_repr ( PyObject *  p)
static

Definition at line 1107 of file nrnpy_nrn.cpp.

◆ pysec2cell()

static PyObject * pysec2cell ( NPySecObj self)
static

Definition at line 1014 of file nrnpy_nrn.cpp.

◆ pysec_cell()

static Object * pysec_cell ( Section sec)
static

Definition at line 156 of file nrnpy_nrn.cpp.

◆ pysec_cell_equals()

static int pysec_cell_equals ( Section sec,
Object obj 
)
static

Definition at line 188 of file nrnpy_nrn.cpp.

◆ pysec_children()

static PyObject* pysec_children ( NPySecObj *const  self)
static

Definition at line 969 of file nrnpy_nrn.cpp.

◆ pysec_children1()

static PyObject* pysec_children1 ( PyObject *const  sl,
Section *const  sec 
)
static

Definition at line 960 of file nrnpy_nrn.cpp.

◆ pysec_disconnect()

static PyObject* pysec_disconnect ( NPySecObj self)
static

Definition at line 900 of file nrnpy_nrn.cpp.

◆ pysec_hash()

static long pysec_hash ( PyObject *  self)
static

Definition at line 1028 of file nrnpy_nrn.cpp.

◆ pysec_name()

static char * pysec_name ( Section sec)
static

Definition at line 139 of file nrnpy_nrn.cpp.

◆ pysec_orientation()

static PyObject* pysec_orientation ( NPySecObj self)
static

Definition at line 942 of file nrnpy_nrn.cpp.

◆ pysec_parentseg()

static PyObject* pysec_parentseg ( NPySecObj self)
static

Definition at line 907 of file nrnpy_nrn.cpp.

◆ pysec_repr()

static PyObject* pysec_repr ( PyObject *  p)
static

Definition at line 803 of file nrnpy_nrn.cpp.

◆ pysec_richcmp()

static PyObject* pysec_richcmp ( NPySecObj self,
PyObject *  other,
int  op 
)
static

Definition at line 1050 of file nrnpy_nrn.cpp.

◆ pysec_same()

static PyObject* pysec_same ( NPySecObj self,
PyObject *  args 
)
static

Definition at line 1068 of file nrnpy_nrn.cpp.

◆ pysec_subtree()

static PyObject* pysec_subtree ( NPySecObj *const  self)
static

Definition at line 992 of file nrnpy_nrn.cpp.

◆ pysec_subtree1()

static PyObject* pysec_subtree1 ( PyObject *const  sl,
Section *const  sec 
)
static

Definition at line 979 of file nrnpy_nrn.cpp.

◆ pysec_trueparentseg()

static PyObject* pysec_trueparentseg ( NPySecObj self)
static

Definition at line 918 of file nrnpy_nrn.cpp.

◆ pysec_wholetree()

static PyObject* pysec_wholetree ( NPySecObj *const  self)
static

Definition at line 1002 of file nrnpy_nrn.cpp.

◆ pyseg_hash()

static long pyseg_hash ( PyObject *  self)
static

Definition at line 1032 of file nrnpy_nrn.cpp.

◆ pyseg_repr()

static PyObject* pyseg_repr ( PyObject *  p)
static

Definition at line 811 of file nrnpy_nrn.cpp.

◆ pyseg_richcmp()

static PyObject* pyseg_richcmp ( NPySegObj self,
PyObject *  other,
int  op 
)
static

Definition at line 1037 of file nrnpy_nrn.cpp.

◆ rangevars_add()

static void rangevars_add ( Symbol sym)
static

Definition at line 2407 of file nrnpy_nrn.cpp.

◆ remake_pmech_types()

void remake_pmech_types ( )
static

Definition at line 2501 of file nrnpy_nrn.cpp.

◆ rv_getitem()

static PyObject* rv_getitem ( PyObject *  self,
Py_ssize_t  ix 
)
static

Definition at line 2188 of file nrnpy_nrn.cpp.

◆ rv_len()

static Py_ssize_t rv_len ( PyObject *  self)
static

Definition at line 2179 of file nrnpy_nrn.cpp.

◆ rv_noexist()

static void rv_noexist ( Section sec,
const char *  n,
double  x,
int  err 
)
static

Definition at line 1573 of file nrnpy_nrn.cpp.

◆ rv_setitem()

static int rv_setitem ( PyObject *  self,
Py_ssize_t  ix,
PyObject *  value 
)
static

Definition at line 2216 of file nrnpy_nrn.cpp.

◆ rvnew()

static NPyRangeVar* rvnew ( Symbol sym,
NPySecObj sec,
double  x 
)
static

Definition at line 1587 of file nrnpy_nrn.cpp.

◆ scaled_frustum_volume()

static double scaled_frustum_volume ( double  length,
double  d0,
double  d1 
)
inlinestatic

Definition at line 1401 of file nrnpy_nrn.cpp.

◆ sec_free()

void sec_free ( hoc_Item )

Definition at line 508 of file solve.cpp.

◆ section_getattro()

static PyObject* section_getattro ( NPySecObj self,
PyObject *  pyname 
)
static

Definition at line 1600 of file nrnpy_nrn.cpp.

◆ section_length()

double section_length ( Section )

Definition at line 375 of file cabcode.cpp.

◆ section_setattro()

static int section_setattro ( NPySecObj self,
PyObject *  pyname,
PyObject *  value 
)
static

Definition at line 1657 of file nrnpy_nrn.cpp.

◆ seg_area()

static PyObject* seg_area ( NPySegObj self)
static

Definition at line 1385 of file nrnpy_nrn.cpp.

◆ seg_from_sec_x()

static Object * seg_from_sec_x ( Section sec,
double  x 
)
static

Definition at line 1535 of file nrnpy_nrn.cpp.

◆ seg_of_sec_next()

static PyObject* seg_of_sec_next ( NPySegOfSecIter self)
static

Definition at line 1341 of file nrnpy_nrn.cpp.

◆ seg_of_section_iter()

static PyObject* seg_of_section_iter ( NPySecObj self)
static

Definition at line 1285 of file nrnpy_nrn.cpp.

◆ seg_point_processes()

static PyObject* seg_point_processes ( NPySegObj self)
static

Definition at line 1360 of file nrnpy_nrn.cpp.

◆ seg_ri()

static PyObject* seg_ri ( NPySegObj self)
static

Definition at line 1487 of file nrnpy_nrn.cpp.

◆ seg_volume()

static PyObject* seg_volume ( NPySegObj self)
static

Definition at line 1433 of file nrnpy_nrn.cpp.

◆ segment_getattro()

static PyObject* segment_getattro ( NPySegObj self,
PyObject *  pyname 
)
static

Definition at line 1796 of file nrnpy_nrn.cpp.

◆ segment_setattro()

static int segment_setattro ( NPySegObj self,
PyObject *  pyname,
PyObject *  value 
)
static

Definition at line 1932 of file nrnpy_nrn.cpp.

◆ simpleconnectsection()

void simpleconnectsection ( )

Definition at line 655 of file cabcode.cpp.

◆ stor_pt3d()

void stor_pt3d ( Section sec,
double  x,
double  y,
double  z,
double  d 
)

Definition at line 1352 of file treeset.cpp.

◆ striptrail()

static bool striptrail ( char *  buf,
int  sz,
const char *  n,
const char *  m 
)
static

Definition at line 2012 of file nrnpy_nrn.cpp.

◆ var_of_mech_iter()

static PyObject* var_of_mech_iter ( NPyMechObj self)
static

Definition at line 1761 of file nrnpy_nrn.cpp.

◆ var_of_mech_next()

static PyObject* var_of_mech_next ( NPyVarOfMechIter self)
static

Definition at line 1780 of file nrnpy_nrn.cpp.

Variable Documentation

◆ diam_changed

int diam_changed

Definition at line 23 of file cabcode.cpp.

◆ hoc_built_in_symlist

Symlist* hoc_built_in_symlist

Definition at line 39 of file symbol.cpp.

◆ hocobject_type

PyTypeObject* hocobject_type

Definition at line 162 of file nrnpy_hoc.cpp.

◆ NPyMechObj_members

PyMemberDef NPyMechObj_members[] = {{NULL}}
static

Definition at line 2383 of file nrnpy_nrn.cpp.

◆ NPyMechObj_methods

PyMethodDef NPyMechObj_methods[]
static
Initial value:
= {
{"name", (PyCFunction)NPyMechObj_name, METH_NOARGS,
"Mechanism name (same as hoc suffix for density mechanism)"},
{"is_ion", (PyCFunction)NPyMechObj_is_ion, METH_NOARGS,
"Returns True if an ion mechanism"},
{"segment", (PyCFunction)NPyMechObj_segment, METH_NOARGS,
"Returns the segment of the Mechanism instance"},
{NULL}}
static PyObject * NPyMechObj_name(NPyMechObj *self)
Definition: nrnpy_nrn.cpp:1080
static PyObject * NPyMechObj_is_ion(NPyMechObj *self)
Definition: nrnpy_nrn.cpp:1089
return NULL
Definition: cabcode.cpp:461
static PyObject * NPyMechObj_segment(NPyMechObj *self)
Definition: nrnpy_nrn.cpp:1097

Definition at line 2367 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_methods

PyMethodDef NPyRangeVar_methods[]
static
Initial value:
= {
{"name", (PyCFunction)NPyRangeVar_name, METH_NOARGS,
"Range variable name name"},
{"mech", (PyCFunction)NPyRangeVar_mech, METH_NOARGS,
"Returns nrn.Mechanism of the RangeVariable instance"},
{NULL}}
static PyObject * NPyRangeVar_name(NPyRangeVar *self)
Definition: nrnpy_nrn.cpp:1116
static PyObject * NPyRangeVar_mech(NPyRangeVar *self)
Definition: nrnpy_nrn.cpp:1133
return NULL
Definition: cabcode.cpp:461

Definition at line 2376 of file nrnpy_nrn.cpp.

◆ NPySecObj_methods

PyMethodDef NPySecObj_methods[]
static

Definition at line 2258 of file nrnpy_nrn.cpp.

◆ NPySegObj_members

PyMemberDef NPySegObj_members[]
static
Initial value:
= {
{cpstr("x"), T_DOUBLE, offsetof(NPySegObj, x_), 0,
cpstr("location in the section (segment containing x)")},
{cpstr("sec"), T_OBJECT_EX, offsetof(NPySegObj, pysec_), 0,
cpstr("Section")},
{NULL}}
static N_Vector x_
static char * cpstr(const char *s)
Definition: nrnpy_nrn.cpp:2355
#define T_DOUBLE
Definition: coff.h:234
return NULL
Definition: cabcode.cpp:461

Definition at line 2360 of file nrnpy_nrn.cpp.

◆ NPySegObj_methods

PyMethodDef NPySegObj_methods[]
static
Initial value:
= {
{"point_processes", (PyCFunction)seg_point_processes, METH_NOARGS,
"seg.point_processes() returns list of POINT_PROCESS instances in the "
"segment."},
{"node_index", (PyCFunction)node_index1, METH_NOARGS,
"seg.node_index() returns index of v, rhs, etc. in the _actual arrays of "
"the appropriate NrnThread."},
{"area", (PyCFunction)seg_area, METH_NOARGS,
"Segment area (um2) (same as h.area(sec(x), sec=sec))"},
{"ri", (PyCFunction)seg_ri, METH_NOARGS,
"Segment resistance to parent segment (Megohms) (same as h.ri(sec(x), "
"sec=sec))"},
{"volume", (PyCFunction)seg_volume, METH_NOARGS,
"Segment volume (um3)"},
{NULL}}
static PyObject * seg_point_processes(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1360
static PyObject * seg_area(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1385
static PyObject * seg_ri(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1487
static PyObject * seg_volume(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1433
static PyObject * node_index1(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1377
return NULL
Definition: cabcode.cpp:461

Definition at line 2334 of file nrnpy_nrn.cpp.

◆ nrn_is_artificial_

short* nrn_is_artificial_

Definition at line 231 of file init.cpp.

◆ nrn_pnt_template_

cTemplate** nrn_pnt_template_

Definition at line 169 of file init.cpp.

◆ nrnmodule_

PyObject* nrnmodule_
static

Definition at line 2405 of file nrnpy_nrn.cpp.

◆ nrnpy_methods

PyMethodDef nrnpy_methods[]
static
Initial value:
= {
{"cas", nrnpy_cas, METH_VARARGS, "Return the currently accessed section."},
{"allsec", nrnpy_forall, METH_VARARGS,
"Return iterator over all sections."},
{"set_psection", nrnpy_set_psection, METH_VARARGS,
"Specify the nrn.Section.psection callback."},
{NULL}}
static PyObject * nrnpy_set_psection(PyObject *self, PyObject *args)
Definition: nrnpy_nrn.cpp:833
PyObject * nrnpy_cas(PyObject *self, PyObject *args)
Definition: nrnpy_nrn.cpp:2385
return NULL
Definition: cabcode.cpp:461
PyObject * nrnpy_forall(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:1585

Definition at line 2395 of file nrnpy_nrn.cpp.

◆ nrnpy_o2loc2_p_

void(* nrnpy_o2loc2_p_) (Object *, Section **, double *)

Definition at line 30 of file point.cpp.

◆ nrnpy_o2loc_p_

void(* nrnpy_o2loc_p_) (Object *, Section **, double *)

Definition at line 29 of file point.cpp.

◆ nrnpy_o2sec_p_

Section*(* nrnpy_o2sec_p_) (Object *)

Definition at line 20 of file seclist.cpp.

◆ nrnpy_ob_is_seg

int(* nrnpy_ob_is_seg) (Object *)

Definition at line 47 of file nrnmenu.cpp.

◆ nrnpy_psection

PyObject* nrnpy_psection
static

Definition at line 832 of file nrnpy_nrn.cpp.

◆ nrnpy_pyobj_sym_

Symbol* nrnpy_pyobj_sym_

◆ nrnpy_pysec_cell_equals_p_

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

Definition at line 31 of file cabcode.cpp.

◆ nrnpy_pysec_cell_p_

Object*(* nrnpy_pysec_cell_p_) (Section *)

Definition at line 30 of file cabcode.cpp.

◆ nrnpy_pysec_name_p_

char*(* nrnpy_pysec_name_p_) (Section *)

Definition at line 29 of file cabcode.cpp.

◆ nrnpy_reg_mech_p_

void(* nrnpy_reg_mech_p_) (int)

Definition at line 118 of file init.cpp.

◆ nrnpy_seg_from_sec_x

Object*(* nrnpy_seg_from_sec_x) (Section *, double x)

Definition at line 117 of file netcvode.cpp.

◆ pallseg_of_sec_iter_type

PyTypeObject* pallseg_of_sec_iter_type
static

Definition at line 80 of file nrnpy_nrn.cpp.

◆ pmech_generic_type

PyTypeObject* pmech_generic_type
static

Definition at line 84 of file nrnpy_nrn.cpp.

◆ pmech_of_seg_iter_generic_type

PyTypeObject* pmech_of_seg_iter_generic_type
static

Definition at line 83 of file nrnpy_nrn.cpp.

◆ pmech_types

PyObject* pmech_types

Definition at line 88 of file nrnpy_nrn.cpp.

◆ psection_type

PyTypeObject* psection_type

Definition at line 79 of file nrnpy_nrn.cpp.

◆ pseg_of_sec_iter_type

PyTypeObject* pseg_of_sec_iter_type
static

Definition at line 81 of file nrnpy_nrn.cpp.

◆ psegment_type

PyTypeObject* psegment_type
static

Definition at line 82 of file nrnpy_nrn.cpp.

◆ pvar_of_mech_iter_generic_type

PyTypeObject* pvar_of_mech_iter_generic_type
static

Definition at line 85 of file nrnpy_nrn.cpp.

◆ range_type

PyTypeObject* range_type
static

Definition at line 86 of file nrnpy_nrn.cpp.

◆ rangevars_

PyObject* rangevars_

Definition at line 89 of file nrnpy_nrn.cpp.