MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GapJunction Class Reference

#include <GapJunction.h>

+ Collaboration diagram for GapJunction:

Public Member Functions

 GapJunction ()
 
double getGk () const
 
void process (const Eref &e, ProcPtr p)
 
void reinit (const Eref &e, ProcPtr p)
 
void setGk (double g)
 
void setVm1 (double Vm)
 
void setVm2 (double Vm)
 
 ~GapJunction ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 

Protected Attributes

double Gk_
 
double Vm1_
 
double Vm2_
 

Detailed Description

Definition at line 48 of file GapJunction.h.

Constructor & Destructor Documentation

GapJunction::GapJunction ( )

Definition at line 170 of file GapJunction.cpp.

170  :Vm1_(0.0), Vm2_(0.0), Gk_(1e-9)
171 {
172  ;
173 }
double Vm1_
Definition: GapJunction.h:76
double Gk_
Definition: GapJunction.h:78
double Vm2_
Definition: GapJunction.h:77
GapJunction::~GapJunction ( )

Definition at line 175 of file GapJunction.cpp.

176 {
177  ;
178 }

Member Function Documentation

double GapJunction::getGk ( ) const

Definition at line 185 of file GapJunction.cpp.

References Gk_.

Referenced by initCinfo().

186 {
187  return Gk_;
188 }
double Gk_
Definition: GapJunction.h:78

+ Here is the caller graph for this function:

const Cinfo * GapJunction::initCinfo ( )
static

Initializes the class info.

Definition at line 67 of file GapJunction.cpp.

References channel1Out(), channel2Out(), gapJunctionCinfo, getGk(), Neutral::initCinfo(), process(), reinit(), setGk(), setVm1(), and setVm2().

68 {
69 
71  "Gk",
72  "Conductance of the gap junction",
75 
77  // Shared messages
79  static DestFinfo process(
80  "process",
81  "Handles 'process' call",
83 
84  static DestFinfo reinit(
85  "reinit",
86  "Handles 'reinit' call",
88 
89  static Finfo* processShared[] = {
90  &process, &reinit
91  };
92 
93  static SharedFinfo proc(
94  "proc",
95  "This is a shared message to receive Process messages "
96  "from the scheduler objects. The Process should be called "
97  "_second_ in each clock tick, after the Init message."
98  "The first entry in the shared msg is a MsgDest "
99  "for the Process operation. It has a single argument, "
100  "ProcInfo, which holds lots of information about current "
101  "time, thread, dt and so on. The second entry is a MsgDest "
102  "for the Reinit operation. It also uses ProcInfo. ",
103  processShared, sizeof( processShared ) / sizeof( Finfo* ));
104 
105  static DestFinfo Vm1(
106  "Vm1",
107  "Handles Vm message from compartment",
109 
110  static Finfo * channel1Shared[] = {
111  channel1Out(), &Vm1,
112  };
113 
114  static SharedFinfo channel1(
115  "channel1",
116  "This is a shared message to couple the conductance and Vm from\n"
117  "terminal 2 to the compartment at terminal 1. The first entry is source\n"
118  "sending out Gk and Vm2, the second entry is destination for Vm1.",
119  channel1Shared, sizeof(channel1Shared)/sizeof(Finfo*));
120 
121  static DestFinfo Vm2(
122  "Vm2",
123  "Handles Vm message from another compartment",
125 
126  static Finfo * channel2Shared[] = {
127  channel2Out(), &Vm2,
128  };
129 
130  static SharedFinfo channel2(
131  "channel2",
132  "This is a shared message to couple the conductance and Vm from\n"
133  "terminal 1 to the compartment at terminal 2. The first entry is source\n"
134  "sending out Gk and Vm1, the second entry is destination for Vm2.",
135  channel2Shared, sizeof(channel2Shared)/sizeof(Finfo*));
136 
137  static Finfo * gapJunctionFinfos[] =
138  {
139  &channel1,
140  &channel2,
141  &Gk,
142  &proc
143  };
144 
145  static string doc[] = {
146  "Name", "GapJunction",
147  "Author", "Subhasis Ray, 2013",
148  "Description", "Implementation of gap junction between two compartments. The shared\n"
149  "fields, 'channel1' and 'channel2' can be connected to the 'channel'\n"
150  "message of the compartments at either end of the gap junction. The\n"
151  "compartments will send their Vm to the gap junction and receive the\n"
152  "conductance 'Gk' of the gap junction and the Vm of the other\n"
153  "compartment."
154  };
155 
156  static Dinfo< GapJunction > dinfo;
157  static Cinfo gapJunctionCinfo(
158  "GapJunction",
160  gapJunctionFinfos,
161  sizeof(gapJunctionFinfos)/sizeof(Finfo*),
162  &dinfo,
163  doc,
164  sizeof(doc) / sizeof(string));
165  return &gapJunctionCinfo;
166 }
void reinit(const Eref &e, ProcPtr p)
void process(const Eref &e, ProcPtr p)
double getGk() const
static SrcFinfo2< double, double > * channel2Out()
Definition: GapJunction.cpp:59
Definition: Dinfo.h:60
void setGk(double g)
static const Cinfo * gapJunctionCinfo
static SrcFinfo2< double, double > * channel1Out()
Definition: GapJunction.cpp:51
Definition: OpFunc.h:27
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
Definition: Cinfo.h:18
void setVm2(double Vm)
void setVm1(double Vm)
Definition: Finfo.h:12

+ Here is the call graph for this function:

void GapJunction::process ( const Eref e,
ProcPtr  p 
)

The process function does the object updating and sends out messages to channels, nernsts, and so on.

Definition at line 200 of file GapJunction.cpp.

References channel1Out(), channel2Out(), Gk_, Vm1_, and Vm2_.

Referenced by initCinfo().

201 {
202  channel1Out()->send(e, Gk_, Vm2_);
203  channel2Out()->send(e, Gk_, Vm1_);
204 }
double Vm1_
Definition: GapJunction.h:76
static SrcFinfo2< double, double > * channel2Out()
Definition: GapJunction.cpp:59
double Gk_
Definition: GapJunction.h:78
double Vm2_
Definition: GapJunction.h:77
static SrcFinfo2< double, double > * channel1Out()
Definition: GapJunction.cpp:51

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void GapJunction::reinit ( const Eref e,
ProcPtr  p 
)

The reinit function reinitializes all fields.

Definition at line 206 of file GapJunction.cpp.

References Vm1_, and Vm2_.

Referenced by initCinfo().

207 {
208  Vm1_ = 0.0;
209  Vm2_ = 0.0;
210 }
double Vm1_
Definition: GapJunction.h:76
double Vm2_
Definition: GapJunction.h:77

+ Here is the caller graph for this function:

void GapJunction::setGk ( double  g)

Definition at line 180 of file GapJunction.cpp.

References Gk_.

Referenced by initCinfo().

181 {
182  Gk_ = g;
183 }
double Gk_
Definition: GapJunction.h:78

+ Here is the caller graph for this function:

void GapJunction::setVm1 ( double  Vm)

Definition at line 190 of file GapJunction.cpp.

References Vm1_.

Referenced by initCinfo().

191 {
192  Vm1_ = v;
193 }
double Vm1_
Definition: GapJunction.h:76

+ Here is the caller graph for this function:

void GapJunction::setVm2 ( double  Vm)

Definition at line 195 of file GapJunction.cpp.

References Vm2_.

Referenced by initCinfo().

196 {
197  Vm2_ = v;
198 }
double Vm2_
Definition: GapJunction.h:77

+ Here is the caller graph for this function:

Member Data Documentation

double GapJunction::Gk_
protected

Definition at line 78 of file GapJunction.h.

Referenced by getGk(), process(), and setGk().

double GapJunction::Vm1_
protected

Definition at line 76 of file GapJunction.h.

Referenced by process(), reinit(), and setVm1().

double GapJunction::Vm2_
protected

Definition at line 77 of file GapJunction.h.

Referenced by process(), reinit(), and setVm2().


The documentation for this class was generated from the following files: