Line |
Branch |
Exec |
Source |
1 |
|
|
// ______ ______ _ _ _____ ______ |
2 |
|
|
// | ____| ____| | (_)/ ____| | ____| |
3 |
|
|
// | |__ | |__ | | _| (___ ___| |__ |
4 |
|
|
// | __| | __| | | | |\___ \ / __| __| |
5 |
|
|
// | | | |____| |____| |____) | (__| |____ |
6 |
|
|
// |_| |______|______|_|_____/ \___|______| |
7 |
|
|
// Finite Elements for Life Sciences and Engineering |
8 |
|
|
// |
9 |
|
|
// License: LGL2.1 License |
10 |
|
|
// FELiScE default license: LICENSE in root folder |
11 |
|
|
// |
12 |
|
|
// Main authors: M. Boulakia |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
#ifndef _MVSOLVER_HPP |
16 |
|
|
#define _MVSOLVER_HPP |
17 |
|
|
|
18 |
|
|
// System includes |
19 |
|
|
|
20 |
|
|
// External includes |
21 |
|
|
|
22 |
|
|
// Project includes |
23 |
|
|
#include "Solver/ionicSolver.hpp" |
24 |
|
|
#include "Solver/cardiacFunction.hpp" |
25 |
|
|
|
26 |
|
|
namespace felisce { |
27 |
|
|
class MVSolver: |
28 |
|
|
public IonicSolver { |
29 |
|
|
public: |
30 |
|
|
///Constructor. |
31 |
|
|
MVSolver(FelisceTransient::Pointer fstransient); |
32 |
|
|
///Destructor. |
33 |
|
|
~MVSolver() override; |
34 |
|
|
|
35 |
|
|
///Compute RHS in EDO. |
36 |
|
|
void computeRHS() override; |
37 |
|
|
///Solve the EDO. |
38 |
|
|
void solveEDO() override; |
39 |
|
|
///Computation of ionic current from EDO solution. |
40 |
|
|
void computeIon() override; |
41 |
|
|
|
42 |
|
|
|
43 |
|
|
///For Verdandi, if assimilation or not. |
44 |
|
|
void setAssimilation(bool); |
45 |
|
|
|
46 |
|
|
///For Verdandi, std::set parameters. |
47 |
|
|
void setParameters(std::vector<double>); |
48 |
|
|
|
49 |
|
|
///For Verdandi, get parameters. |
50 |
|
|
void getParameters(std::vector<double>&); |
51 |
|
|
|
52 |
|
|
///For Verdandi, get EDOs. |
53 |
|
|
void getEDOvalues(std::vector<double>&,std::vector<double>&,std::vector<double>&); |
54 |
|
|
void getEDOpvalues(std::vector<double>&,std::vector<double>&,std::vector<double>&); |
55 |
|
|
|
56 |
|
|
///For Verdandi, std::set EDOs. |
57 |
|
|
void setEDOvalues(std::vector<double>,std::vector<double>,std::vector<double>); |
58 |
|
|
|
59 |
|
|
///For Verdandi, std::set posparam. |
60 |
|
|
void setPosParam(std::vector<int>); |
61 |
|
|
|
62 |
|
|
///For Verdandi, get posparam. |
63 |
|
|
void getPosParam(std::vector<int>&); |
64 |
|
|
|
65 |
|
|
///For Verdandi, Vm. |
66 |
|
|
void getVmvalues(std::vector<double>&); |
67 |
|
|
void setVmvalues(std::vector<double>); |
68 |
|
|
void getVmpvalues(std::vector<double>&); |
69 |
|
|
|
70 |
|
|
// Infarct |
71 |
|
✗ |
virtual inline const HeteroTauOut& fctTauOut() const { |
72 |
|
✗ |
return m_heteroTauOut; |
73 |
|
|
} |
74 |
|
✗ |
virtual inline HeteroTauOut& fctTauOut() { |
75 |
|
✗ |
return m_heteroTauOut; |
76 |
|
|
} |
77 |
|
|
inline const std::vector<double>& tauOut() const { |
78 |
|
|
return m_tauOut; |
79 |
|
|
} |
80 |
|
✗ |
inline std::vector<double>& tauOut() { |
81 |
|
✗ |
return m_tauOut; |
82 |
|
|
} |
83 |
|
|
|
84 |
|
|
// functor and acces to variable properties fhn |
85 |
|
|
|
86 |
|
|
inline const std::vector<int>& cellType() const { |
87 |
|
|
return m_cellType; |
88 |
|
|
} |
89 |
|
✗ |
inline std::vector<int>& cellType() { |
90 |
|
✗ |
return m_cellType; |
91 |
|
|
} |
92 |
|
|
|
93 |
|
|
inline const HeteroMVCoeff& MVCoeff() const { |
94 |
|
|
return m_heteroCoeff; |
95 |
|
|
} |
96 |
|
✗ |
inline HeteroMVCoeff& MVCoeff() { |
97 |
|
✗ |
return m_heteroCoeff; |
98 |
|
|
} |
99 |
|
|
|
100 |
|
|
protected: |
101 |
|
|
HeteroMVCoeff m_heteroCoeff; |
102 |
|
|
std::vector<int> m_cellType; |
103 |
|
|
///To simulate infarction. |
104 |
|
|
HeteroTauOut m_heteroTauOut; |
105 |
|
|
std::vector<double> m_tauOut; |
106 |
|
|
private: |
107 |
|
|
std::vector<double> m_uo; // u_o |
108 |
|
|
std::vector<double> m_uu; // u_u |
109 |
|
|
std::vector<double> m_thetav; // theta_v |
110 |
|
|
std::vector<double> m_thetaw; // theta_w |
111 |
|
|
std::vector<double> m_thetavm; // theta_v^- |
112 |
|
|
std::vector<double> m_thetao; // theta_o |
113 |
|
|
std::vector<double> m_tauvm1; // tau_v1^- |
114 |
|
|
std::vector<double> m_tauvm2; // tau_v2^- |
115 |
|
|
std::vector<double> m_tauvp; // tau_v^+ |
116 |
|
|
std::vector<double> m_tauwm1; // tau_w1^- |
117 |
|
|
std::vector<double> m_tauwm2; // tau_w2^+ |
118 |
|
|
std::vector<double> m_kwm; // k_w^- |
119 |
|
|
std::vector<double> m_uwm; // u_w^- |
120 |
|
|
std::vector<double> m_tauwm; // tau_w^+ |
121 |
|
|
std::vector<double> m_taufi; // tau_fi |
122 |
|
|
std::vector<double> m_tauo1; // tau_o1 |
123 |
|
|
std::vector<double> m_tauo2; // tau_o2 |
124 |
|
|
std::vector<double> m_tauso1; // tau_so1 |
125 |
|
|
std::vector<double> m_tauso2; // tau_so2 |
126 |
|
|
std::vector<double> m_kso; // k_so |
127 |
|
|
std::vector<double> m_uso; // u_so |
128 |
|
|
std::vector<double> m_taus1; // tau_s1 |
129 |
|
|
std::vector<double> m_taus2; // tau_s2 |
130 |
|
|
std::vector<double> m_ks; // k_s |
131 |
|
|
std::vector<double> m_us; // u_s |
132 |
|
|
std::vector<double> m_tausi; // tau_si |
133 |
|
|
std::vector<double> m_tauwinf; // tau_{w inf} |
134 |
|
|
std::vector<double> m_winfstar; // w^*_{inf} |
135 |
|
|
std::vector<double> m_gfi; // g_{fi} |
136 |
|
|
std::vector<double> m_gso; // g_{so} |
137 |
|
|
std::vector<double> m_gsi; // g_{si} |
138 |
|
|
|
139 |
|
|
/// Verdandi variables |
140 |
|
|
std::vector<int> m_posparam; |
141 |
|
|
bool m_assimilation; //if assimilation or not |
142 |
|
|
std::vector<double> m_vEDO,m_wEDO,m_sEDO; |
143 |
|
|
std::vector<double> p_vEDO,p_wEDO,p_sEDO; |
144 |
|
|
std::vector<double> m_Vm,p_Vm; |
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
}; |
149 |
|
|
} |
150 |
|
|
|
151 |
|
|
#endif |
152 |
|
|
|