36 #include "ZeroNetChargeElectrodes.hpp"
37 #include "ElectrodesStimulusFactory.hpp"
38 #include "RegularStimulusZeroNetCharge.hpp"
39 #include "DistributedTetrahedralMesh.hpp"
41 #include "HeartConfig.hpp"
43 template<
unsigned DIM>
45 std::vector<double>& rStimulusMagnitudes,
46 std::vector<double>& rDurations,
47 std::vector<double>& rPeriods,
48 std::vector<double>& rStarts,
49 std::vector<double>& rEnds)
55 template<
unsigned DIM>
61 template<
unsigned DIM>
64 boost::shared_ptr<RegularStimulusZeroNetCharge> p_stimulus;
65 for (
unsigned pair_index = 0; pair_index < this->mrElectrodePairs.size(); pair_index++)
67 if (this->mrElectrodePairs[pair_index].first->DoesContain(pNode->
GetPoint()) )
69 p_stimulus.reset (
new RegularStimulusZeroNetCharge(this->mMagnitudesElectrode1[pair_index], this->mrDurations[pair_index], this->mrPeriods[pair_index], this->mrStarts[pair_index], this->mrEnds[pair_index]));
71 else if (this->mrElectrodePairs[pair_index].second->DoesContain(pNode->
GetPoint()) )
73 p_stimulus.reset (
new RegularStimulusZeroNetCharge(this->mMagnitudesElectrode2[pair_index], this->mrDurations[pair_index], this->mrPeriods[pair_index], this->mrStarts[pair_index], this->mrEnds[pair_index]));
77 p_stimulus.reset (
new RegularStimulusZeroNetCharge(0.0, this->mrDurations[pair_index], this->mrPeriods[pair_index], this->mrStarts[pair_index], this->mrEnds[pair_index]) );
ZeroNetChargeElectrodes(std::vector< std::pair< AbstractChasteRegion< DIM > *, AbstractChasteRegion< DIM > * > > &rElectrodePairs, std::vector< double > &rStimulusMagnitudes, std::vector< double > &rDurations, std::vector< double > &rPeriods, std::vector< double > &rStarts, std::vector< double > &rEnds)
~ZeroNetChargeElectrodes()
boost::shared_ptr< AbstractStimulusFunction > CreateStimulusForNode(Node< DIM > *pNode)
ChastePoint< SPACE_DIM > GetPoint() const