LifeV
IonicMitchellSchaeffer.cpp
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
29  @brief Ionic model based on Mitchell-Schaeffer model.
30  @date 03-2013
31  @author Luis Miguel De Oliveira Vilaca <luismiguel.deoliveiravilaca@epfl.ch>
32 
33  @contributors
34  @mantainer Luis Miguel De Oliveira Vilaca <luismiguel.deoliveiravilaca@epfl.ch>
35  @last update 03-2013
36  */
37 #include <lifev/electrophysiology/solver/IonicModels/IonicMitchellSchaeffer.hpp>
38 
39 
40 namespace LifeV
41 {
42 // ===================================================
43 //! Constructors
44 // ===================================================
46  super ( 2 ),
47  M_vGate ( 0.13 ),
48  M_tauClose ( 150.0 ),
49  M_tauOpen ( 120.0 ),
50  M_tauIn ( 0.3 ),
51  M_tauOut ( 6.0 )
52 {
53  M_restingConditions.at (0) = 0.0;
54  M_restingConditions.at (1) = 1.0;
55 }
56 
57 IonicMitchellSchaeffer::IonicMitchellSchaeffer ( Teuchos::ParameterList& parameterList ) :
58  super ( 2 )
59 {
60  M_vGate = parameterList.get ("vGate", 0.13);
61  M_tauClose = parameterList.get ("tauClose", 150.0);
62  M_tauOpen = parameterList.get ("tauOpen", 120.0);
63  M_tauIn = parameterList.get ("tauIn", 0.3);
64  M_tauOut = parameterList.get ("tauOut", 6.0);
65 
66  M_restingConditions.at (0) = 0.0;
67  M_restingConditions.at (1) = 1.0;
68 }
69 
71 {
72  M_vGate = model.M_vGate;
73  M_tauClose = model.M_tauClose;
74  M_tauOpen = model.M_tauOpen;
75  M_tauIn = model.M_tauIn;
76  M_tauOut = model.M_tauOut;
77 
78  M_numberOfEquations = model.M_numberOfEquations;
79  M_restingConditions = model.M_restingConditions;
80 }
81 
82 // ===================================================
83 //! Operator
84 // ===================================================
86 {
87  M_vGate = model.M_vGate;
88  M_tauClose = model.M_tauClose;
89  M_tauOpen = model.M_tauOpen;
90  M_tauIn = model.M_tauIn;
91  M_tauOut = model.M_tauOut;
92 
93  M_numberOfEquations = model.M_numberOfEquations;
94  M_restingConditions = model.M_restingConditions;
95 
96  return *this;
97 }
98 
99 
100 // ===================================================
101 //! Methods
102 // ===================================================
103 //Only gating variables
104 void IonicMitchellSchaeffer::computeGatingRhs ( const std::vector<Real>& v,
105  std::vector<Real>& rhs )
106 {
107 
108  rhs[0] = computeLocalGatingRhs ( v );
109 
110 }
111 
112 //Potential and gating variables
113 void IonicMitchellSchaeffer::computeRhs (const std::vector<Real>& v,
114  std::vector<Real>& rhs )
115 {
116  rhs[0] = computeLocalPotentialRhs ( v );
117  rhs[1] = computeLocalGatingRhs ( v );
118 }
119 
120 
121 
122 Real IonicMitchellSchaeffer::computeLocalPotentialRhs ( const std::vector<Real>& v )
123 {
124  return ( - ( v[1] / M_tauIn ) * v[0] * v[0] * ( v[0] - 1 ) - v[0] / M_tauOut );
125 }
126 
127 Real IonicMitchellSchaeffer::computeLocalGatingRhs ( const std::vector<Real>& v )
128 {
129  if (v[0] <= M_vGate)
130  {
131  return ( ( 1 - v[1] ) / M_tauOpen );
132  }
133  else
134  {
135  return ( - v[1] / M_tauClose );
136  }
137 }
138 
140 {
141  std::cout << "\n\n\t\tIonicMitchellSchaeffer Informations\n\n";
142  std::cout << "number of unkowns: " << this->Size() << std::endl;
143 
144  std::cout << "\n\t\tList of model parameters:\n\n";
145  std::cout << "vGate: " << this->vGate() << std::endl;
146  std::cout << "tauClose: " << this->tauClose() << std::endl;
147  std::cout << "tauOpen: " << this->tauOpen() << std::endl;
148  std::cout << "tauIn: " << this->tauIn() << std::endl;
149  std::cout << "tauOut: " << this->tauOut() << std::endl;
150 
151  std::cout << "\n\t\t End of IonicMitchellSchaeffer Informations\n\n\n";
152 
153 }
154 
155 
156 }
IonicMitchellSchaeffer & operator=(const IonicMitchellSchaeffer &model)
Operator.
void showMe()
Display information about the model.
void updateInverseJacobian(const UInt &iQuadPt)
IonicMitchellSchaeffer(const IonicMitchellSchaeffer &model)
double Real
Generic real data.
Definition: LifeV.hpp:175
void computeGatingRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
Methods.
void computeRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
This methods contains the actual evaluation of the rhs of all state variablesin the model (0D version...
Real computeLocalGatingRhs(const std::vector< Real > &v)
IonicMitchellSchaeffer(Teuchos::ParameterList &parameterList)
Real computeLocalPotentialRhs(const std::vector< Real > &v)
This methods contains the actual evaluation of the rhs of the voltage equation only (0D version) ...
IonicModel - This class implements an ionic model.