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