Nektar++
|
Public Member Functions | |
def | __init__ |
def | analyse_model |
Private Member Functions | |
def | _check_var |
Private Attributes | |
_var | |
_conv | |
_alpha | |
_beta | |
_ab_pattern | |
_alt_ab_pattern | |
_tau | |
_inf | |
_ti_pattern | |
_alt_ti_pattern | |
Analyse a model to identify Hodgkin-Huxley style gating variable equations. We look for ODEs whose definition matches "alpha*(1-x) - beta*x" (where x is the state variable, and alpha & beta are any expression). Alternatively for models which already have tau & inf variables, we match against "(inf-x)/tau". To allow for when units conversions have been performed, we chase 'simple' assignments and (the semantically equivalent) variable mappings until reaching an 'interesting' defining equation. We also need to allow the whole RHS to be multiplied by a constant. If this occurs, the constant conversion factor is also stored; otherwise we store None. Stores a dictionary on the document root mapping cellml_variable instances to 4-tuples. The tuple is either ('ab', alpha, beta, conv) or ('ti', tau, inf, conv) depending on which formulation has been used. Note that the expressions in these are not cloned copies - they are the original objects still embedded within the relevant ODE. The units conversion factor 'conv' is stored as a Python double.
Definition at line 1428 of file optimize.py.
def CellMLToNektar.optimize.RushLarsenAnalyser.__init__ | ( | self | ) |
Create the patterns to match against.
Definition at line 1447 of file optimize.py.
|
private |
Definition at line 1479 of file optimize.py.
Referenced by CellMLToNektar.optimize.RushLarsenAnalyser.analyse_model().
def CellMLToNektar.optimize.RushLarsenAnalyser.analyse_model | ( | self, | |
doc | |||
) |
Definition at line 1466 of file optimize.py.
References CellMLToNektar.optimize.RushLarsenAnalyser._check_var().
|
private |
Definition at line 1455 of file optimize.py.
|
private |
Definition at line 1453 of file optimize.py.
|
private |
Definition at line 1458 of file optimize.py.
|
private |
Definition at line 1464 of file optimize.py.
|
private |
Definition at line 1454 of file optimize.py.
|
private |
Definition at line 1451 of file optimize.py.
|
private |
Definition at line 1461 of file optimize.py.
|
private |
Definition at line 1460 of file optimize.py.
|
private |
Definition at line 1462 of file optimize.py.
|
private |
Definition at line 1450 of file optimize.py.