Nektar++
Loading...
Searching...
No Matches
solvers
CardiacEPSolver
Utilities
CellMLToNektar
nektar
_exporter.py
Go to the documentation of this file.
1
#
2
# Exports to Nektar
3
#
4
# This file is derived from AnsiCExporter in myokit.
5
# See http://myokit.org for copyright, sharing, and licensing details.
6
#
7
8
import
os
9
10
import
myokit.formats
11
12
class
NektarExporter
(myokit.formats.TemplatedRunnableExporter):
13
"""
14
This class exports a myokit cell model to Nektar++ code for
15
use in the CardiacEPSolver.
16
"""
17
def
info
(self):
18
import
inspect
19
return
inspect.getdoc(self)
20
21
def
_dir
(self, root):
22
return
os.path.join(os.getcwd(),
'nektar'
,
'template'
)
23
24
def
_dict
(self):
25
return
{
'model.cpp'
:
'model.cpp'
,
26
'model.h'
:
'model.h'
}
27
28
def
_vars
(self, model, protocol, name=None, variants=None, initial_states=None):
29
if
initial_states
and
not
variants:
30
raise
AssertionError(
'If `initial_states` is passed, `variants` must also be passed'
)
31
return
{
'model'
: model,
32
'protocol'
: protocol,
33
'name'
: name,
34
'variants'
: variants,
35
'initial_states'
: initial_states}
nektar._exporter.NektarExporter
Definition
_exporter.py:12
nektar._exporter.NektarExporter._dict
_dict(self)
Definition
_exporter.py:24
nektar._exporter.NektarExporter._dir
_dir(self, root)
Definition
_exporter.py:21
nektar._exporter.NektarExporter._vars
_vars(self, model, protocol, name=None, variants=None, initial_states=None)
Definition
_exporter.py:28
nektar._exporter.NektarExporter.info
info(self)
Definition
_exporter.py:17
myokit.formats
Generated on Sun Nov 9 2025 20:17:00 for Nektar++ by
1.9.8