-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVsource.h
41 lines (28 loc) · 957 Bytes
/
Vsource.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
/**************************************************************************
VSource.h JJS 8/29/95
part of CONICAL, the Computational Neuroscience Class Library
A VSource, or voltage source, is an object which can cause current to
flow through a Current. That is, a VSource has some potential (V), which
may be read by other objects to adjust whatever (usually their own V).
Requires:
nothing
**************************************************************************/
#ifndef VSOURCE_H
#define VSOURCE_H
#ifndef real
#define real double
#endif
class VSource
{
public:
VSource( void ) { V[0] = V[1] = 0; }
VSource( real pV ) { V[0] = V[1] = pV; }
virtual void SetV( real pV ) { V[0] = V[1] = pV; }
virtual real GetV( void ) { return V[0]; }
real Vk1, Vk2, Vk3, Vk4;
int Memory[200];
real dV;
protected:
real V[2]; // membrane potential (volts); current and new values
};
#endif