LifeV
HeartFunctors.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
29  @brief Heart Functors for the Luo-Rudy Kinetics
30 
31  @date 04−2010
32  @author
33 
34  @contributor Simone Rossi <simone.rossi@epfl.ch>, Ricardo Ruiz-Baier <ricardo.ruiz@epfl.ch>
35  @mantainer Simone Rossi <simone.rossi@epfl.ch>
36  */
37 
38 
39 #ifndef _HEARTFUNCTORS_H_
40 #define _HEARTFUNCTORS_H_
41 
42 
43 #include <boost/shared_ptr.hpp>
44 #include <boost/bind.hpp>
45 
46 
47 
48 #include <lifev/core/filter/GetPot.hpp>
49 #include <lifev/core/array/MatrixEpetra.hpp>
50 
51 #include <lifev/core/fem/FESpace.hpp>
52 
53 
54 namespace LifeV
55 {
56 
57 class HeartFunctors
58 {
59 public:
60 
61  //! @name Public Types
62  //@{
63 
64  typedef std::function<Real ( Real const& x, Real const& y, Real const& z, Real const&, ID const& id , Real const&) > region_Type;
65  typedef std::function<Real ( Real const& x, Real const& y, Real const& z, Real const&, ID const& id) > region1_Type;
66 
67  //@}
68 
69 
70  //! @name Constructor & Destructor
71  //@{
72 
73  HeartFunctors();
74 
75  HeartFunctors ( GetPot& dataFile );
76 
77  virtual ~HeartFunctors() {}
78  //@}
79 
80 
81  //! @name Set Methods
82  //@{
83 
84  /**
85  * current volume source
86  *
87  * Define the stimulation current
88  */
89  Real setAppliedCurrent ( const Real& x, const Real& y, const Real& z, const Real& t ) const;
90 
91  Real setAppliedCurrentZygote (const double& t, const double& x, const double& y, const double& z, const ID& /*i*/, const markerID_Type& ref );
92 
93  Real setStimulus ( const Real& t, const Real& x, const Real& y, const Real& z, const ID& id) const;
94 
95 
96 
97 
98 
99  /**
100  *
101  * Reduces the conductivity in a sphere
102  *
103  */
104  Real setReducedConductivitySphere ( const Real& x, const Real& y, const Real& z, const Real& /*t*/, const ID& id, const Real& sigma) const;
105 
106  /**
107  *
108  * Reduces the conductivity in a cylinder
109  *
110  */
111  Real setReducedConductivityCylinder ( const Real& x, const Real& y, const Real& z, const Real& /*t*/, const ID& id, const Real& sigma ) const;
112 
113  Real setReducedConductivityBox ( const Real& x, const Real& y, const Real& z, const Real& /*t*/, const ID& id, const Real& sigma ) const;
114 
115 
116  Real setInitialScalar ( const Real& t, const Real& x, const Real& y, const Real& z, const ID& id );
117 
118  Real setZeroScalar ( const Real& t, const Real& x, const Real& y, const Real& z , const ID& id );
119  //@}
120 
121 
122  //! @name Get Methods
123  //@{
124 
125 
126 
127 
128  region1_Type appliedCurrent();
129 
130  region1_Type stimulus();
131 
132  const region_Type reducedConductivitySphere();
133 
134  const region_Type reducedConductivityCylinder();
135 
136  const region_Type reducedConductivityBox();
137 
138  const region1_Type initialScalar();
139 
140  const region1_Type zeroScalar();
141 
142  //@}
143 
144  GetPot M_dataFile;
145 
146  std::shared_ptr<Epetra_Comm> M_comm;
147 
148  Int M_stimulusSource;
149  Real M_stimulusPeriod1;
150  Real M_stimulusPeriod2;
151  Real M_stimulusPeriod3;
152  Real M_stimulusPeriod4;
153  Real M_stimulusPeriod5;
154  Real M_stimulusPeriod6;
155 
156  Real M_stimulusStart1;
157  Real M_stimulusStop1;
158  Real M_stimulusValue1;
159  Real M_stimulusRadius1;
160  KN<Real> M_stimulusCenter1;
161 
162  Real M_stimulusStart2;
163  Real M_stimulusStop2;
164  Real M_stimulusValue2;
165  Real M_stimulusRadius2;
166  KN<Real> M_stimulusCenter2;
167 
168  Real M_stimulusStart3;
169  Real M_stimulusStop3;
170  Real M_stimulusValue3;
171  Real M_stimulusRadius3;
172  KN<Real> M_stimulusCenter3;
173 
174  Real M_stimulusStart4;
175  Real M_stimulusStop4;
176  Real M_stimulusValue4;
177  Real M_stimulusRadius4;
178  KN<Real> M_stimulusCenter4;
179 
180  Real M_stimulusStart5;
181  Real M_stimulusStop5;
182  Real M_stimulusValue5;
183  Real M_stimulusRadius5;
184  KN<Real> M_stimulusCenter5;
185 
186  Real M_stimulusStart6;
187  Real M_stimulusStop6;
188  Real M_stimulusValue6;
189  Real M_stimulusRadius6;
190  KN<Real> M_stimulusCenter6;
191 
192  Real M_sphereX;
193  Real M_sphereY;
194  Real M_sphereZ;
195  Real M_sphereR;
196  KN<Real> M_conductivityReduction;
197 
198  Real M_cylinderX;
199  Real M_cylinderY;
200  Real M_cylinderZ;
201  Real M_cylinderA;
202  Real M_cylinderB;
203  Real M_cylinderC;
204  Real M_cylinderR;
205  Real M_minimumCylinderX;
206  Real M_maximumCylinderX;
207 
208  Real M_minimumBoxX;
209  Real M_minimumBoxY;
210  Real M_minimumBoxZ;
211 
212  Real M_maximumBoxX;
213  Real M_maximumBoxY;
214  Real M_maximumBoxZ;
215 
216  //parametres Iapp IappZygote REO
217  Real M_timePeriod;
218  Real M_appliedCurrentRightVentriculeAngle;
219  Real M_appliedCurrentLeftVentriculeAngle;
220  Real M_appliedCurrentStimulusTimeRightVentricule;
221  Real M_appliedCurrentStimulusTimeLeftVentrivcule;
222  Real M_ventricularFibrillation;
223  Real M_nb_fibrillationSources;
224  Real M_fibrillationSources;
225  Real M_restPotential;
226 
227 private:
228 
229  //! @name Unimplemented Methods
230  //@{
231 
232 
233 
234  HeartFunctors ( const HeartFunctors& heartFunctors );
235 
236  HeartFunctors& operator= ( const HeartFunctors& heartFunctors );
237 
238  //@}
239 
240 };
241 }
242 
243 #endif
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
ID markerID_Type
markerID_Type is the type used to store the geometric entity marker IDs
Definition: Marker.hpp:81
uint32_type ID
IDs.
Definition: LifeV.hpp:194
double Real
Generic real data.
Definition: LifeV.hpp:175