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)
83 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
88 for(
unsigned i=0; i<mStateVariablesAtQuadPoint.size(); i++)
90 mStateVariablesAtQuadPoint[i] = 0;
94 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
99 unsigned node_global_index = pNode->
GetIndex();
100 mIionicInterp += phiI * this->mpCardiacTissue->rGetIionicCacheReplicated()[ node_global_index ];
102 std::vector<double> state_vars = this->mpCardiacTissue->GetCardiacCellOrHaloCell(node_global_index)->GetStdVecStateVariables();
103 for (
unsigned i=0; i<mStateVariablesAtQuadPoint.size(); i++)
105 mStateVariablesAtQuadPoint[i] += phiI * state_vars[i];
111 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
115 if (!mElementsCanDoSvi[rElement.
GetIndex()])
119 double DELTA_IIONIC = 1;
122 assert(this->mpCardiacTissue->GetDoCacheReplication());
140 bool will_assemble = (diionic > DELTA_IIONIC);
145 mStateVariablesAtQuadPoint.resize(this->mpCardiacTissue->GetCardiacCellOrHaloCell(any_node)->GetNumberOfStateVariables() );
148 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