Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
Inheritance graph
[legend]
Collaboration diagram for CellMLToNektar.pycml.mathml_units_mixin_tokens:
Collaboration graph
[legend]

Private Member Functions

def _set_in_units
 

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

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.

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

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

Member Data Documentation

CellMLToNektar.pycml.mathml_units_mixin_tokens._cml_units
private

Definition at line 3568 of file pycml.py.

Referenced by CellMLToNektar.pycml.mathml_apply._set_in_units(), CellMLToNektar.pycml.mathml_piecewise._set_in_units(), CellMLToNektar.pycml.mathml_cn.get_units(), CellMLToNektar.pycml.mathml_ci.get_units(), CellMLToNektar.pycml.mathml_apply.get_units(), and CellMLToNektar.pycml.mathml_piecewise.get_units().