Nektar++
|
Public Member Functions | |
def | __init__ |
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 |
Private Member Functions | |
def | _tree_complexity |
def | _get_element_binding_time |
def | _get_element_units |
def | _reduce_elt |
def | _eval_self |
def | _update_usage_counts |
Additional Inherited Members | |
Static Public Member Functions inherited from CellMLToNektar.pycml.mathml | |
def | clone |
Public Attributes inherited from CellMLToNektar.pycml.element_base | |
xml_attributes | |
Properties inherited from CellMLToNektar.pycml.mathml | |
component = property(get_component) | |
Base class for MathML constructor elements, e.g. apply and piecewise.
def CellMLToNektar.pycml.mathml_constructor.__init__ | ( | self | ) |
|
private |
Evaluate self and return <cn>, <true> or <false>, as appropriate.
Definition at line 4108 of file pycml.py.
References CellMLToNektar.pycml.mathml._ensure_units_exist(), CellMLToNektar.pycml.mathml_cn.evaluate(), CellMLToNektar.pycml.mathml_ci.evaluate(), CellMLToNektar.pycml.mathml_apply.evaluate(), CellMLToNektar.pycml.mathml_piecewise.evaluate(), CellMLToNektar.pycml.mathml_plus.evaluate(), CellMLToNektar.pycml.mathml_minus.evaluate(), CellMLToNektar.pycml.mathml_times.evaluate(), CellMLToNektar.pycml.mathml_divide.evaluate(), CellMLToNektar.pycml.mathml_exp.evaluate(), CellMLToNektar.pycml.mathml_ln.evaluate(), CellMLToNektar.pycml.mathml_log.evaluate(), CellMLToNektar.pycml.mathml_abs.evaluate(), CellMLToNektar.pycml.mathml_power.evaluate(), CellMLToNektar.pycml.mathml_root.evaluate(), CellMLToNektar.pycml.mathml_and.evaluate(), CellMLToNektar.pycml.mathml_or.evaluate(), CellMLToNektar.pycml.mathml_leq.evaluate(), CellMLToNektar.pycml.mathml_lt.evaluate(), CellMLToNektar.pycml.mathml_geq.evaluate(), CellMLToNektar.pycml.mathml_gt.evaluate(), CellMLToNektar.pycml.mathml_neq.evaluate(), CellMLToNektar.pycml.mathml_eq.evaluate(), CellMLToNektar.pycml.mathml_rem.evaluate(), CellMLToNektar.pycml.mathml_logbase.evaluate(), CellMLToNektar.pycml.mathml_degree.evaluate(), CellMLToNektar.pycml.mathml_sin.evaluate(), CellMLToNektar.pycml.mathml_cos.evaluate(), CellMLToNektar.pycml.mathml_tan.evaluate(), CellMLToNektar.pycml.mathml_arcsin.evaluate(), CellMLToNektar.pycml.mathml_arccos.evaluate(), and CellMLToNektar.pycml.mathml_arctan.evaluate().
Referenced by CellMLToNektar.pycml.mathml_apply._reduce(), and CellMLToNektar.pycml.mathml_piecewise._reduce().
|
private |
Helper method to get the binding time of a MathML element.
Definition at line 4057 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_apply._get_binding_time(), CellMLToNektar.pycml.mathml_piecewise._get_binding_time(), CellMLToNektar.pycml.mathml_piecewise._reduce(), and CellMLToNektar.pycml.mathml_apply.get_units().
|
private |
Helper method to get the units of a MathML element.
Definition at line 4068 of file pycml.py.
Referenced by CellMLToNektar.pycml.mathml_apply._get_operand_units(), CellMLToNektar.pycml.mathml_apply.get_units(), and CellMLToNektar.pycml.mathml_piecewise.get_units().
|
private |
Try to reduce the given element. Call the _reduce method on elt, if it has one. If not, do nothing (we assume elt cannot be reduced).
Definition at line 4095 of file pycml.py.
References CellMLToNektar.utilities.DEBUG().
Referenced by CellMLToNektar.pycml.mathml_apply._reduce(), and CellMLToNektar.pycml.mathml_piecewise._reduce().
|
private |
Calculate a rough estimate of the computation time for evaluating the given element. If lookup_tables is True, then assume we're using lookup tables where possible. If store_result is True, the complexity is saved to the _cml_complexity attribute. If algebraic is True, the complexity is calculated as a dictionary, mapping node types to the number of occurences of that type.
Definition at line 4008 of file pycml.py.
References CellMLToNektar.pycml.mathml_constructor._tree_complexity(), CellMLToNektar.pycml.child_i(), and CellMLToNektar.pycml.element_base.rootNode().
Referenced by CellMLToNektar.pycml.mathml_constructor._tree_complexity(), CellMLToNektar.pycml.mathml_apply.tree_complexity(), and CellMLToNektar.pycml.mathml_piecewise.tree_complexity().
|
private |
Update usage counts of variables used in the given expression. By default, increment the usage count of any variable occuring in a <ci> element within expr. If remove is set to True, then decrement the usage counts instead.
Definition at line 4123 of file pycml.py.
References CellMLToNektar.pycml.mathml_constructor._update_usage_counts().
Referenced by CellMLToNektar.pycml.mathml_apply._reduce(), CellMLToNektar.pycml.mathml_piecewise._reduce(), and CellMLToNektar.pycml.mathml_constructor._update_usage_counts().