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 #ifndef BIDOMAINASSEMBLER_HPP_
00032 #define BIDOMAINASSEMBLER_HPP_
00033
00034 #include "AbstractFeObjectAssembler.hpp"
00035 #include "BidomainTissue.hpp"
00036 #include "HeartConfig.hpp"
00037
00042 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00043 class BidomainAssembler : public AbstractFeObjectAssembler<ELEMENT_DIM,SPACE_DIM,2,true,true,CARDIAC>
00044 {
00045 protected:
00047 BidomainTissue<SPACE_DIM>* mpBidomainTissue;
00049 HeartConfig* mpConfig;
00051 double mIionic;
00053 double mIIntracellularStimulus;
00055 double mIExtracellularStimulus;
00057 double mDt;
00058
00062 void ResetInterpolatedQuantities();
00063
00070 void IncrementInterpolatedQuantities(double phiI, const Node<SPACE_DIM>* pNode);
00071
00072
00086 virtual c_matrix<double,2*(ELEMENT_DIM+1),2*(ELEMENT_DIM+1)> ComputeMatrixTerm(
00087 c_vector<double, ELEMENT_DIM+1> &rPhi,
00088 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00089 ChastePoint<SPACE_DIM> &rX,
00090 c_vector<double,2> &rU,
00091 c_matrix<double, 2, SPACE_DIM> &rGradU ,
00092 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00093
00107 virtual c_vector<double,2*(ELEMENT_DIM+1)> ComputeVectorTerm(
00108 c_vector<double, ELEMENT_DIM+1> &rPhi,
00109 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00110 ChastePoint<SPACE_DIM> &rX,
00111 c_vector<double,2> &u,
00112 c_matrix<double, 2, SPACE_DIM> &rGradU ,
00113 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00114
00126 virtual c_vector<double, 2*ELEMENT_DIM> ComputeVectorSurfaceTerm(
00127 const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM> &rSurfaceElement,
00128 c_vector<double,ELEMENT_DIM> &rPhi,
00129 ChastePoint<SPACE_DIM> &rX);
00130
00131 public:
00132
00141 BidomainAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00142 BidomainTissue<SPACE_DIM>* pTissue,
00143 double dt,
00144 unsigned numQuadPoints = 2);
00145
00149 ~BidomainAssembler()
00150 {
00151 }
00152 };
00153
00154 #endif