00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef PLANESTIMULUSCELLFACTORY_HPP_
00031 #define PLANESTIMULUSCELLFACTORY_HPP_
00032
00033 #include "AbstractCardiacCellFactory.hpp"
00034 #include "LogFile.hpp"
00035
00036 template<class CELL, unsigned DIM>
00037 class PlaneStimulusCellFactory : public AbstractCardiacCellFactory<DIM>
00038 {
00039 private:
00040
00041 SimpleStimulus* mpStimulus;
00042
00043 public:
00044 PlaneStimulusCellFactory(double stimulusMagnitude=-600) : AbstractCardiacCellFactory<DIM>()
00045 {
00046
00047 mpStimulus = new SimpleStimulus(stimulusMagnitude, 0.5);
00048 LOG(1, "Defined a PlaneStimulusCellFactory<"<<DIM<<"> with SimpleStimulus("<<stimulusMagnitude<<",0.5)\n");
00049 }
00050
00051 AbstractCardiacCell* CreateCardiacCellForTissueNode(unsigned node)
00052 {
00053 if (this->mpMesh->GetNode(node)->GetPoint()[0] == 0.0)
00054 {
00055 return new CELL(this->mpSolver, mpStimulus);
00056 }
00057 else
00058 {
00059 return new CELL(this->mpSolver, this->mpZeroStimulus);
00060 }
00061 }
00062
00063 ~PlaneStimulusCellFactory(void)
00064 {
00065 delete mpStimulus;
00066 }
00067 };
00068
00069
00070 #endif