Nektar++
Bidomain.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Bidomain.h
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 #ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_BIDOMAIN_H
36 #define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_BIDOMAIN_H
37 
40 
41 using namespace Nektar::SolverUtils;
42 
43 namespace Nektar
44 {
45 
46 
47  /// A model for cardiac conduction.
48  class Bidomain : public UnsteadySystem
49  {
50  public:
51  friend class MemoryManager<Bidomain>;
52 
53  /// Creates an instance of this class
57  {
59  ::AllocateSharedPtr(pSession, pGraph);
60  p->InitObject();
61  return p;
62  }
63 
64  /// Name of class
65  static std::string className;
66 
67  /// Desctructor
68  virtual ~Bidomain();
69 
70  protected:
71  /// Constructor
72  Bidomain(
75 
76  virtual void v_InitObject();
77 
78  /// Solve for the diffusion term.
79  void DoImplicitSolve(
80  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
81  Array<OneD, Array<OneD, NekDouble> >&outarray,
82  NekDouble time,
83  NekDouble lambda);
84 
85  /// Computes the reaction terms \f$f(u,v)\f$ and \f$g(u,v)\f$.
86  void DoOdeRhs(
87  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
88  Array<OneD, Array<OneD, NekDouble> >&outarray,
89  const NekDouble time);
90 
91  /// Sets a custom initial condition.
92  virtual void v_SetInitialConditions(NekDouble initialtime,
93  bool dumpInitialConditions,
94  const int domain);
95 
96  /// Prints a summary of the model parameters.
97  virtual void v_GenerateSummary(SummaryList& s);
98 
99  private:
100  /// Cell model.
102 
103  NekDouble m_chi, m_capMembrane, m_sigmaix, m_sigmaiy, m_sigmaiz, m_sigmaex, m_sigmaey, m_sigmaez;
104 
107 
111 
112  /// Stimulus current
114  };
115 
116 }
117 
118 #endif
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
Definition: Bidomain.h:54
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
static std::string className
Name of class.
Definition: Bidomain.h:65
NekDouble m_sigmaiz
Definition: Bidomain.h:103
StdRegions::VarCoeffMap m_vardiffie
Definition: Bidomain.h:106
NekDouble m_stimDuration
Stimulus current.
Definition: Bidomain.h:113
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
Base class for unsteady solvers.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
double NekDouble
std::shared_ptr< CellModel > CellModelSharedPtr
A shared pointer to an EquationSystem object.
Definition: CellModel.h:55
StdRegions::VarCoeffMap m_vardiffi
Definition: Bidomain.h:105
CellModelSharedPtr m_cell
Cell model.
Definition: Bidomain.h:101
Array< OneD, Array< OneD, NekDouble > > tmp1
Definition: Bidomain.h:108
A model for cardiac conduction.
Definition: Bidomain.h:48
Array< OneD, Array< OneD, NekDouble > > tmp2
Definition: Bidomain.h:109
Array< OneD, Array< OneD, NekDouble > > tmp3
Definition: Bidomain.h:110
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.