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 1293 of file nrnpy_nrn.cpp.

◆ allseg_of_sec_iter()

static PyObject* allseg_of_sec_iter ( NPyAllSegOfSecIter self)
static

Definition at line 1303 of file nrnpy_nrn.cpp.

◆ allseg_of_sec_next()

static PyObject* allseg_of_sec_next ( NPyAllSegOfSecIter self)
static

Definition at line 1309 of file nrnpy_nrn.cpp.

◆ arg_bisect_arc3d()

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

Definition at line 1410 of file nrnpy_nrn.cpp.

◆ can_change_morph()

int can_change_morph ( Section sec)

Definition at line 1258 of file treeset.cpp.

◆ cpstr()

static char* cpstr ( const char *  s)
static

Definition at line 2412 of file nrnpy_nrn.cpp.

◆ has_membrane()

int has_membrane ( char *  mechanism_name,
Section sec 
)

Definition at line 2236 of file cabcode.cpp.

◆ hoc_internal_name()

static PyObject* hoc_internal_name ( NPySecObj self)
static

Definition at line 818 of file nrnpy_nrn.cpp.

◆ interpolate()

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

Definition at line 1399 of file nrnpy_nrn.cpp.

◆ is_pysec()

static PyObject* is_pysec ( NPySecObj self)
static

Definition at line 857 of file nrnpy_nrn.cpp.

◆ lappendsec()

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

Definition at line 942 of file nrnpy_nrn.cpp.

◆ mech_getattro()

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

Definition at line 2019 of file nrnpy_nrn.cpp.

◆ mech_insert1()

void mech_insert1 ( Section sec,
int  type 
)

Definition at line 849 of file cabcode.cpp.

◆ mech_of_seg_next()

static PyObject* mech_of_seg_next ( NPyMechOfSegIter self)
static

Definition at line 1736 of file nrnpy_nrn.cpp.

◆ mech_of_segment_iter()

static PyObject* mech_of_segment_iter ( NPySegObj self)
static

Definition at line 1514 of file nrnpy_nrn.cpp.

◆ mech_of_segment_prop()

static Prop* mech_of_segment_prop ( Prop p)
static

Definition at line 1497 of file nrnpy_nrn.cpp.

◆ mech_setattro()

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

Definition at line 2086 of file nrnpy_nrn.cpp.

◆ mech_uninsert1()

void mech_uninsert1 ( Section sec,
Symbol s 
)

Definition at line 916 of file cabcode.cpp.

◆ newpysechelp()

NPySecObj* newpysechelp ( Section sec)

Definition at line 865 of file nrnpy_nrn.cpp.

◆ newpyseghelp()

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

Definition at line 884 of file nrnpy_nrn.cpp.

◆ node_index1()

static PyObject* node_index1 ( NPySegObj self)
static

Definition at line 1370 of file nrnpy_nrn.cpp.

◆ NPyAllSegOfSecIter_dealloc()

static void NPyAllSegOfSecIter_dealloc ( NPyAllSegOfSecIter self)
static

Definition at line 225 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 360 of file nrnpy_nrn.cpp.

◆ NPyMechObj_dealloc()

static void NPyMechObj_dealloc ( NPyMechObj self)
static

Definition at line 249 of file nrnpy_nrn.cpp.

◆ NPyMechObj_init()

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

Definition at line 538 of file nrnpy_nrn.cpp.

◆ NPyMechObj_is_ion()

static PyObject* NPyMechObj_is_ion ( NPyMechObj self)
static

Definition at line 1083 of file nrnpy_nrn.cpp.

◆ NPyMechObj_name()

static PyObject* NPyMechObj_name ( NPyMechObj self)
static

Definition at line 1074 of file nrnpy_nrn.cpp.

◆ NPyMechObj_new()

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

Definition at line 401 of file nrnpy_nrn.cpp.

◆ NPyMechObj_segment()

static PyObject* NPyMechObj_segment ( NPyMechObj self)
static

Definition at line 1091 of file nrnpy_nrn.cpp.

◆ NPyMechOfSegIter_dealloc()

static void NPyMechOfSegIter_dealloc ( NPyMechOfSegIter self)
static

Definition at line 255 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_dealloc()

static void NPyRangeVar_dealloc ( NPyRangeVar self)
static

Definition at line 243 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_init()

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

Definition at line 551 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_mech()

static PyObject* NPyRangeVar_mech ( NPyRangeVar self)
static

Definition at line 1127 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_name()

static PyObject* NPyRangeVar_name ( NPyRangeVar self)
static

Definition at line 1110 of file nrnpy_nrn.cpp.

◆ NPyRangeVar_new()

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

Definition at line 417 of file nrnpy_nrn.cpp.

◆ NPySecObj_arc3d()

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

Definition at line 744 of file nrnpy_nrn.cpp.

◆ NPySecObj_call()

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

Definition at line 2161 of file nrnpy_nrn.cpp.

◆ NPySecObj_connect()

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

Definition at line 1137 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 205 of file nrnpy_nrn.cpp.

◆ NPySecObj_diam3d()

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

Definition at line 761 of file nrnpy_nrn.cpp.

◆ NPySecObj_has_membrane()

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

Definition at line 1251 of file nrnpy_nrn.cpp.

◆ NPySecObj_init()

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

Definition at line 277 of file nrnpy_nrn.cpp.

◆ NPySecObj_insert()

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

Definition at line 1182 of file nrnpy_nrn.cpp.

◆ NPySecObj_n3d()

static PyObject* NPySecObj_n3d ( NPySecObj self)
static

Definition at line 561 of file nrnpy_nrn.cpp.

◆ NPySecObj_name()

static PyObject* NPySecObj_name ( NPySecObj self)
static

Definition at line 555 of file nrnpy_nrn.cpp.

◆ NPySecObj_new()

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

Definition at line 347 of file nrnpy_nrn.cpp.

◆ NPySecObj_psection()

static PyObject* NPySecObj_psection ( NPySecObj self)
static

Definition at line 845 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dadd()

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

Definition at line 647 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dchange()

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

Definition at line 600 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dclear()

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

Definition at line 582 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dinsert()

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

Definition at line 631 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dremove()

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

Definition at line 566 of file nrnpy_nrn.cpp.

◆ NPySecObj_pt3dstyle()

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

Definition at line 659 of file nrnpy_nrn.cpp.

◆ NPySecObj_push()

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

Definition at line 1271 of file nrnpy_nrn.cpp.

◆ NPySecObj_spine3d()

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

Definition at line 777 of file nrnpy_nrn.cpp.

◆ NPySecObj_uninsert()

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

Definition at line 1227 of file nrnpy_nrn.cpp.

◆ NPySecObj_x3d()

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

Definition at line 696 of file nrnpy_nrn.cpp.

◆ NPySecObj_y3d()

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

Definition at line 712 of file nrnpy_nrn.cpp.

◆ NPySecObj_z3d()

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

Definition at line 728 of file nrnpy_nrn.cpp.

◆ NPySegObj_dealloc()

static void NPySegObj_dealloc ( NPySegObj self)
static

Definition at line 237 of file nrnpy_nrn.cpp.

◆ NPySegObj_init()

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

Definition at line 429 of file nrnpy_nrn.cpp.

◆ NPySegObj_new()

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

Definition at line 377 of file nrnpy_nrn.cpp.

◆ NPySegOfSecIter_dealloc()

static void NPySegOfSecIter_dealloc ( NPySegOfSecIter self)
static

Definition at line 231 of file nrnpy_nrn.cpp.

◆ NPyVarOfMechIter_dealloc()

static void NPyVarOfMechIter_dealloc ( NPyVarOfMechIter self)
static

Definition at line 261 of file nrnpy_nrn.cpp.

◆ nrn_area_ri()

void nrn_area_ri ( Section sec)

Definition at line 779 of file treeset.cpp.

◆ nrn_change_nseg()

void nrn_change_nseg ( Section sec,
int  n 
)

Definition at line 1557 of file cabcode.cpp.

◆ nrn_diam_change()

void nrn_diam_change ( Section sec)

Definition at line 1215 of file treeset.cpp.

◆ nrn_hocobj_ptr()

PyObject* nrn_hocobj_ptr ( double *  pd)

Definition at line 870 of file nrnpy_hoc.cpp.

◆ nrn_is_hocobj_ptr()

int nrn_is_hocobj_ptr ( PyObject *  po,
double *&  pd 
)

Definition at line 878 of file nrnpy_hoc.cpp.

◆ nrn_length_change()

void nrn_length_change ( Section sec,
double  d 
)

Definition at line 1235 of file treeset.cpp.

◆ nrn_noerr_access()

Section* nrn_noerr_access ( )

Definition at line 472 of file cabcode.cpp.

◆ nrn_pointer_assign()

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

Definition at line 1905 of file nrnpy_nrn.cpp.

◆ nrn_pt3dchange1()

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

Definition at line 1163 of file treeset.cpp.

◆ nrn_pt3dchange2()

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

Definition at line 1170 of file treeset.cpp.

◆ nrn_pt3dclear()

void nrn_pt3dclear ( Section sec,
int  req 
)

Definition at line 1117 of file treeset.cpp.

◆ nrn_pt3dinsert()

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

Definition at line 1134 of file treeset.cpp.

◆ nrn_pt3dremove()

void nrn_pt3dremove ( Section sec,
int  i0 
)

Definition at line 1191 of file treeset.cpp.

◆ nrn_pt3dstyle0()

void nrn_pt3dstyle0 ( Section sec)

Definition at line 1006 of file treeset.cpp.

◆ nrn_pt3dstyle1()

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

Definition at line 1015 of file treeset.cpp.

◆ nrn_ptr_richcmp()

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

Definition at line 2107 of file nrnpy_hoc.cpp.

◆ nrn_ra()

double nrn_ra ( Section sec)

Definition at line 403 of file cabcode.cpp.

◆ nrnpy_cas()

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

Definition at line 2448 of file nrnpy_nrn.cpp.

◆ nrnpy_forall()

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

Definition at line 1587 of file nrnpy_hoc.cpp.

◆ nrnpy_ho2po()

PyObject* nrnpy_ho2po ( Object o)

Definition at line 499 of file nrnpy_hoc.cpp.

◆ nrnpy_ho_eq_po()

int nrnpy_ho_eq_po ( Object ho,
PyObject *  po 
)

Definition at line 182 of file nrnpy_p2h.cpp.

◆ nrnpy_hoc2pyobject()

PyObject* nrnpy_hoc2pyobject ( Object ho)

Definition at line 196 of file nrnpy_p2h.cpp.

◆ nrnpy_newsecobj()

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

Definition at line 373 of file nrnpy_nrn.cpp.

◆ nrnpy_newsection()

Section* nrnpy_newsection ( NPySecObj )

◆ nrnpy_nrn()

PyObject* nrnpy_nrn ( void  )

Definition at line 2481 of file nrnpy_nrn.cpp.

◆ nrnpy_po2ho()

Object* nrnpy_po2ho ( PyObject *  po)

Definition at line 520 of file nrnpy_hoc.cpp.

◆ nrnpy_pushsec()

PyObject* nrnpy_pushsec ( PyObject *  sec)

Definition at line 1263 of file nrnpy_nrn.cpp.

◆ nrnpy_pyobject_in_obj()

Object* nrnpy_pyobject_in_obj ( PyObject *  po)

Definition at line 210 of file nrnpy_p2h.cpp.

◆ nrnpy_rangepointer()

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

Definition at line 1375 of file cabcode.cpp.

◆ nrnpy_reg_mech()

void nrnpy_reg_mech ( int  type)
static

Definition at line 2590 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 827 of file nrnpy_nrn.cpp.

◆ nrnpy_setpointer_helper()

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

Definition at line 2141 of file nrnpy_nrn.cpp.

◆ nrnpy_unreg_mech()

void nrnpy_unreg_mech ( int  type)
static

Definition at line 2627 of file nrnpy_nrn.cpp.

◆ o2loc()

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

Definition at line 475 of file nrnpy_nrn.cpp.

◆ o2loc2()

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

Definition at line 492 of file nrnpy_nrn.cpp.

◆ o2sec()

static Section * o2sec ( Object o)
static

Definition at line 463 of file nrnpy_nrn.cpp.

◆ ob_is_seg()

static int ob_is_seg ( Object o)
static

Definition at line 452 of file nrnpy_nrn.cpp.

◆ pp_get_segment()

static Object** pp_get_segment ( void vptr)
static

Definition at line 1551 of file nrnpy_nrn.cpp.

◆ pymech_repr()

static PyObject* pymech_repr ( PyObject *  p)
static

Definition at line 1101 of file nrnpy_nrn.cpp.

◆ pysec2cell()

static PyObject * pysec2cell ( NPySecObj self)
static

Definition at line 1008 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 963 of file nrnpy_nrn.cpp.

◆ pysec_children1()

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

Definition at line 954 of file nrnpy_nrn.cpp.

◆ pysec_disconnect()

static PyObject* pysec_disconnect ( NPySecObj self)
static

Definition at line 894 of file nrnpy_nrn.cpp.

◆ pysec_hash()

static long pysec_hash ( PyObject *  self)
static

Definition at line 1022 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 936 of file nrnpy_nrn.cpp.

◆ pysec_parentseg()

static PyObject* pysec_parentseg ( NPySecObj self)
static

Definition at line 901 of file nrnpy_nrn.cpp.

◆ pysec_repr()

static PyObject* pysec_repr ( PyObject *  p)
static

Definition at line 797 of file nrnpy_nrn.cpp.

◆ pysec_richcmp()

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

Definition at line 1044 of file nrnpy_nrn.cpp.

◆ pysec_same()

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

Definition at line 1062 of file nrnpy_nrn.cpp.

◆ pysec_subtree()

static PyObject* pysec_subtree ( NPySecObj *const  self)
static

Definition at line 985 of file nrnpy_nrn.cpp.

◆ pysec_subtree1()

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

Definition at line 973 of file nrnpy_nrn.cpp.

◆ pysec_trueparentseg()

static PyObject* pysec_trueparentseg ( NPySecObj self)
static

Definition at line 912 of file nrnpy_nrn.cpp.

◆ pysec_wholetree()

static PyObject* pysec_wholetree ( NPySecObj *const  self)
static

Definition at line 995 of file nrnpy_nrn.cpp.

◆ pyseg_hash()

static long pyseg_hash ( PyObject *  self)
static

Definition at line 1026 of file nrnpy_nrn.cpp.

◆ pyseg_repr()

static PyObject* pyseg_repr ( PyObject *  p)
static

Definition at line 805 of file nrnpy_nrn.cpp.

◆ pyseg_richcmp()

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

Definition at line 1031 of file nrnpy_nrn.cpp.

◆ rangevars_add()

static void rangevars_add ( Symbol sym)
static

Definition at line 2471 of file nrnpy_nrn.cpp.

◆ remake_pmech_types()

void remake_pmech_types ( )
static

Definition at line 2574 of file nrnpy_nrn.cpp.

◆ rv_getitem()

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

Definition at line 2180 of file nrnpy_nrn.cpp.

◆ rv_len()

static Py_ssize_t rv_len ( PyObject *  self)
static

Definition at line 2171 of file nrnpy_nrn.cpp.

◆ rv_noexist()

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

Definition at line 1568 of file nrnpy_nrn.cpp.

◆ rv_setitem()

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

Definition at line 2207 of file nrnpy_nrn.cpp.

◆ rvnew()

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

Definition at line 1580 of file nrnpy_nrn.cpp.

◆ scaled_frustum_volume()

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

Definition at line 1394 of file nrnpy_nrn.cpp.

◆ sec_free()

void sec_free ( hoc_Item secitem)

Definition at line 521 of file solve.cpp.

◆ section_getattro()

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

Definition at line 1593 of file nrnpy_nrn.cpp.

◆ section_length()

double section_length ( Section sec)

Definition at line 387 of file cabcode.cpp.

◆ section_setattro()

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

Definition at line 1650 of file nrnpy_nrn.cpp.

◆ seg_area()

static PyObject* seg_area ( NPySegObj self)
static

Definition at line 1378 of file nrnpy_nrn.cpp.

◆ seg_from_sec_x()

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

Definition at line 1530 of file nrnpy_nrn.cpp.

◆ seg_of_sec_next()

static PyObject* seg_of_sec_next ( NPySegOfSecIter self)
static

Definition at line 1334 of file nrnpy_nrn.cpp.

◆ seg_of_section_iter()

static PyObject* seg_of_section_iter ( NPySecObj self)
static

Definition at line 1278 of file nrnpy_nrn.cpp.

◆ seg_point_processes()

static PyObject* seg_point_processes ( NPySegObj self)
static

Definition at line 1353 of file nrnpy_nrn.cpp.

◆ seg_ri()

static PyObject* seg_ri ( NPySegObj self)
static

Definition at line 1482 of file nrnpy_nrn.cpp.

◆ seg_volume()

static PyObject* seg_volume ( NPySegObj self)
static

Definition at line 1426 of file nrnpy_nrn.cpp.

◆ segment_getattro()

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

Definition at line 1788 of file nrnpy_nrn.cpp.

◆ segment_setattro()

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

Definition at line 1925 of file nrnpy_nrn.cpp.

◆ simpleconnectsection()

void simpleconnectsection ( )

Definition at line 664 of file cabcode.cpp.

◆ stor_pt3d()

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

Definition at line 1362 of file treeset.cpp.

◆ striptrail()

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

Definition at line 2004 of file nrnpy_nrn.cpp.

◆ var_of_mech_iter()

static PyObject* var_of_mech_iter ( NPyMechObj self)
static

Definition at line 1753 of file nrnpy_nrn.cpp.

◆ var_of_mech_next()

static PyObject* var_of_mech_next ( NPyVarOfMechIter self)
static

Definition at line 1772 of file nrnpy_nrn.cpp.

Variable Documentation

◆ diam_changed

int diam_changed
extern

Definition at line 23 of file cabcode.cpp.

◆ hoc_built_in_symlist

Symlist* hoc_built_in_symlist
extern

Definition at line 76 of file ivocmac.cpp.

◆ hocobject_type

PyTypeObject* hocobject_type
extern

Definition at line 159 of file nrnpy_hoc.cpp.

◆ NPyMechObj_members

PyMemberDef NPyMechObj_members[] = {{NULL}}
static

Definition at line 2446 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:1074
static PyObject * NPyMechObj_segment(NPyMechObj *self)
Definition: nrnpy_nrn.cpp:1091
static PyObject * NPyMechObj_is_ion(NPyMechObj *self)
Definition: nrnpy_nrn.cpp:1083
#define NULL
Definition: sptree.h:16

Definition at line 2426 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:1110
static PyObject * NPyRangeVar_mech(NPyRangeVar *self)
Definition: nrnpy_nrn.cpp:1127

Definition at line 2438 of file nrnpy_nrn.cpp.

◆ NPySecObj_methods

PyMethodDef NPySecObj_methods[]
static

Definition at line 2248 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 char * cpstr(const char *s)
Definition: nrnpy_nrn.cpp:2412
static N_Vector x_

Definition at line 2417 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_area(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1378
static PyObject * seg_point_processes(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1353
static PyObject * seg_ri(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1482
static PyObject * node_index1(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1370
static PyObject * seg_volume(NPySegObj *self)
Definition: nrnpy_nrn.cpp:1426

Definition at line 2384 of file nrnpy_nrn.cpp.

◆ nrn_is_artificial_

short* nrn_is_artificial_
extern

Definition at line 193 of file init.cpp.

◆ nrn_pnt_template_

cTemplate** nrn_pnt_template_
extern

Definition at line 131 of file init.cpp.

◆ nrnmodule_

PyObject* nrnmodule_
static

Definition at line 2469 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",
METH_VARARGS,
"Specify the nrn.Section.psection callback."},
{NULL}}
PyObject * nrnpy_cas(PyObject *self, PyObject *args)
Definition: nrnpy_nrn.cpp:2448
static PyObject * nrnpy_set_psection(PyObject *self, PyObject *args)
Definition: nrnpy_nrn.cpp:827
PyObject * nrnpy_forall(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:1587

Definition at line 2458 of file nrnpy_nrn.cpp.

◆ nrnpy_o2loc2_p_

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

Definition at line 30 of file point.cpp.

◆ nrnpy_o2loc_p_

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

Definition at line 29 of file point.cpp.

◆ nrnpy_o2sec_p_

Section*(* nrnpy_o2sec_p_) (Object *) ( Object o)
extern

Definition at line 21 of file seclist.cpp.

◆ nrnpy_ob_is_seg

int(* nrnpy_ob_is_seg) (Object *) ( Object )
extern

Definition at line 47 of file nrnmenu.cpp.

◆ nrnpy_psection

PyObject* nrnpy_psection
static

Definition at line 826 of file nrnpy_nrn.cpp.

◆ nrnpy_pyobj_sym_

Symbol* nrnpy_pyobj_sym_
extern

◆ nrnpy_pysec_cell_equals_p_

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

Definition at line 31 of file cabcode.cpp.

◆ nrnpy_pysec_cell_p_

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

Definition at line 30 of file cabcode.cpp.

◆ nrnpy_pysec_name_p_

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

Definition at line 29 of file cabcode.cpp.

◆ nrnpy_reg_mech_p_

void(* nrnpy_reg_mech_p_) (int) ( int  )
extern

Definition at line 94 of file init.cpp.

◆ nrnpy_seg_from_sec_x

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

Definition at line 123 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.