Nektar++
|
Public Member Functions | |
def | __init__ |
def | variable |
def | get_units |
def | evaluate |
def | classify_variables |
Public Member Functions inherited from CellMLToNektar.pycml.mathml | |
def | __init__ |
def | __repr__ |
def | __deepcopy__ |
def | clone_self |
def | get_original_of_clone |
def | get_component |
def | model |
def | eval |
Public Member Functions inherited from CellMLToNektar.pycml.element_base | |
def | __init__ |
def | __delattr__ |
def | __setattr__ |
def | rootNode |
def | cmeta_id |
def | xml_remove_child_at |
def | xml_doc |
def | xml_properties |
Static Public Member Functions | |
def | create_new |
Static Public Member Functions inherited from CellMLToNektar.pycml.mathml | |
def | clone |
Private Member Functions | |
def | _unset_cached_links |
def | _set_variable_obj |
def | _get_binding_time |
def | _rename |
def | _reduce |
Private Attributes | |
_cml_variable | |
_cml_units | |
Additional Inherited Members | |
Public Attributes inherited from CellMLToNektar.pycml.element_base | |
xml_attributes | |
Properties inherited from CellMLToNektar.pycml.mathml | |
component = property(get_component) | |
|
private |
Return the binding time of this expression. The binding time of a <ci> element is that of the variable it represents.
Definition at line 4266 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_ci._reduce(), CellMLToNektar.pycml.mathml_apply._reduce(), and CellMLToNektar.pycml.mathml_piecewise._reduce().
|
private |
Reduce this expression by evaluating its static parts. If this is a static variable, replace by its value (as a <cn> element). Otherwise the behaviour depends on the number of uses of this variable. If there is only one, instantiate the definition of this variable here in place of the <ci> element, otherwise leave the element unchanged to avoid code duplication.
Definition at line 4282 of file pycml.py.
References CellMLToNektar.pycml.cellml_variable._get_binding_time(), CellMLToNektar.pycml.mathml_cn._get_binding_time(), CellMLToNektar.pycml.mathml_ci._get_binding_time(), CellMLToNektar.pycml.mathml_ci.classify_variables(), CellMLToNektar.utilities.DEBUG(), CellMLToNektar.pycml.mathml_cn.evaluate(), and CellMLToNektar.pycml.mathml_ci.evaluate().
|
private |
Update the variable reference to use a canonical name.
Definition at line 4274 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_ci.variable().
|
private |
Set the variable object referred to by this element.
Definition at line 4244 of file pycml.py.
References CellMLToNektar.pycml.mathml_ci._cml_variable.
|
private |
Forget cached component and variable references in this MathML tree. Used by partial evaluator when moving maths to a new component, and by simulation protocols.
Definition at line 4226 of file pycml.py.
References CellMLToNektar.pycml.mathml_ci._cml_variable.
def CellMLToNektar.pycml.mathml_ci.classify_variables | ( | self, | |
dependencies_only = False , |
|||
needs_special_treatment = lambda n: None |
|||
) |
Classify variables in this expression according to how they are used. For ci elements we just return a set containing the referenced variable as the single dependency. If dependencies_only is False, we also mark the variable as used.
Definition at line 4353 of file pycml.py.
References Nektar::LibUtilities::AnalyticExpressionEvaluator::AnalyticExpression::definition< ScannerT >.variable, and CellMLToNektar.pycml.mathml_ci.variable().
Referenced by CellMLToNektar.pycml.mathml_ci._reduce().
|
static |
def CellMLToNektar.pycml.mathml_ci.evaluate | ( | self | ) |
Evaluate this expression by returning the value of the variable it represents.
Definition at line 4259 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_constructor._eval_self(), and CellMLToNektar.pycml.mathml_ci._reduce().
def CellMLToNektar.pycml.mathml_ci.get_units | ( | self, | |
return_set = True |
|||
) |
Return the units of the variable represented by this element.
Definition at line 4248 of file pycml.py.
References CellMLToNektar.pycml.cellml_model._cml_units, CellMLToNektar.pycml.cellml_component._cml_units, and CellMLToNektar.pycml.mathml_units_mixin_tokens._cml_units.
Referenced by CellMLToNektar.pycml.mathml._ensure_units_exist(), CellMLToNektar.pycml.mathml_units_mixin_tokens._set_in_units(), and CellMLToNektar.pycml.mathml_apply._set_in_units().
def CellMLToNektar.pycml.mathml_ci.variable | ( | self | ) |
Cache & return the variable object refered to by this element.
Definition at line 4236 of file pycml.py.
References CellMLToNektar.pycml.mathml_ci._cml_variable, and CellMLToNektar.pycml.mathml_ci._rename().
Referenced by CellMLToNektar.pycml.mathml_ci.classify_variables().
|
private |
Definition at line 4223 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_apply._set_in_units(), CellMLToNektar.pycml.mathml_piecewise._set_in_units(), CellMLToNektar.pycml.mathml_apply.get_units(), and CellMLToNektar.pycml.mathml_piecewise.get_units().
|
private |
Definition at line 4222 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_ci._set_variable_obj(), CellMLToNektar.pycml.mathml_ci._unset_cached_links(), and CellMLToNektar.pycml.mathml_ci.variable().