36 #include "AbstractCorrectionTermAssembler.hpp"
39 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
54 unsigned element_index = r_element.
GetIndex();
64 const std::type_info& r_zero_info =
typeid(*p_cell_zero);
66 for (
unsigned local_index=1; local_index<r_element.
GetNumNodes(); local_index++)
70 const std::type_info& r_info =
typeid(*p_cell);
71 if (r_zero_info != r_info)
82 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
87 for (
unsigned i=0; i<mStateVariablesAtQuadPoint.size(); i++)
89 mStateVariablesAtQuadPoint[i] = 0;
93 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
98 unsigned node_global_index = pNode->
GetIndex();
99 mIionicInterp += phiI * this->mpCardiacTissue->rGetIionicCacheReplicated()[ node_global_index ];
101 std::vector<double> state_vars = this->mpCardiacTissue->GetCardiacCellOrHaloCell(node_global_index)->GetStdVecStateVariables();
102 for (
unsigned i=0; i<mStateVariablesAtQuadPoint.size(); i++)
104 mStateVariablesAtQuadPoint[i] += phiI * state_vars[i];
108 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
112 if (!mElementsCanDoSvi[rElement.
GetIndex()])
116 double DELTA_IIONIC = 1;
119 assert(this->mpCardiacTissue->GetDoCacheReplication());
137 bool will_assemble = (diionic > DELTA_IIONIC);
142 mStateVariablesAtQuadPoint.resize(this->mpCardiacTissue->GetCardiacCellOrHaloCell(any_node)->GetNumberOfStateVariables() );
145 return will_assemble;
ElementIterator GetElementIteratorBegin(bool skipDeletedElements=true)
AbstractCorrectionTermAssembler(AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *pMesh, AbstractCardiacTissue< ELEM_DIM, SPACE_DIM > *pTissue)
static bool IsRegionBath(HeartRegionType regionId)
unsigned GetNodeGlobalIndex(unsigned localIndex) const
ElementIterator GetElementIteratorEnd()
virtual unsigned GetNumElements() const
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM > * mpCardiacTissue
void IncrementInterpolatedQuantities(double phiI, const Node< SPACE_DIM > *pNode)
bool GetOwnership() const
void ResetInterpolatedQuantities(void)
bool ElementAssemblyCriterion(Element< ELEM_DIM, SPACE_DIM > &rElement)
unsigned GetNumNodes() const
std::vector< bool > mElementsCanDoSvi
unsigned GetUnsignedAttribute()
unsigned GetIndex() const
unsigned GetIndex() const