36#include "AbstractCorrectionTermAssembler.hpp"
39template<
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)
82template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
87 for (
unsigned i=0; i<mStateVariablesAtQuadPoint.size(); i++)
89 mStateVariablesAtQuadPoint[i] = 0;
93template<
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];
108template<
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;
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM > * mpCardiacTissue
void IncrementInterpolatedQuantities(double phiI, const Node< SPACE_DIM > *pNode)
std::vector< bool > mElementsCanDoSvi
bool ElementAssemblyCriterion(Element< ELEM_DIM, SPACE_DIM > &rElement)
AbstractCorrectionTermAssembler(AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *pMesh, AbstractCardiacTissue< ELEM_DIM, SPACE_DIM > *pTissue)
void ResetInterpolatedQuantities(void)
unsigned GetUnsignedAttribute()
unsigned GetNumNodes() const
unsigned GetNodeGlobalIndex(unsigned localIndex) const
bool GetOwnership() const
unsigned GetIndex() const
ElementIterator GetElementIteratorBegin(bool skipDeletedElements=true)
ElementIterator GetElementIteratorEnd()
virtual unsigned GetNumElements() const
static bool IsRegionBath(HeartRegionType regionId)
unsigned GetIndex() const