Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Bidomain.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Bidomain.cpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Bidomain cardiac electrophysiology homogenised model.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #include <iostream>
37 
40 
41 using namespace std;
42 
43 namespace Nektar
44 {
45  /**
46  * @class Bidomain
47  *
48  * Base model of cardiac electrophysiology of the form
49  * \f{align*}{
50  * \frac{\partial u}{\partial t} = \nabla^2 u + J_{ion},
51  * \f}
52  * where the reaction term, \f$J_{ion}\f$ is defined by a specific cell
53  * model.
54  *
55  * This implementation, at present, treats the reaction terms explicitly
56  * and the diffusive element implicitly.
57  */
58 
59  /**
60  * Registers the class with the Factory.
61  */
62  string Bidomain::className
64  "Bidomain",
65  Bidomain::create,
66  "Bidomain model of cardiac electrophysiology with 3D diffusion.");
67 
68 
69  /**
70  *
71  */
72  Bidomain::Bidomain(
74  : UnsteadySystem(pSession)
75  {
76  }
77 
79  {
81  m_session->LoadParameter("Chi", m_chi);
82  m_session->LoadParameter("Cm", m_capMembrane);
83 
84  std::string vCellModel;
85  m_session->LoadSolverInfo("CELLMODEL", vCellModel, "");
86 
87  ASSERTL0(vCellModel != "", "Cell Model not specified.");
88 
90  m_intVariables.push_back(0);
91  m_intVariables.push_back(1);
92 
93  // Load variable coefficients
94  StdRegions::VarCoeffType varCoeffEnum[3] = {
98  };
99  std::string varName[3] = {
100  "AnisotropicConductivityX",
101  "AnisotropicConductivityY",
102  "AnisotropicConductivityZ"
103  };
104 
105 
106  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
107  {
108  for (int i = 0; i < m_spacedim; ++i)
109  {
110  int nq = m_fields[0]->GetNpoints();
111  Array<OneD,NekDouble> x0(nq);
112  Array<OneD,NekDouble> x1(nq);
113  Array<OneD,NekDouble> x2(nq);
114 
115  // get the coordinates
116  m_fields[0]->GetCoords(x0,x1,x2);
120  tmp1[i] = Array<OneD, NekDouble>(nq);
121  tmp2[i] = Array<OneD, NekDouble>(nq);
122  tmp3[i] = Array<OneD, NekDouble>(nq);
123 
125  = m_session->GetFunction("IntracellularConductivity", varName[i]);
127  = m_session->GetFunction("ExtracellularConductivity", varName[i]);
128  for(int j = 0; j < nq; j++)
129  {
130  tmp1[i][j] = ifunc1->Evaluate(x0[j],x1[j],x2[j],0.0);
131  tmp2[i][j] = ifunc2->Evaluate(x0[j],x1[j],x2[j],0.0);
132  }
133  Vmath::Vadd(nq, tmp1[i], 1, tmp2[i], 1, tmp3[i], 1);
134  m_vardiffi[varCoeffEnum[i]] = tmp1[i];
135  m_vardiffie[varCoeffEnum[i]] = tmp3[i];
136  }
137  }
138 
139 
140  if (m_session->DefinesParameter("StimulusDuration"))
141  {
142  ASSERTL0(m_session->DefinesFunction("Stimulus", "u"),
143  "Stimulus function not defined.");
144  m_session->LoadParameter("StimulusDuration", m_stimDuration);
145  }
146  else
147  {
148  m_stimDuration = 0;
149  }
150 
151 
152  // Search through the loaded filters and pass the cell model to any
153  // CheckpointCellModel filters loaded.
154  int k = 0;
155  const LibUtilities::FilterMap& f = m_session->GetFilters();
156  LibUtilities::FilterMap::const_iterator x;
157  for (x = f.begin(); x != f.end(); ++x, ++k)
158  {
159  if (x->first == "CheckpointCellModel")
160  {
161  boost::shared_ptr<FilterCheckpointCellModel> c
162  = boost::dynamic_pointer_cast<FilterCheckpointCellModel>(
163  m_filters[k]);
164  c->SetCellModel(m_cell);
165  }
166  }
167 
168  if (!m_explicitDiffusion)
169  {
171  }
173  }
174 
175 
176  /**
177  *
178  */
180  {
181 
182  }
183 
184 
185  /**
186  * @param inarray Input array.
187  * @param outarray Output array.
188  * @param time Current simulation time.
189  * @param lambda Timestep.
190  */
192  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
193  Array<OneD, Array<OneD, NekDouble> >&outarray,
194  const NekDouble time,
195  const NekDouble lambda)
196  {
197  int nvariables = inarray.num_elements();
198  int nq = m_fields[0]->GetNpoints();
199 
200  Array<OneD, NekDouble> grad0(nq), grad1(nq), grad2(nq), grad(nq);
201  Array<OneD, NekDouble> ggrad0(nq), ggrad1(nq), ggrad2(nq), ggrad(nq), temp(nq);
202 
203  // We solve ( \sigma\nabla^2 - HHlambda ) Y[i] = rhs [i]
204  // inarray = input: \hat{rhs} -> output: \hat{Y}
205  // outarray = output: nabla^2 \hat{Y}
206  // where \hat = modal coeffs
207  for (int i = 0; i < nvariables; ++i)
208  {
209  // Only apply diffusion to first variable.
210  if (i > 1) {
211  Vmath::Vcopy(nq, &inarray[i][0], 1, &outarray[i][0], 1);
212  continue;
213  }
214  if (i == 0) {
216  factors[StdRegions::eFactorLambda] = (1.0/lambda)*(m_capMembrane*m_chi);
217  if (m_spacedim==1) {
218  // Take first partial derivative
219  m_fields[i]->PhysDeriv(inarray[1],ggrad0);
220  // Take second partial derivative
221  m_fields[i]->PhysDeriv(0,ggrad0,ggrad0);
222  // Multiply by Intracellular-Conductivity
223  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
224  {
225  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), ggrad0, 1, ggrad0, 1);
226  }
227  // Add partial derivatives together
228  Vmath::Vcopy(nq, ggrad0, 1, ggrad, 1);
229  Vmath::Smul(nq, -1.0, ggrad, 1, ggrad, 1);
230  // Multiply 1.0/timestep/lambda
231  Vmath::Smul(nq, -factors[StdRegions::eFactorLambda], inarray[i], 1, temp, 1);
232  Vmath::Vadd(nq, ggrad, 1, temp, 1, m_fields[i]->UpdatePhys(), 1);
233  // Solve a system of equations with Helmholtz solver and transform
234  // back into physical space.
235  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(),NullFlagList,factors);
236  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
237  m_fields[i]->SetPhysState(true);
238  // Copy the solution vector (required as m_fields must be set).
239  outarray[i] = m_fields[i]->GetPhys();
240  }
241 
242  if (m_spacedim==2) {
243  // Take first partial derivative
244  m_fields[i]->PhysDeriv(inarray[1],ggrad0,ggrad1);
245  // Take second partial derivative
246  m_fields[i]->PhysDeriv(0,ggrad0,ggrad0);
247  m_fields[i]->PhysDeriv(1,ggrad1,ggrad1);
248  // Multiply by Intracellular-Conductivity
249  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
250  {
251  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), ggrad0, 1, ggrad0, 1);
252  Vmath::Smul(nq, m_session->GetParameter("sigmaiy"), ggrad1, 1, ggrad1, 1);
253  }
254  // Add partial derivatives together
255  Vmath::Vadd(nq, ggrad0, 1, ggrad1, 1, ggrad, 1);
256  Vmath::Smul(nq, -1.0, ggrad, 1, ggrad, 1);
257  // Multiply 1.0/timestep/lambda
258  Vmath::Smul(nq, -factors[StdRegions::eFactorLambda], inarray[i], 1, temp, 1);
259  Vmath::Vadd(nq, ggrad, 1, temp, 1, m_fields[i]->UpdatePhys(), 1);
260  // Solve a system of equations with Helmholtz solver and transform
261  // back into physical space.
262  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(),NullFlagList,factors,m_vardiffi);
263  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
264  m_fields[i]->SetPhysState(true);
265  // Copy the solution vector (required as m_fields must be set).
266  outarray[i] = m_fields[i]->GetPhys();
267  }
268 
269  if (m_spacedim==3) {
270  // Take first partial derivative
271  m_fields[i]->PhysDeriv(inarray[1],ggrad0,ggrad1,ggrad2);
272  // Take second partial derivative
273  m_fields[i]->PhysDeriv(0,ggrad0,ggrad0);
274  m_fields[i]->PhysDeriv(1,ggrad1,ggrad1);
275  m_fields[i]->PhysDeriv(2,ggrad2,ggrad2);
276  // Multiply by Intracellular-Conductivity
277  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
278  {
279  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), ggrad0, 1, ggrad0, 1);
280  Vmath::Smul(nq, m_session->GetParameter("sigmaiy"), ggrad1, 1, ggrad1, 1);
281  Vmath::Smul(nq, m_session->GetParameter("sigmaiz"), ggrad2, 1, ggrad2, 1);
282  }
283  // Add partial derivatives together
284  Vmath::Vadd(nq, ggrad0, 1, ggrad1, 1, ggrad, 1);
285  Vmath::Vadd(nq, ggrad2, 1, ggrad, 1, ggrad, 1);
286  Vmath::Smul(nq, -1.0, ggrad, 1, ggrad, 1);
287  // Multiply 1.0/timestep/lambda
288  Vmath::Smul(nq, -factors[StdRegions::eFactorLambda], inarray[i], 1, temp, 1);
289  Vmath::Vadd(nq, ggrad, 1, temp, 1, m_fields[i]->UpdatePhys(), 1);
290  // Solve a system of equations with Helmholtz solver and transform
291  // back into physical space.
292  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(),NullFlagList,factors,m_vardiffi);
293  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
294  m_fields[i]->SetPhysState(true);
295  // Copy the solution vector (required as m_fields must be set).
296  outarray[i] = m_fields[i]->GetPhys();
297  }
298 
299  }
300  if (i == 1) {
302  factors[StdRegions::eFactorLambda] = 0.0;
303  if (m_spacedim==1) {
304  // Take first partial derivative
305  m_fields[i]->PhysDeriv(m_fields[0]->UpdatePhys(),grad0);
306  // Take second derivative
307  m_fields[i]->PhysDeriv(0,grad0,grad0);
308  // Multiply by Intracellular-Conductivity
309  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
310  {
311  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), grad0, 1, grad0, 1);
312  }
313  // and sum terms
314  Vmath::Vcopy(nq, grad0, 1, grad, 1);
315  Vmath::Smul(nq, (-1.0*m_session->GetParameter("sigmaix"))/(m_session->GetParameter("sigmaix")+m_session->GetParameter("sigmaix")), grad, 1, grad, 1);
316  // Now solve Poisson problem for \phi_e
317  m_fields[i]->SetPhys(grad);
318  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(), NullFlagList, factors);
319  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
320  m_fields[i]->SetPhysState(true);
321  // Copy the solution vector (required as m_fields must be set).
322  outarray[i] = m_fields[i]->GetPhys();
323  }
324 
325  if (m_spacedim==2) {
326  // Take first partial derivative
327  m_fields[i]->PhysDeriv(m_fields[0]->UpdatePhys(),grad0,grad1);
328  // Take second derivative
329  m_fields[i]->PhysDeriv(0,grad0,grad0);
330  m_fields[i]->PhysDeriv(1,grad1,grad1);
331  // Multiply by Intracellular-Conductivity
332  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
333  {
334  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), grad0, 1, grad0, 1);
335  Vmath::Smul(nq, m_session->GetParameter("sigmaiy"), grad1, 1, grad1, 1);
336  }
337  // and sum terms
338  Vmath::Vadd(nq, grad0, 1, grad1, 1, grad, 1);
339  Vmath::Smul(nq, -1.0, grad, 1, grad, 1);
340  // Now solve Poisson problem for \phi_e
341  m_fields[i]->SetPhys(grad);
342  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(), NullFlagList, factors, m_vardiffie);
343  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
344  m_fields[i]->SetPhysState(true);
345  // Copy the solution vector (required as m_fields must be set).
346  outarray[i] = m_fields[i]->GetPhys();
347  }
348 
349  if (m_spacedim==3) {
350  // Take first partial derivative
351  m_fields[i]->PhysDeriv(m_fields[0]->UpdatePhys(),grad0,grad1,grad2);
352  // Take second derivative
353  m_fields[i]->PhysDeriv(0,grad0,grad0);
354  m_fields[i]->PhysDeriv(1,grad1,grad1);
355  m_fields[i]->PhysDeriv(2,grad2,grad2);
356  // Multiply by Intracellular-Conductivity
357  if (m_session->DefinesFunction("IntracellularConductivity") && m_session->DefinesFunction("ExtracellularConductivity"))
358  {
359  Vmath::Smul(nq, m_session->GetParameter("sigmaix"), grad0, 1, grad0, 1);
360  Vmath::Smul(nq, m_session->GetParameter("sigmaiy"), grad1, 1, grad1, 1);
361  Vmath::Smul(nq, m_session->GetParameter("sigmaiz"), grad2, 1, grad2, 1);
362  }
363  // and sum terms
364  Vmath::Vadd(nq, grad0, 1, grad1, 1, grad, 1);
365  Vmath::Vadd(nq, grad2, 1, grad, 1, grad, 1);
366  Vmath::Smul(nq, -1.0, grad, 1, grad, 1);
367  // Now solve Poisson problem for \phi_e
368  m_fields[i]->SetPhys(grad);
369  m_fields[i]->HelmSolve(m_fields[i]->GetPhys(), m_fields[i]->UpdateCoeffs(), NullFlagList, factors, m_vardiffie);
370  m_fields[i]->BwdTrans( m_fields[i]->GetCoeffs(), m_fields[i]->UpdatePhys());
371  m_fields[i]->SetPhysState(true);
372  // Copy the solution vector (required as m_fields must be set).
373  outarray[i] = m_fields[i]->GetPhys();
374  }
375 
376  }
377  }
378  }
379 
380 
382  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
383  Array<OneD, Array<OneD, NekDouble> >&outarray,
384  const NekDouble time)
385  {
386  int nq = m_fields[0]->GetNpoints();
387  m_cell->TimeIntegrate(inarray, outarray, time);
388  if (m_stimDuration > 0 && time < m_stimDuration)
389  {
390  Array<OneD,NekDouble> x0(nq);
391  Array<OneD,NekDouble> x1(nq);
392  Array<OneD,NekDouble> x2(nq);
393  Array<OneD,NekDouble> result(nq);
394 
395  // get the coordinates
396  m_fields[0]->GetCoords(x0,x1,x2);
397 
399  = m_session->GetFunction("Stimulus", "u");
400  ifunc->Evaluate(x0,x1,x2,time, result);
401 
402  Vmath::Vadd(nq, outarray[0], 1, result, 1, outarray[0], 1);
403  }
404  Vmath::Smul(nq, 1.0/m_capMembrane, outarray[0], 1, outarray[0], 1);
405  }
406 
407 
409  bool dumpInitialConditions,
410  const int domain)
411  {
412  EquationSystem::v_SetInitialConditions(initialtime, dumpInitialConditions, domain);
413  m_cell->Initialise();
414  }
415 
416  /**
417  *
418  */
420  {
422 
423  /// @TODO Update summary
424  ASSERTL0(false, "Update the generate summary");
425 //
426 // out << "\tChi : " << m_chi << endl;
427 // out << "\tCm : " << m_capMembrane << endl;
428 // if (m_session->DefinesFunction("IntracellularConductivity", "AnisotropicConductivityX") &&
429 // m_session->GetFunctionType("IntracellularConductivity", "AnisotropicConductivityX") == LibUtilities::eFunctionTypeExpression)
430 // {
431 // out << "\tIntra-Diffusivity-x : "
432 // << m_session->GetFunction("IntracellularConductivity", "AnisotropicConductivityX")->GetExpression()
433 // << endl;
434 // }
435 // if (m_session->DefinesFunction("IntracellularConductivity", "AnisotropicConductivityY") &&
436 // m_session->GetFunctionType("IntracellularConductivity", "AnisotropicConductivityY") == LibUtilities::eFunctionTypeExpression)
437 // {
438 // out << "\tIntra-Diffusivity-y : "
439 // << m_session->GetFunction("IntracellularConductivity", "AnisotropicConductivityY")->GetExpression()
440 // << endl;
441 // }
442 // if (m_session->DefinesFunction("IntracellularConductivity", "AnisotropicConductivityZ") &&
443 // m_session->GetFunctionType("IntracellularConductivity", "AnisotropicConductivityZ") == LibUtilities::eFunctionTypeExpression)
444 // {
445 // out << "\tIntra-Diffusivity-z : "
446 // << m_session->GetFunction("IntracellularConductivity", "AnisotropicConductivityZ")->GetExpression()
447 // << endl;
448 // }
449 // if (m_session->DefinesFunction("ExtracellularConductivity", "AnisotropicConductivityX") &&
450 // m_session->GetFunctionType("ExtracellularConductivity", "AnisotropicConductivityX") == LibUtilities::eFunctionTypeExpression)
451 // {
452 // out << "\tExtra-Diffusivity-x : "
453 // << m_session->GetFunction("ExtracellularConductivity", "AnisotropicConductivityX")->GetExpression()
454 // << endl;
455 // }
456 // if (m_session->DefinesFunction("ExtracellularConductivity", "AnisotropicConductivityY") &&
457 // m_session->GetFunctionType("ExtracellularConductivity", "AnisotropicConductivityY") == LibUtilities::eFunctionTypeExpression)
458 // {
459 // out << "\tExtra-Diffusivity-y : "
460 // << m_session->GetFunction("ExtracellularConductivity", "AnisotropicConductivityY")->GetExpression()
461 // << endl;
462 // }
463 // if (m_session->DefinesFunction("ExtracellularConductivity", "AnisotropicConductivityZ") &&
464 // m_session->GetFunctionType("ExtracellularConductivity", "AnisotropicConductivityZ") == LibUtilities::eFunctionTypeExpression)
465 // {
466 // out << "\tExtra-Diffusivity-z : "
467 // << m_session->GetFunction("ExtracellularConductivity", "AnisotropicConductivityZ")->GetExpression()
468 // << endl;
469 // }
470  m_cell->GenerateSummary(s);
471  }
472 
473 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
bool m_explicitDiffusion
Indicates if explicit or implicit treatment of diffusion is used.
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Computes the reaction terms and .
Definition: Bidomain.cpp:381
STL namespace.
void SetCellModel(CellModelSharedPtr &pCellModel)
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:251
virtual ~Bidomain()
Desctructor.
Definition: Bidomain.cpp:179
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
NekDouble m_chi
Definition: Bidomain.h:101
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:199
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
StdRegions::VarCoeffMap m_vardiffie
Definition: Bidomain.h:104
NekDouble m_stimDuration
Stimulus current.
Definition: Bidomain.h:111
virtual void v_GenerateSummary(SummaryList &s)
Prints a summary of the model parameters.
Definition: Bidomain.cpp:419
Base class for unsteady solvers.
std::vector< std::pair< std::string, FilterParams > > FilterMap
Definition: SessionReader.h:66
int m_spacedim
Spatial dimension (>= expansion dim).
double NekDouble
virtual SOLVER_UTILS_EXPORT void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
virtual SOLVER_UTILS_EXPORT void v_InitObject()
Init object for UnsteadySystem class.
virtual void v_SetInitialConditions(NekDouble initialtime, bool dumpInitialConditions, const int domain)
Sets a custom initial condition.
Definition: Bidomain.cpp:408
boost::shared_ptr< Equation > EquationSharedPtr
StdRegions::VarCoeffMap m_vardiffi
Definition: Bidomain.h:103
EquationSystemFactory & GetEquationSystemFactory()
CellModelFactory & GetCellModelFactory()
Definition: CellModel.cpp:47
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
CellModelSharedPtr m_cell
Cell model.
Definition: Bidomain.h:99
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
NekDouble m_capMembrane
Definition: Bidomain.h:101
std::vector< FilterSharedPtr > m_filters
virtual void v_InitObject()
Init object for UnsteadySystem class.
Definition: Bidomain.cpp:78
Array< OneD, Array< OneD, NekDouble > > tmp1
Definition: Bidomain.h:106
Array< OneD, Array< OneD, NekDouble > > tmp2
Definition: Bidomain.h:107
Array< OneD, Array< OneD, NekDouble > > tmp3
Definition: Bidomain.h:108
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void DoImplicitSolve(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, NekDouble time, NekDouble lambda)
Solve for the diffusion term.
Definition: Bidomain.cpp:191
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:285
static FlagList NullFlagList
An empty flag list.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:215