38 #include <lifev/electrophysiology/solver/IonicModels/IonicFitzHughNagumo.hpp> 57 M_restingConditions.at (0) = 1e-8;
58 M_restingConditions.at (1) = 0.3;
64 setup ( parameterList );
66 M_restingConditions.at (0) = 1e-8;
67 M_restingConditions.at (1) = 0.3;
81 M_numberOfEquations = model.M_numberOfEquations;
82 M_restingConditions = model.M_restingConditions;
99 M_numberOfEquations = model.M_numberOfEquations;
100 M_restingConditions = model.M_restingConditions;
111 M_G = parameterList.get (
"G", 1.5);
112 M_Vth = parameterList.get (
"Vth", 13.);
113 M_Vp = parameterList.get (
"Vp", 100.);
114 M_Eta1 = parameterList.get (
"Eta1", 4.4);
115 M_Eta2 = parameterList.get (
"Eta2", 0.012);
116 M_Eta3 = parameterList.get (
"Eta3", 1.);
124 std::vector<Real>& rhs )
126 Real dr = M_Eta * v[0] - M_Gamma * v[1] ;
133 std::vector<Real>& rhs )
135 Real dV = - ( M_G * v[0] * ( 1.0 - v[0] / M_Vth ) * ( 1.0 - v[0] / M_Vp ) + M_Eta1 * v[0] * v[1] );
136 Real dr = M_Eta * v[0] - M_Gamma * v[1] ;
144 Real dV = - ( M_G * v[0] * ( 1.0 - v[0] / M_Vth ) * ( 1.0 - v[0] / M_Vp ) + M_Eta1 * v[0] * v[1] );
145 Real dr = M_Eta * v[0] - M_Gamma * v[1] ;
154 return ( - ( M_G * v[0] * ( 1.0 - v[0] / M_Vth ) * ( 1.0 - v[0] / M_Vp ) + M_Eta1 * v[0] * v[1] ) );
159 std::vector< std::vector<Real> > J (2, std::vector<Real> (2, 0.0) );
160 J[0][0] = - ( M_G / ( M_Vth * M_Vp ) ) * ( M_Vth * ( M_Vp - 2.0 * v[0] ) + v[0] * ( 3.0 * v[0] - 2.0 * M_Vp ) ) - M_Eta1 * v[1];
161 J[0][1] = -M_Eta1 * v[0];
171 J (0, 0) = - ( M_G / ( M_Vth * M_Vp ) ) * ( M_Vth * ( M_Vp - 2.0 * v[0] ) + v[0] * ( 3.0 * v[0] - 2.0 * M_Vp ) ) - M_Eta1 * v[1];
172 J (0, 1) = -M_Eta1 * v[0];
181 matrix_Type J (v.map(), M_numberOfEquations,
false);
182 const Int* k = v.blockMap().MyGlobalElements();
184 int* Indices =
new int[M_numberOfEquations];
185 double* Values =
new double[M_numberOfEquations];
189 MatrixSmall<2, 2> df;
196 Values[0] = df (0, 0);
197 Values[1] = df (0, 1);
198 J.matrixPtr()->InsertGlobalValues (0, M_numberOfEquations, Values, Indices);
199 Values[0] = df (1, 0);
200 Values[1] = df (1, 1);
201 J.matrixPtr()->InsertGlobalValues (1, M_numberOfEquations, Values, Indices);
213 std::cout <<
"\n\n\t\tIonicFitzHughNagumo Informations\n\n";
214 std::cout <<
"number of unkowns: " <<
this->Size() << std::endl;
216 std::cout <<
"\n\t\tList of model parameters:\n\n";
217 std::cout <<
"G : " <<
this->G() << std::endl;
218 std::cout <<
"Vth : " <<
this->Vth() << std::endl;
219 std::cout <<
"Vp : " <<
this->Vp() << std::endl;
220 std::cout <<
"Eta1 : " <<
this->Eta1() << std::endl;
221 std::cout <<
"Eta2 : " <<
this->Eta2() << std::endl;
222 std::cout <<
"Eta3 : " <<
this->Eta3() << std::endl;
223 std::cout <<
"Eta : " <<
this->Eta() << std::endl;
224 std::cout <<
"Gamma: " <<
this->Gamma() << std::endl;
226 std::cout <<
"\n\t\t End of IonicFitzHughNagumo Informations\n\n\n";
IonicFitzHughNagumo(const IonicFitzHughNagumo &model)
IonicFitzHughNagumo()
Constructor.
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
void computeRhs(const VectorSmall< 2 > &v, VectorSmall< 2 > &rhs)
void showMe()
Display information about the model.
void computeGatingRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
A new ionic model must have the following methods ///.
IonicFitzHughNagumo & operator=(const IonicFitzHughNagumo &model)
Operator.
double Real
Generic real data.
Real computeLocalPotentialRhs(const std::vector< Real > &v)
This methods contains the actual evaluation of the rhs of the voltage equation only (0D version) ...
MatrixEpetra< Real > matrix_Type
Real M_G
Model Parameters.
IonicFitzHughNagumo(Teuchos::ParameterList ¶meterList)
MatrixSmall< 2, 2 > getJac(const VectorSmall< 2 > &v, Real h=1.0e-8)
void setup(Teuchos::ParameterList ¶meterList)
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...
std::vector< std::vector< Real > > getJac(const std::vector< Real > &v, Real h=1.0e-8)
This methods computes the Jacobian numerically.
matrix_Type getJac(const vector_Type &v, Real h=1.0e-8)
This methods computes the Jacobian numerically.