46     std::string FentonKarma::className =
 
   50                                                     "Phenomenological Model.");
 
   53     std::string FentonKarma::lookupIds[10] = {
 
   54             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   55                     "BR",   FentonKarma::eBR),
 
   56             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   57                     "MBR",  FentonKarma::eMBR),
 
   58             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   59                     "MLR1", FentonKarma::eMLR1),
 
   60             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   61                     "GP",   FentonKarma::eGP),
 
   62             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   63                     "CF1",  FentonKarma::eCF1),
 
   64             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   65                     "CF2a",  FentonKarma::eCF2a),
 
   66             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   67                     "CF2b",  FentonKarma::eCF2b),
 
   68             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   69                     "CF2c",  FentonKarma::eCF2c),
 
   70             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   71                     "CF3a",  FentonKarma::eCF3a),
 
   72             LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
 
   73                     "CF3b",  FentonKarma::eCF3b)
 
   77     std::string FentonKarma::def =
 
   78             LibUtilities::SessionReader::RegisterDefaultSolverInfo(
 
   79                     "CellModelVariant",
"BR");
 
   88     FentonKarma::FentonKarma(
 
  302         ASSERTL0(!
isCF3, 
"Cherry-Fenton model 3 not implemented yet.");
 
  322         ASSERTL0(inarray.get() != outarray.get(),
 
  323                  "Must have different arrays for input and output.");
 
  346         NekDouble J_fi, J_so, J_si, h1, h2, h3, alpha, beta;
 
  349         for (i = 0; i < n; ++i)
 
  352             h1 = (*u < 
u_c) ? 0.0 : 1.0;
 
  353             h2 = (*u < 
u_v) ? 0.0 : 1.0;
 
  354             h3 = (*u < 
u_r) ? 0.0 : 1.0;
 
  359             *w_tau = 1.0 / (alpha + beta);
 
  360             *w_new = alpha * (*w_tau);
 
  365             *v_tau = 1.0 / (alpha + beta);
 
  366             *v_new = alpha * (*v_tau);
 
  375             J_fi = -(*v)*h1*(1 - *u)*(*u - 
u_fi)/
tau_d;
 
  379             J_so = (*u)*(1-h3)*(1-
k2*(*v))/
tau_0 +
 
  386             *u_new = -J_fi - J_so - J_si;
 
  388             ++u, ++v, ++w, ++u_new, ++v_new, ++w_new, ++v_tau, ++w_tau;
 
  419             default: 
return "unknown";
 
#define ASSERTL0(condition, msg)
 
static std::string lookupIds[]
 
int m_nq
Number of physical points. 
 
std::vector< std::pair< std::string, std::string > > SummaryList
 
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value. 
 
virtual ~FentonKarma()
Destructor. 
 
virtual void v_GenerateSummary(SummaryList &s)
Prints a summary of the model parameters. 
 
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
 
virtual void v_SetInitialConditions()
 
Array< OneD, Array< OneD, NekDouble > > m_gates_tau
Storage for gate tau values. 
 
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list. 
 
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object. 
 
Array< OneD, Array< OneD, NekDouble > > m_cellSol
Cell model solution variables. 
 
int m_nvar
Number of variables in cell model (inc. transmembrane voltage) 
 
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Computes the reaction terms $f(u,v)$ and $g(u,v)$. 
 
std::vector< int > m_gates
Indices of cell model variables which are gates. 
 
CellModelFactory & GetCellModelFactory()
 
enum Variants model_variant
 
virtual std::string v_GetCellVarName(unsigned int idx)
 
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.