-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZombieCaConc.cpp
158 lines (132 loc) · 3.57 KB
/
ZombieCaConc.cpp
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**********************************************************************
** This program is part of 'MOOSE', the
** Messaging Object Oriented Simulation Environment.
** Copyright (C) 2003-2007 Upinder S. Bhalla. 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.
**********************************************************************/
#include "header.h"
#include "../biophysics/CaConcBase.h"
#include "HinesMatrix.h"
#include "HSolveStruct.h"
#include "HSolvePassive.h"
#include "RateLookup.h"
#include "HSolveActive.h"
#include "HSolve.h"
#include "ZombieCaConc.h"
const Cinfo* ZombieCaConc::initCinfo()
{
static string doc[] =
{
"Name", "ZombieCaConc",
"Author", "Upinder S. Bhalla, 2007, NCBS",
"Description", "ZombieCaConc: Calcium concentration pool. Takes current from a "
"channel and keeps track of calcium buildup and depletion by a "
"single exponential process. ",
};
static Dinfo< ZombieCaConc > dinfo;
static Cinfo zombieCaConcCinfo(
"ZombieCaConc",
CaConcBase::initCinfo(),
0,
0,
&dinfo,
doc,
sizeof( doc )/ sizeof( string )
);
return &zombieCaConcCinfo;
}
///////////////////////////////////////////////////
static const Cinfo* zombieCaConcCinfo = ZombieCaConc::initCinfo();
///////////////////////////////////////////////////
// Field function definitions
///////////////////////////////////////////////////
void ZombieCaConc::vSetCa( const Eref& e, double Ca )
{
hsolve_->setCa( e.id(), Ca );
}
double ZombieCaConc::vGetCa( const Eref& e ) const
{
return hsolve_->getCa( e.id() );
}
void ZombieCaConc::vSetCaBasal( const Eref& e , double CaBasal )
{
hsolve_->setCa( e.id(), CaBasal );
}
double ZombieCaConc::vGetCaBasal( const Eref& e ) const
{
return hsolve_->getCaBasal( e.id() );
}
void ZombieCaConc::vSetTau( const Eref& e , double tau )
{
tau_ = tau;
hsolve_->setTauB( e.id(), tau_, B_ );
}
double ZombieCaConc::vGetTau( const Eref& e ) const
{
return tau_;
}
void ZombieCaConc::vSetB( const Eref& e , double B )
{
B_ = B;
hsolve_->setTauB( e.id(), tau_, B_ );
}
double ZombieCaConc::vGetB( const Eref& e ) const
{
return B_;
}
void ZombieCaConc::vSetCeiling( const Eref& e , double ceiling )
{
hsolve_->setCaCeiling( e.id(), ceiling );
}
double ZombieCaConc::vGetCeiling( const Eref& e ) const
{
return hsolve_->getCaCeiling( e.id() );
}
void ZombieCaConc::vSetFloor( const Eref& e , double floor )
{
hsolve_->setCaFloor( e.id(), floor );
}
double ZombieCaConc::vGetFloor( const Eref& e ) const
{
return hsolve_->getCaFloor( e.id() );
}
///////////////////////////////////////////////////
// Dest function definitions
///////////////////////////////////////////////////
void ZombieCaConc::vReinit( const Eref& e, ProcPtr p )
{
;
}
void ZombieCaConc::vProcess( const Eref& e, ProcPtr p )
{
;
}
void ZombieCaConc::vCurrent( const Eref& e, double I )
{
//~ activation_ += I;
}
void ZombieCaConc::vCurrentFraction( const Eref& e, double I, double fraction )
{
//~ activation_ += I * fraction;
}
void ZombieCaConc::vIncrease( const Eref& e, double I )
{
//~ activation_ += fabs( I );
}
void ZombieCaConc::vDecrease( const Eref& e, double I )
{
//~ activation_ -= fabs( I );
}
///////////////////////////////////////////////////
void ZombieCaConc::vSetSolver( const Eref& e, Id hsolve )
{
if ( !hsolve.element()->cinfo()->isA( "HSolve" ) ) {
cout << "Error: ZombieCaConc::vSetSolver: Object: " <<
hsolve.path() << " is not an HSolve. Aborted\n";
hsolve_ = 0;
return;
}
hsolve_ = reinterpret_cast< HSolve* >( hsolve.eref().data() );
}