51 "Bidomain Roth model of cardiac electrophysiology.");
59 : UnsteadySystem(pSession)
74 std::string vCellModel;
75 m_session->LoadSolverInfo(
"CELLMODEL", vCellModel,
"");
77 ASSERTL0(vCellModel !=
"",
"Cell Model not specified.");
93 std::string varCoeffString[6] = {
"xx",
"xy",
"yy",
"xz",
"yz",
"zz"};
94 std::string aniso_var[3] = {
"fx",
"fy",
"fz"};
96 const int nq =
m_fields[0]->GetNpoints();
101 for (
int j = 0; j < i+1; ++j)
105 m_vardiffi[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 1.0);
106 m_vardiffe[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 1.0);
107 m_vardiffie[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 1.0);
111 m_vardiffi[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 0.0);
112 m_vardiffe[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 0.0);
113 m_vardiffie[varCoeffEnum[k]] = Array<OneD, NekDouble>(nq, 0.0);
121 if (
m_session->DefinesFunction(
"ExtracellularAnisotropicConductivity"))
123 if (
m_session->DefinesCmdLineArgument(
"verbose"))
125 cout <<
"Loading Extracellular Anisotropic Fibre map." << endl;
132 Array<OneD, NekDouble> vTemp_i;
133 Array<OneD, NekDouble> vTemp_j;
155 "ExtracellularAnisotropicConductivity",
157 "Function 'AnisotropicConductivity' not correctly "
160 "ExtracellularAnisotropicConductivity");
163 for (
int i = 0; i < j + 1; ++i)
166 "ExtracellularAnisotropicConductivity",
168 "Function 'ExtracellularAnisotropicConductivity' not "
169 "correctly defined.");
172 "ExtracellularAnisotropicConductivity");
194 if (
m_session->DefinesFunction(
"IntracellularAnisotropicConductivity"))
196 if (
m_session->DefinesCmdLineArgument(
"verbose"))
198 cout <<
"Loading Anisotropic Fibre map." << endl;
205 Array<OneD, NekDouble> vTemp_i;
206 Array<OneD, NekDouble> vTemp_j;
228 "IntracellularAnisotropicConductivity",
230 "Function 'IntracellularAnisotropicConductivity' not "
231 "correctly defined.");
234 "IntracellularAnisotropicConductivity");
237 for (
int i = 0; i < j + 1; ++i)
240 "IntracellularAnisotropicConductivity",
242 "Function 'IntracellularAnisotropicConductivity' not "
243 "correctly defined.");
245 "IntracellularAnisotropicConductivity");
275 for (
int i = 0; i < j + 1; ++i)
280 std::stringstream filenamei;
281 filenamei <<
"IConductivity_" << varCoeffString[k] <<
".fld";
287 std::stringstream filenamee;
288 filenamee <<
"EConductivity_" << varCoeffString[k] <<
".fld";
299 LibUtilities::FilterMap::const_iterator x;
300 for (x = f.begin(); x != f.end(); ++x, ++k)
302 if (x->first ==
"CheckpointCellModel")
304 boost::shared_ptr<FilterCheckpointCellModel> c
338 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
339 Array<
OneD, Array<OneD, NekDouble> >&outarray,
369 outarray[0] =
m_fields[0]->GetPhys();
377 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
378 Array<
OneD, Array<OneD, NekDouble> >&outarray,
384 m_cell->TimeIntegrate(inarray, outarray, time);
387 for (
unsigned int i = 0; i <
m_stimulus.size(); ++i)
392 Array<OneD, NekDouble> ggrad0(nq), ggrad1(nq), ggrad2(nq), ggrad(nq);
399 m_fields[0]->PhysDeriv(inarray[0], ggrad0, ggrad1, ggrad2);
400 m_fields[0]->PhysDeriv(0, ggrad0, ggrad0);
401 m_fields[0]->PhysDeriv(1, ggrad1, ggrad1);
402 m_fields[0]->PhysDeriv(2, ggrad2, ggrad2);
403 if (
m_session->DefinesFunction(
"IntracellularAnisotropicConductivity") &&
404 m_session->DefinesFunction(
"ExtracellularAnisotropicConductivity"))
433 m_fields[1]->PhysDeriv(0, ggrad0, ggrad0);
434 m_fields[1]->PhysDeriv(1, ggrad1, ggrad1);
435 m_fields[1]->PhysDeriv(2, ggrad2, ggrad2);
436 if (
m_session->DefinesFunction(
"IntracellularAnisotropicConductivity") &&
437 m_session->DefinesFunction(
"ExtracellularAnisotropicConductivity"))
450 Vmath::Vadd(nq, ggrad, 1, outarray[0], 1, outarray[0], 1);
458 bool dumpInitialConditions,
462 dumpInitialConditions,
474 m_cell->GenerateSummary(s);