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 #ifndef MONODOMAINSTIFFNESSMATRIXASSEMBLER_HPP_
00030 #define MONODOMAINSTIFFNESSMATRIXASSEMBLER_HPP_
00031
00032
00033 #include "AbstractCardiacFeVolumeIntegralAssembler.hpp"
00034 #include "HeartConfig.hpp"
00035 #include "AbstractCardiacTissue.hpp"
00036
00045 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00046 class MonodomainStiffnessMatrixAssembler
00047 : public AbstractCardiacFeVolumeIntegralAssembler<ELEMENT_DIM, SPACE_DIM, 1, false , true, NORMAL>
00048 {
00049 public:
00060 c_matrix<double,1*(ELEMENT_DIM+1),1*(ELEMENT_DIM+1)>
00061 ComputeMatrixTerm(
00062 c_vector<double, ELEMENT_DIM+1> &rPhi,
00063 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00064 ChastePoint<SPACE_DIM> &rX,
00065 c_vector<double,1> &rU,
00066 c_matrix<double, 1, SPACE_DIM> &rGradU ,
00067 Element<ELEMENT_DIM,SPACE_DIM>* pElement)
00068 {
00069 const c_matrix<double, SPACE_DIM, SPACE_DIM>& sigma_i = this->mpCardiacTissue->rGetIntracellularConductivityTensor(pElement->GetIndex());
00070
00071 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> temp = prod(sigma_i, rGradPhi);
00072 c_matrix<double, ELEMENT_DIM+1, ELEMENT_DIM+1> grad_phi_sigma_i_grad_phi =
00073 prod(trans(rGradPhi), temp);
00074
00075 return grad_phi_sigma_i_grad_phi;
00076 }
00077
00083 MonodomainStiffnessMatrixAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00084 AbstractCardiacTissue<ELEMENT_DIM,SPACE_DIM>* pTissue)
00085 : AbstractCardiacFeVolumeIntegralAssembler<ELEMENT_DIM,SPACE_DIM,1,false,true,NORMAL>(pMesh,pTissue)
00086 {
00087 }
00088 };
00089
00090 #endif