36 #ifndef MONODOMAINPURKINJECABLEASSEMBLER_HPP_ 37 #define MONODOMAINPURKINJECABLEASSEMBLER_HPP_ 39 #include "AbstractFeCableIntegralAssembler.hpp" 40 #include "HeartConfig.hpp" 41 #include "PdeSimulationTime.hpp" 58 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
79 c_vector<double, 2>& rPhi,
80 c_matrix<double, ELEMENT_DIM, 2>& rGradPhi,
82 c_vector<double,PROBLEM_DIM>& rU,
83 c_matrix<double,PROBLEM_DIM, SPACE_DIM>& rGradU,
86 c_matrix<double,PROBLEM_DIM*2, PROBLEM_DIM*2> ret = zero_matrix<double>(PROBLEM_DIM*2, PROBLEM_DIM*2);
95 for(
unsigned i=0; i<2; i++)
97 for(
unsigned j=0; j<2; j++)
104 for (
unsigned dim=0; dim<SPACE_DIM; dim++)
106 ret(2*i+1,2*j+1) += conductivity*rGradPhi(dim,i)*rGradPhi(dim,j);
109 ret(2*i+1,2*j+1) *= fibre_cross_section_area;
128 double radius = (*iter)->GetAttribute();
129 if (fabs(radius)<=DBL_EPSILON)
131 EXCEPTION(
"Radii not provided for all Purkinje elements - should be present in the mesh file or defined in test");
137 #endif // MONODOMAINPURKINJECABLEASSEMBLER_HPP_ CableElementIterator GetCableElementIteratorEnd() const
double GetPurkinjeSurfaceAreaToVolumeRatio()
static const unsigned PROBLEM_DIM
c_matrix< double, PROBLEM_DIM *2, PROBLEM_DIM *2 > ComputeCableMatrixTerm(c_vector< double, 2 > &rPhi, c_matrix< double, ELEMENT_DIM, 2 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, PROBLEM_DIM > &rU, c_matrix< double, PROBLEM_DIM, SPACE_DIM > &rGradU, Element< 1, SPACE_DIM > *pElement)
#define EXCEPTION(message)
CableElementIterator GetCableElementIteratorBegin() const
MonodomainPurkinjeCableAssembler(MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
static double GetPdeTimeStepInverse()
double GetPurkinjeConductivity()
double GetPurkinjeCapacitance()
static HeartConfig * Instance()
std::vector< Element< 1, SPACE_DIM > * >::const_iterator CableElementIterator