MonodomainStiffnessMatrixAssembler.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef MONODOMAINSTIFFNESSMATRIXASSEMBLER_HPP_
00037 #define MONODOMAINSTIFFNESSMATRIXASSEMBLER_HPP_
00038
00039
00040 #include "AbstractCardiacFeVolumeIntegralAssembler.hpp"
00041 #include "HeartConfig.hpp"
00042 #include "AbstractCardiacTissue.hpp"
00043
00052 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00053 class MonodomainStiffnessMatrixAssembler
00054 : public AbstractCardiacFeVolumeIntegralAssembler<ELEMENT_DIM, SPACE_DIM, 1, false , true, NORMAL>
00055 {
00056 public:
00068 c_matrix<double,1*(ELEMENT_DIM+1),1*(ELEMENT_DIM+1)>
00069 ComputeMatrixTerm(
00070 c_vector<double, ELEMENT_DIM+1> &rPhi,
00071 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00072 ChastePoint<SPACE_DIM> &rX,
00073 c_vector<double,1> &rU,
00074 c_matrix<double, 1, SPACE_DIM> &rGradU ,
00075 Element<ELEMENT_DIM,SPACE_DIM>* pElement)
00076 {
00077 const c_matrix<double, SPACE_DIM, SPACE_DIM>& sigma_i = this->mpCardiacTissue->rGetIntracellularConductivityTensor(pElement->GetIndex());
00078
00079 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> temp = prod(sigma_i, rGradPhi);
00080 c_matrix<double, ELEMENT_DIM+1, ELEMENT_DIM+1> grad_phi_sigma_i_grad_phi =
00081 prod(trans(rGradPhi), temp);
00082
00083 return grad_phi_sigma_i_grad_phi;
00084 }
00085
00091 MonodomainStiffnessMatrixAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00092 AbstractCardiacTissue<ELEMENT_DIM,SPACE_DIM>* pTissue)
00093 : AbstractCardiacFeVolumeIntegralAssembler<ELEMENT_DIM,SPACE_DIM,1,false,true,NORMAL>(pMesh,pTissue)
00094 {
00095 }
00096 };
00097
00098 #endif