LifeV
IonicHodgkinHuxley.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file IonicHodgkinHuxley
29  @brief Ionic model of Hodgkin and Huxley
30 
31  Model as in
32  Keener, James, and James Sneyd.
33  Mathematical Physiology: I: Cellular Physiology. Vol. 1.
34  Springer, 2010.
35 
36  @date 01-2013
37  @author Simone Rossi <simone.rossi@epfl.ch>
38 
39  @contributors
40  @mantainer Simone Rossi <simone.rossi@epfl.ch>
41  @last update 01-2013
42  */
43 
44 
45 #ifndef _IONICHODGKINHUXLEY_H_
46 #define _IONICHODGKINHUXLEY_H_
47 
48 //Include the base class
49 #include <lifev/electrophysiology/solver/IonicModels/ElectroIonicModel.hpp>
50 
51 #include <Teuchos_ParameterList.hpp>
52 
53 namespace LifeV
54 {
55 //! IonicModel - This class implements the Hodgkin-Huxley model.
56 
57 class IonicHodgkinHuxley : public virtual ElectroIonicModel
58 {
59 
60 public:
61  //! @name Type definitions
62  //@{
63  typedef ElectroIonicModel super;
64  //@}
65 
66 
67 
68  //! @name Constructors & Destructor
69  //@{
70 
71  //! Constructor
72  IonicHodgkinHuxley();
73 
74 
75  /*!
76  * @param list of parameters in an xml file
77  */
78  IonicHodgkinHuxley ( Teuchos::ParameterList& parameterList );
79 
80  /*!
81  * @param IonicHodgkinHuxley object
82  */
83  IonicHodgkinHuxley ( const IonicHodgkinHuxley& model );
84  //! Destructor
85  virtual ~IonicHodgkinHuxley() {}
86 
87  //@}
88 
89  //! @name Overloads
90  //@{
91 
92  IonicHodgkinHuxley& operator= ( const IonicHodgkinHuxley& model );
93 
94  //@}
95 
96  //! @name Setters and getters
97  //@{
98 
99  //parameters getters and setters
100  inline const Real& gNa() const
101  {
102  return M_gNa;
103  }
104 
105  inline const Real& gK() const
106  {
107  return M_gK;
108  }
109 
110  inline const Real& gL() const
111  {
112  return M_gL;
113  }
114 
115 
116  inline const Real& vL() const
117  {
118  return M_vL;
119  }
120 
121  inline const Real& vK() const
122  {
123  return M_vK;
124  }
125 
126  inline const Real& vNa() const
127  {
128  return M_vNa;
129  }
130 
131 
132 
133 
134  inline void setGNa ( const Real& p )
135  {
136  this->M_gNa = p;
137  }
138 
139  inline void setGK ( const Real& p )
140  {
141  this->M_gK = p;
142  }
143 
144  inline void setGL ( const Real& p )
145  {
146  this->M_gL = p;
147  }
148 
149  inline void setVL ( const Real& p )
150  {
151  this->M_vL = p;
152  }
153 
154  inline void setVNa ( const Real& p )
155  {
156  this->M_vNa = p;
157  }
158 
159  inline void setVK ( const Real& p )
160  {
161  this->M_vK = p;
162  }
163 
164  //@}
165 
166 
167  //! @name Methods
168  //@{
169  //! Compute the rhs of the gating variables a single node or for the 0D case
170  /*!
171  * @param v vector with the variables (V, M, N, H)
172  * @param rhs vector where we will insert the rhs of the equations of the gating variables
173  */
174  void computeGatingRhs ( const std::vector<Real>& v, std::vector<Real>& rhs);
175 
176  //! compute the rhs of the potential equation on a single node or for the 0D case
177  /*!
178  * @param v vector with the variables (V, M, N, H)
179  */
180  Real computeLocalPotentialRhs ( const std::vector<Real>& v );
181 
182  //! Compute the rhs on a single node or for the 0D case
183  /*!
184  * @param v vector with the variables (V, M, N, H)
185  * @param rhs vector where we will insert the rhs of the equations
186  */
187  void computeRhs ( const std::vector<Real>& v, std::vector<Real>& rhs);
188 
189  //! compute the rhs of the gating variables with the RushLarsen scheme
190  /*!
191  * @param v vector with the variables (V, M, N, H)
192  * @param dt timestep
193  */
194  void computeGatingVariablesWithRushLarsen ( std::vector<Real>& v, const Real dt );
195 
196  //! Display information about the model
197  void showMe();
198 
199  //@}
200 
201 private:
202  //! Model Parameters
203 
204  //! Chemical kinetics parameters
205  Real M_gNa;
206  Real M_gK;
207  Real M_gL;
208  Real M_vNa;
209  Real M_vK;
210  Real M_vL;
211 
212  //@}
213 
214 }; // class IonicMinimalModel
215 
216 
217 
218 }// end namespace LifeV
219 
220 #endif
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
Definition: LifeV.hpp:175