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 MONODOMAINASSEMBLER_HPP_
00030 #define MONODOMAINASSEMBLER_HPP_
00031
00032
00033 #include "AbstractCardiacFeObjectAssembler.hpp"
00034 #include "MonodomainTissue.hpp"
00035 #include "MassMatrixAssembler.hpp"
00036 #include "MonodomainStiffnessMatrixAssembler.hpp"
00037
00042 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00043 class MonodomainAssembler
00044 : public AbstractCardiacFeObjectAssembler<ELEMENT_DIM,SPACE_DIM,1,true,true,CARDIAC>
00045 {
00046 protected:
00048 HeartConfig* mpConfig;
00049
00051 double mIionic;
00053 double mIIntracellularStimulus;
00054
00056 MassMatrixAssembler<ELEMENT_DIM, SPACE_DIM> mMassMatrixAssembler;
00057
00059 MonodomainStiffnessMatrixAssembler<ELEMENT_DIM, SPACE_DIM> mStiffnessMatrixAssembler;
00060
00074 c_matrix<double,1*(ELEMENT_DIM+1),1*(ELEMENT_DIM+1)> ComputeMatrixTerm(
00075 c_vector<double, ELEMENT_DIM+1> &rPhi,
00076 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00077 ChastePoint<SPACE_DIM> &rX,
00078 c_vector<double,1> &rU,
00079 c_matrix<double, 1, SPACE_DIM> &rGradU ,
00080 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00081
00095 c_vector<double,1*(ELEMENT_DIM+1)> ComputeVectorTerm(
00096 c_vector<double, ELEMENT_DIM+1> &rPhi,
00097 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi ,
00098 ChastePoint<SPACE_DIM> &rX ,
00099 c_vector<double,1> &rU,
00100 c_matrix<double, 1, SPACE_DIM> &rGradU ,
00101 Element<ELEMENT_DIM,SPACE_DIM>* pElement );
00102
00114 c_vector<double, ELEMENT_DIM> ComputeVectorSurfaceTerm(
00115 const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM>& rSurfaceElement,
00116 c_vector<double, ELEMENT_DIM>& rPhi,
00117 ChastePoint<SPACE_DIM>& rX);
00118
00119
00123 void ResetInterpolatedQuantities( void )
00124 {
00125 mIionic = 0;
00126 mIIntracellularStimulus = 0;
00127 }
00128
00135 void IncrementInterpolatedQuantities(double phiI, const Node<SPACE_DIM>* pNode);
00136
00137 public:
00138
00146 MonodomainAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00147 MonodomainTissue<ELEMENT_DIM,SPACE_DIM>* pTissue,
00148 unsigned numQuadPoints = 2);
00149 };
00150
00151 #endif