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

Private Member Functions

def _set_in_units (self, units, no_act=False)
 

Private Attributes

 _cml_units
 

Detailed Description

Definition at line 3666 of file pycml.py.

Member Function Documentation

◆ _set_in_units()

def CellMLToNektar.pycml.mathml_units_mixin_container._set_in_units (   self,
  units,
  no_act = False 
)
private
Set the units of this element.

For container elements, we set the units of the child(ren).

Definition at line 3667 of file pycml.py.

3667 def _set_in_units(self, units, no_act=False):
3668 """Set the units of this element.
3669
3670 For container elements, we set the units of the child(ren).
3671 """
3672 # We need to copy the children list, because the tree
3673 # may be modified if a conversion is thought to be needed
3674 for elt in self.xml_children[:]:
3675 if getattr(elt, 'nodeType', None) == Node.ELEMENT_NODE:
3676 self._set_element_in_units(elt, units, no_act)
3677 # And set our units to what they now are
3678 if not no_act:
3679 self._cml_units = units
3680 return
3681

References CellMLToNektar.pycml.mathml_units_mixin._set_element_in_units().

Member Data Documentation

◆ _cml_units

CellMLToNektar.pycml.mathml_units_mixin_container._cml_units
private