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