Nektar++
Private Member Functions | Private Attributes | List of all members
CellMLToNektar.pycml.mathml_units_mixin_tokens Class Reference
Inheritance diagram for CellMLToNektar.pycml.mathml_units_mixin_tokens:
[legend]

Private Member Functions

def _set_in_units (self, units, no_act=False)
 

Private Attributes

 _cml_units
 

Detailed Description

Contains the _set_in_units method for ci, cn, etc.

Definition at line 3556 of file pycml.py.

Member Function Documentation

◆ _set_in_units()

def CellMLToNektar.pycml.mathml_units_mixin_tokens._set_in_units (   self,
  units,
  no_act = False 
)
private
Set the units this element should be expressed in.

Where these aren't the units it's defined in, replace self by suitable units conversion mathematics.

Definition at line 3558 of file pycml.py.

3558 def _set_in_units(self, units, no_act=False):
3559 """Set the units this element should be expressed in.
3560
3561 Where these aren't the units it's defined in, replace self by suitable units conversion mathematics.
3562 """
3563 defn_units = self.get_units(return_set=False)
3564 if defn_units != units:
3565 self._add_units_conversion(self, defn_units, units, no_act)
3566 # Store the units
3567 if not no_act:
3568 self._cml_units = units
3569 return
3570

References CellMLToNektar.pycml.mathml_units_mixin._add_units_conversion(), CellMLToNektar.pycml.cellml_variable.get_units(), CellMLToNektar.pycml.mathml_apply.get_units(), CellMLToNektar.pycml.mathml_piecewise.get_units(), CellMLToNektar.pycml.mathml_cn.get_units(), and CellMLToNektar.pycml.mathml_ci.get_units().

Member Data Documentation

◆ _cml_units

CellMLToNektar.pycml.mathml_units_mixin_tokens._cml_units
private