-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHSolvePassive.h
62 lines (54 loc) · 1.93 KB
/
HSolvePassive.h
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
/**********************************************************************
** This program is part of 'MOOSE', the
** Messaging Object Oriented Simulation Environment.
** copyright (C) 2003-2007 Upinder S. Bhalla, Niraj Dudani and NCBS
** It is made available under the terms of the
** GNU Lesser General Public License version 2.1
** See the file COPYING.LIB for the full notice.
**********************************************************************/
#ifndef _HSOLVE_PASSIVE_H
#define _HSOLVE_PASSIVE_H
#include "../basecode/header.h"
#include "../biophysics/CompartmentBase.h"
#include "../biophysics/Compartment.h"
using namespace moose; // For moose::Compartment from 'Compartment.h'
#include "HSolveUtils.h"
#include "HSolveStruct.h"
#include "HinesMatrix.h"
class HSolvePassive: public HinesMatrix
{
#ifdef DO_UNIT_TESTS
friend void testHSolvePassive();
#endif
friend class pn2s::Device;
friend class PN2S_Proxy;
public:
void setup( Id seed, double dt );
void solve();
protected:
// Integration
void updateMatrix();
void forwardEliminate();
void backwardSubstitute();
vector< CompartmentStruct > compartment_;
vector< Id > compartmentId_;
vector< double > V_; /**< Compartment Vm.
* V_ is addressed using a compartment index. V_ stores the Vm value
* of each compartment. */
vector< TreeNodeStruct > tree_; /**< Tree info.
* The tree is used to acquire various values during setup. It contains
* the user-defined original values of all compartment parameters.
* Therefore, it is also used during reinit. */
map< unsigned int, InjectStruct > inject_; /**< inject map.
* contains the list of compartments that have current injections into
* them. */
private:
// Setting up of data structures
void clear();
void walkTree( Id seed );
void initialize();
void storeTree();
// Used for unit tests.
double getV( unsigned int row ) const;
};
#endif // _HSOLVE_PASSIVE_H