Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Private Member Functions | List of all members
CellMLToNektar.pycml.mathml_units_mixin_set_operands Class Reference
Inheritance diagram for CellMLToNektar.pycml.mathml_units_mixin_set_operands:
Inheritance graph
[legend]
Collaboration diagram for CellMLToNektar.pycml.mathml_units_mixin_set_operands:
Collaboration graph
[legend]

Private Member Functions

def _set_in_units
 

Detailed Description

Definition at line 3571 of file pycml.py.

Member Function Documentation

def CellMLToNektar.pycml.mathml_units_mixin_set_operands._set_in_units (   self,
  units,
  no_act = False 
)
private
Set the units of the application of this operator.

The default behaviour for many operators is to simply set all operands to have the given units.

Definition at line 3572 of file pycml.py.

References CellMLToNektar.pycml.mathml_units_mixin._set_element_in_units().

3573  def _set_in_units(self, units, no_act=False):
3574  """Set the units of the application of this operator.
3575 
3576  The default behaviour for many operators is to simply set all operands to have the given units.
3577  """
3578  # TODO: Do the conversion at this level sometimes rather than pushing it down the tree?
3579  app = self.xml_parent
3580  # We need to convert the operands to a list, because the tree
3581  # may be modified if a conversion is thought to be needed
3582  for operand in list(app.operands()):
3583  self._set_element_in_units(operand, units, no_act)
3584  # And set our units to what they now are
3585  if not no_act:
3586  app._cml_units = units
3587  return