LifeV
HeartIonicData.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 File containing a class for handling Ionic model data with GetPot
30 
31  @date 11−2007
32  @author Lucia Mirabella <lucia.mirabella@gmail.com>
33  @author Mauro Perego <perego.mauro@gmail.com>
34 
35  @contributor Simone Rossi <simone.rossi@epfl.ch>, Ricardo Ruiz-Baier <ricardo.ruiz@epfl.ch>, J.Castelneau (INRIA)
36  @mantainer Simone Rossi <simone.rossi@epfl.ch>
37  */
38 
39 #include <lifev/heart/solver/HeartIonicData.hpp>
40 
41 
42 namespace LifeV
43 {
44 
45 
46 // ===================================================
47 // Constructors & Destructor
48 // ===================================================
49 //! Constructors
50 HeartIonicData::HeartIonicData ( const GetPot& dataFile ) :
51  MeshData ( dataFile, "electric/space_discretization" ),
52  TimeData ( dataFile, "electric/time_discretization" )
53 {
54  setup (dataFile);
55 }
56 
58  MeshData ( ),
59  TimeData ( ),
60  M_verbose ( ),
61  M_RMCParameterA ( ),
62  M_RMCParameterB ( ),
63  M_RMCParameterC1 ( ),
64  M_RMCParameterC2 ( ),
65  M_RMCParameterD ( ),
66  M_RMCTimeUnit ( ),
70  // Mitchell & Schaeffer
71  M_MSTauIn ( ),
72  M_MSTauOut ( ),
73  M_MSTauOpen ( ),
74  M_MSTauClose ( ),
79  M_MSInitialTime ( ),
80  M_MSTend ( ),
81  M_MSBDForder ( ),
83 {
84 }
85 
87  MeshData ( dataIonic ),
88  TimeData ( dataIonic ),
89  M_verbose ( dataIonic.M_verbose ),
90  M_RMCParameterA ( dataIonic.M_RMCParameterA ),
91  M_RMCParameterB ( dataIonic.M_RMCParameterB ),
94  M_RMCParameterD ( dataIonic.M_RMCParameterD ),
95  M_RMCTimeUnit ( dataIonic.M_RMCTimeUnit ),
99  // Mitchell & Schaeffer
100  M_MSTauIn ( dataIonic.M_MSTauIn ),
101  M_MSTauOut ( dataIonic.M_MSTauOut ),
102  M_MSTauOpen ( dataIonic.M_MSTauOpen ),
103  M_MSTauClose ( dataIonic.M_MSTauClose ),
108  M_MSInitialTime ( dataIonic.M_MSInitialTime ),
109  M_MSTend ( dataIonic.M_MSTend ),
110  M_MSBDForder ( dataIonic.M_MSBDForder ),
112 {
113 }
114 
115 
116 // ===================================================
117 // Methods
118 // ===================================================
120 HeartIonicData::operator= ( const HeartIonicData& dataIonic )
121 {
122  if ( this != &dataIonic )
123  {
130  M_RMCTimeUnit = dataIonic.M_RMCTimeUnit;
134  // Mitchell & Schaeffer
135  M_MSTauIn = dataIonic.M_MSTauIn;
136  M_MSTauOut = dataIonic.M_MSTauOut;
137  M_MSTauOpen = dataIonic.M_MSTauOpen;
138  M_MSTauClose = dataIonic.M_MSTauClose;
144  M_MSTend = dataIonic.M_MSTend;
145  M_MSBDForder = dataIonic.M_MSBDForder;
146 
147  }
148  return *this;
149 }
150 
151 void
152 HeartIonicData::setup ( const GetPot& dataFile )
153 {
154  M_MSHasHeterogeneousTauClose = dataFile ( "electric/physics/hasHeteroTauClose", 1 );
155  M_RMCParameterA = dataFile ( "electric/physics/a", 0.13 ); // 0.13 adim //RogersMcCulloch1994
156  M_RMCParameterB = dataFile ( "electric/physics/b", 0.013 ); // 0.013 adim //RogersMcCulloch1994
157  M_RMCParameterC1 = dataFile ( "electric/physics/c1", 0.26 ); // 0.26 adim //RogersMcCulloch1994
158  M_RMCParameterC2 = dataFile ( "electric/physics/c2", 0.1 ); //0.1 adim //RogersMcCulloch1994
159  M_RMCParameterD = dataFile ( "electric/physics/d", 1 ); //1 adim //RogersMcCulloch1994
160  M_RMCTimeUnit = dataFile ( "electric/physics/T", 0.63 ); //0.63ms //RogersMcCulloch1994
161  M_RMCPotentialAmplitude = dataFile ( "electric/physics/A", 110 ); //130mV //RogersMcCulloch1994
162  M_RMCRestPotential = dataFile ( "electric/physics/u0", -84.0 ); //-84mV //RogersMcCulloch1994
163  M_RMCInitialRepolarization = dataFile ( "electric/physics/winit", 0 );
164  // Mitchell & Schaeffer
165  M_MSTauIn = dataFile ( "electric/physics/tau_in", 0.8 );
166  M_MSPotentialMinimum = dataFile ( "electric/physics/v_min", -80.0 );
167  M_MSPotentialMaximum = dataFile ( "electric/physics/v_max", 20.0 );
168  M_MSReactionAmplitude = dataFile ( "electric/physics/reac_amp", 0.2 );
169  M_MSTauOut = dataFile ( "electric/physics/tau_out", 18.0 );
170  M_MSTauOpen = dataFile ( "electric/physics/tau_open", 100.0 );
171  M_MSTauClose = dataFile ( "electric/physics/tau_close", 100.0 );
172  M_MSCriticalPotential = dataFile ( "electric/physics/vcrit", -67.0 );
173  M_MSInitialTime = dataFile ( "electric/physics/init_time", 0.0 );
174  M_MSTend = dataFile ( "electric/physics/end_time", 1000.0 );
175  M_MSBDForder = dataFile ( "electric/time_discretization/BDF_order", 1 );
176 
177 }
178 
179 // Output
180 void HeartIonicData::showMe ( std::ostream& output )
181 {
182  output << " The output is still to be coded! \n" << std::endl;
183 }
184 
185 }
double operator()(const char *VarName, const double &Default) const
Definition: GetPot.hpp:2033
HeartIonicData & operator=(const HeartIonicData &dataIonic)
HeartIonicData()
Constructors.
HeartIonicData(const HeartIonicData &dataIonic)
Real M_RMCParameterA
RogersMcCulloch (RMC) 1994 Ionic Model parameters.
MeshData - class for handling spatial discretization.
Definition: MeshData.hpp:72
Real M_MSTauIn
Mitchell & Schaeffer (MS)
HeartIonicData(const GetPot &dataFile)
Constructors.
MeshData()
Empty Constructor.
Definition: MeshData.cpp:51
int operator()(const char *VarName, int Default) const
Definition: GetPot.hpp:2021
void setup(const GetPot &dataFile)
external setup: set all the data for the simulation
void showMe(std::ostream &output=std::cout)
output: show the data used for the simulation