MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Leakage.cpp
Go to the documentation of this file.
1 // Leakage.cpp ---
2 //
3 // Filename: Leakage.cpp
4 // Description:
5 // Author: subhasis ray
6 // Maintainer:
7 // Created: Mon Aug 3 02:32:29 2009 (+0530)
8 // Version:
9 // Last-Updated: Mon Aug 10 11:15:39 2009 (+0530)
10 // By: subhasis ray
11 // Update #: 71
12 // URL:
13 // Keywords:
14 // Compatibility:
15 //
16 //
17 
18 // Commentary: Reimplementation of leakage class of GENESIS
19 //
20 //
21 //
22 //
23 
24 // Change log:
25 //
26 //
27 //
28 //
29 // This program is free software; you can redistribute it and/or
30 // modify it under the terms of the GNU General Public License as
31 // published by the Free Software Foundation; either version 3, or
32 // (at your option) any later version.
33 //
34 // This program is distributed in the hope that it will be useful,
35 // but WITHOUT ANY WARRANTY; without even the implied warranty of
36 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37 // General Public License for more details.
38 //
39 // You should have received a copy of the GNU General Public License
40 // along with this program; see the file COPYING. If not, write to
41 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth
42 // Floor, Boston, MA 02110-1301, USA.
43 //
44 //
45 
46 // Code:
47 
48 #include "header.h"
49 #include "ChanBase.h"
50 #include "ChanCommon.h"
51 #include "Leakage.h"
52 
54 {
55  static string doc[] = {
56  "Name", "Leakage",
57  "Author", "Subhasis Ray, 2009, Upi Bhalla 2014 NCBS",
58  "Description", "Leakage: Passive leakage channel."
59  };
60 
61  static Dinfo< Leakage > dinfo;
62 
63  static Cinfo LeakageCinfo(
64  "Leakage",
66  0,
67  0,
68  &dinfo,
69  doc,
70  sizeof( doc ) / sizeof( string ));
71 
72  return &LeakageCinfo;
73 }
74 
76 
77 
79 {
80  ;
81 }
82 
84 {
85  ;
86 }
88 
89 void Leakage::vProcess( const Eref & e, ProcPtr p )
90 {
91  ChanCommon::vSetGk( e, this->vGetGbar( e ) * this->vGetModulation( e ));
92  updateIk();
93  sendProcessMsgs(e, p);
94 }
95 
96 void Leakage::vReinit( const Eref & e, ProcPtr p )
97 {
98  ChanCommon::vSetGk( e, this->vGetGbar( e ) * this->vGetModulation( e ));
99  updateIk();
100  sendReinitMsgs(e, p);
101 }
102 
103 void Leakage::vSetGbar( const Eref& e, double gbar )
104 {
105  ChanCommon::vSetGk( e, gbar * this->vGetModulation( e ) );
106  ChanCommon::vSetGbar( e, gbar );
107 }
108 
109 //
110 // Leakage.cpp ends here
double vGetModulation(const Eref &e) const
Definition: ChanCommon.cpp:49
void vSetGbar(const Eref &e, double gbar)
Definition: Leakage.cpp:103
Definition: Dinfo.h:60
void vReinit(const Eref &e, ProcPtr p)
Definition: Leakage.cpp:96
void updateIk()
Definition: ChanCommon.cpp:119
Leakage()
Definition: Leakage.cpp:78
~Leakage()
Definition: Leakage.cpp:83
static const Cinfo * leakageCinfo
Definition: Leakage.cpp:75
void vSetGk(const Eref &e, double Gk)
Definition: ChanCommon.cpp:68
Definition: Eref.h:26
double vGetGbar(const Eref &e) const
Definition: ChanCommon.cpp:39
void vProcess(const Eref &e, ProcPtr p)
Definition: Leakage.cpp:89
void sendReinitMsgs(const Eref &e, const ProcPtr info)
Definition: ChanCommon.cpp:111
static const Cinfo * initCinfo()
Definition: Leakage.cpp:53
void vSetGbar(const Eref &e, double Gbar)
Definition: ChanCommon.cpp:34
void sendProcessMsgs(const Eref &e, const ProcPtr info)
Definition: ChanCommon.cpp:100
Definition: Cinfo.h:18
static const Cinfo * initCinfo()
Specify the Class Info static variable for initialization.
Definition: ChanBase.cpp:36