Nektar++
|
MathML elements #. More...
Private Member Functions | |
def | _add_units_conversion (self, expr, defn_units, to_units, no_act=False) |
def | _set_element_in_units (self, elt, units, no_act=False) |
|
private |
Add mathematics for an explicit units conversion. Wraps expr in the expression m[to_units/defn_units]*(expr-o1[defn_units]) + o2[to_units].
Definition at line 3471 of file pycml.py.
References CellMLToNektar.utilities.element_xpath(), CellMLToNektar.pycml.extract(), and CellMLToNektar.pycml.simplify().
Referenced by CellMLToNektar.pycml.mathml_units_mixin._set_element_in_units(), and CellMLToNektar.pycml.mathml_units_mixin_tokens._set_in_units().
|
private |
Try to set the units of the given element. Generates a debug message if this isn't possible.
Definition at line 3534 of file pycml.py.
References CellMLToNektar.pycml.mathml_units_mixin._add_units_conversion(), CellMLToNektar.pycml.cellml_variable.component, CellMLToNektar.pycml.mathml.component, CellMLToNektar.utilities.DEBUG(), and CellMLToNektar.pycml.get_units_by_name().
Referenced by CellMLToNektar.pycml.mathml_units_mixin_choose_nearest._set_in_units(), CellMLToNektar.pycml.mathml_units_mixin_set_operands._set_in_units(), CellMLToNektar.pycml.mathml_units_mixin_equalise_operands._set_in_units(), CellMLToNektar.pycml.mathml_units_mixin_container._set_in_units(), CellMLToNektar.pycml.mathml_apply._set_in_units(), CellMLToNektar.pycml.mathml_piecewise._set_in_units(), CellMLToNektar.pycml.mathml_power._set_in_units(), CellMLToNektar.pycml.mathml_root._set_in_units(), and CellMLToNektar.pycml.mathml_eq._set_in_units().