-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathsection_fwd.hpp
83 lines (75 loc) · 3.58 KB
/
section_fwd.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#pragma once
#include "multicore.h"
#include "neuron/container/generic_data_handle.hpp"
#include "nrnredef.h"
/**
* @file section_fwd.hpp
* @brief Forward declarations of Section, Node etc. to be included in translated MOD files.
*/
struct Node;
struct Prop;
struct Section;
using Datum = neuron::container::generic_data_handle;
// Forward declaration of Prop means Prop.id() not directly accessible
// in mod files. This helps work around that problem for purposes of validity
// checking. Perhaps someday, Prop will disappear entirely as it conceptually
// is just a mechanism row and is bloated with redundant type and size info.
// It does not exist in CoreNEURON.
neuron::container::non_owning_identifier_without_container _nrn_get_prop_id(Prop*);
extern int cvode_active_;
extern int secondorder;
extern int use_sparse13;
double nrn_ghk(double, double, double, double);
Datum* nrn_prop_datum_alloc(int type, int count, Prop* p);
#if EXTRACELLULAR
/* pruned to only work with sparse13 */
extern int nrn_nlayer_extracellular;
#define nlayer (nrn_nlayer_extracellular) /* first (0) layer is extracellular next to membrane */
struct Extnode {
std::vector<neuron::container::data_handle<double>> param{};
// double* param; /* points to extracellular parameter vector */
/* v is membrane potential. so v internal = Node.v + Node.vext[0] */
/* However, the Node equation is for v internal. */
/* This is reconciled during update. */
/* Following all have allocated size of nlayer */
double* v; /* v external. */
double* _a;
double* _b;
double** _rhs; /* rhs, a, and b are analogous to those in node */
int eqn_index_;
};
#endif
#define NODEA(n) _nrn_mechanism_access_a(n)
#define NODEB(n) _nrn_mechanism_access_b(n)
#define NODED(n) _nrn_mechanism_access_d(n)
#define NODERHS(n) _nrn_mechanism_access_rhs(n)
#ifdef NODEV
// Defined on macOS ("no device") at least
#undef NODEV
#endif
#define NODEV(n) _nrn_mechanism_access_voltage(n)
/**
* A point process is computed just like regular mechanisms. Ie it appears in the property list
* whose type specifies which allocation, current, and state functions to call. This means some
* nodes have more properties than other nodes even in the same section. The Point_process structure
* allows the interface to hoc variable names. Each variable symbol u.rng->type refers to the point
* process mechanism. The variable is treated as a vector variable whose first index specifies
* "which one" of that mechanisms insertion points we are talking about. Finally the variable
* u.rng->index tells us where in the p-array to look. The number of point_process vectors is the
* number of different point process types. This is different from the mechanism type which
* enumerates all mechanisms including the point_processes. It is the responsibility of
* create_point_process to set up the vectors and fill in the symbol information. However only after
* the process is given a location can the variables be set or accessed. This is because the
* allocation function may have to connect to some ionic parameters and the process exists primarily
* as a property of a node.
*/
struct Point_process {
Section* sec{}; /* section and node location for the point mechanism*/
Node* node{};
Prop* prop{}; /* pointer to the actual property linked to the
node property list */
Object* ob{}; /* object that owns this process */
void* presyn_{}; /* non-threshold presynapse for NetCon */
void* nvi_{}; /* NrnVarIntegrator (for local step method) */
void* _vnt{}; /* NrnThread* (for NET_RECEIVE and multicore) */
};