36 #include "MonodomainPurkinjeProblem.hpp"
37 #include "MonodomainPurkinjeSolver.hpp"
39 #include "ReplicatableVector.hpp"
42 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
49 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
59 this->mpBoundaryConditionsContainer.get());
62 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
69 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
75 DistributedVector ic = this->mpMesh->GetDistributedVectorFactory()->CreateDistributedVector(init_cond);
82 purkinje_voltage_stripe[index] = this->GetTissue()->GetPurkinjeCell(index.Global)->GetVoltage();
92 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
101 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
109 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
115 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
120 std::cout <<
"Solved to time " << time <<
"\n" << std::flush;
123 double v_max, v_min, v_purk_max, v_purk_min;
125 VecStrideMax( this->mSolution, 0, PETSC_NULL, &v_max );
126 VecStrideMin( this->mSolution, 0, PETSC_NULL, &v_min );
128 VecStrideMax( this->mSolution, 1, PETSC_NULL, &v_purk_max );
129 VecStrideMin( this->mSolution, 1, PETSC_NULL, &v_purk_min );
132 if(fabs(v_purk_min)<1e-20)
138 if(fabs(v_purk_max)<1e-20)
145 std::cout <<
" V_myo; V_purk = " <<
"[" <<v_min <<
", " << v_max <<
"]" <<
";\t"
146 <<
"[" << v_purk_min <<
", " << v_purk_max <<
"]" <<
"\n"
152 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
158 mPurkinjeVoltageColumnId = this->mpWriter->GetVariableByName(
"V_purk");
162 mPurkinjeVoltageColumnId = this->mpWriter->DefineVariable(
"V_purk",
"mV");
168 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
171 this->mpWriter->PutUnlimitedVariable(time);
172 std::vector<int> variable_ids;
173 variable_ids.push_back(this->mVoltageColumnId);
174 variable_ids.push_back(mPurkinjeVoltageColumnId);
175 this->mpWriter->PutStripedVector(variable_ids, voltageVec);
virtual Vec CreateInitialCondition()
DistributedTetrahedralMeshPartitionType::type GetMeshPartitioning() const
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM > * CreateCardiacTissue()
virtual void DefineWriterColumns(bool extending)
virtual ~MonodomainPurkinjeProblem()
bool GetUseStateVariableInterpolation() const
MonodomainPurkinjeProblem()
#define EXPORT_TEMPLATE_CLASS2(CLASS, E, S)
const unsigned UNSIGNED_UNSET
Vec CreateInitialCondition()
AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 2 > * CreateSolver()
#define EXCEPT_IF_NOT(test)
virtual void DefineWriterColumns(bool extending)
virtual void CreateMeshFromHeartConfig()
virtual void WriteOneStep(double time, Vec voltageVec)
void WriteInfo(double time)
void WriteExtraVariablesOneStep()
static HeartConfig * Instance()
void DefineExtraVariablesWriterColumns(bool extending)