Nektar++
|
Public Member Functions | |
def | __init__ |
def | __eq__ |
def | __ne__ |
def | __hash__ |
def | get_units_element |
def | get_multiplicative_factor |
def | get_multiplier |
def | get_exponent |
def | get_offset |
def | clone |
Public Member Functions inherited from CellMLToNektar.pycml.element_base | |
def | __init__ |
def | __delattr__ |
def | __setattr__ |
def | rootNode |
def | cmeta_id |
def | xml_remove_child_at |
def | xml_doc |
def | xml_properties |
Static Public Attributes | |
dictionary | SI_PREFIXES |
Private Member Functions | |
def | _hash_tup |
def | _set_units_element |
Private Attributes | |
_cml_units_obj | |
Additional Inherited Members | |
Public Attributes inherited from CellMLToNektar.pycml.element_base | |
xml_attributes | |
Specialised class for <unit> elements. Maintains a reference to the object representing the units definition it references, provides some helpful accessor type methods, and allows safe, easy cloning of <unit> elements.
def CellMLToNektar.pycml.cellml_unit.__eq__ | ( | self, | |
other | |||
) |
Compare two <unit> elements. Two <unit> elements are equal if they reference the same <units> element, and have the same prefix, multiplier, etc.
Definition at line 3247 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit._hash_tup().
Referenced by CellMLToNektar.pycml.cellml_unit.__ne__().
def CellMLToNektar.pycml.cellml_unit.__hash__ | ( | self | ) |
Richer hashing function than the default based on object id. Returns the hash of a tuple of relevant attributes.
Definition at line 3260 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit._hash_tup().
def CellMLToNektar.pycml.cellml_unit.__ne__ | ( | self, | |
other | |||
) |
The inverse of self.__eq__(other).
Definition at line 3257 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit.__eq__().
|
private |
Create a tuple to be used for hashing/equality tests.
Definition at line 3241 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit.get_exponent(), CellMLToNektar.pycml.cellml_unit.get_multiplier(), CellMLToNektar.pycml.cellml_unit.get_offset(), and CellMLToNektar.pycml.cellml_unit.get_units_element().
Referenced by CellMLToNektar.pycml.cellml_unit.__eq__(), and CellMLToNektar.pycml.cellml_unit.__hash__().
|
private |
Set the object representing the <units> element that this <unit> element references. Don't use unless you know what you're doing.
Definition at line 3274 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit._cml_units_obj.
def CellMLToNektar.pycml.cellml_unit.clone | ( | self | ) |
Clone this object. Return a new <unit> element that has the same attributes as this one.
Definition at line 3321 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit._cml_units_obj.
def CellMLToNektar.pycml.cellml_unit.get_exponent | ( | self | ) |
Return the exponent of this units reference, as a float.
Definition at line 3313 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_unit._hash_tup(), and CellMLToNektar.pycml.cellml_unit.get_multiplicative_factor().
def CellMLToNektar.pycml.cellml_unit.get_multiplicative_factor | ( | self | ) |
Return the factor this units reference is multiplied by. Return the quantity m.p^e as a floating point number, where: m is the multiplier (default value 1.0) p is the multiplicative factor due to the prefix (default 10^0=1) e is the exponent (default 1)
Definition at line 3291 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit.get_exponent(), CellMLToNektar.pycml.cellml_unit.get_multiplier(), and CellMLToNektar.pycml.cellml_unit.SI_PREFIXES.
def CellMLToNektar.pycml.cellml_unit.get_multiplier | ( | self | ) |
Return the multiplier of this units reference, as a float.
Definition at line 3309 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_unit._hash_tup(), and CellMLToNektar.pycml.cellml_unit.get_multiplicative_factor().
def CellMLToNektar.pycml.cellml_unit.get_offset | ( | self | ) |
Return the offset of this units reference, as a float.
Definition at line 3317 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_unit._hash_tup().
def CellMLToNektar.pycml.cellml_unit.get_units_element | ( | self | ) |
Return the object representing the <units> element that this <unit> element references.
Definition at line 3266 of file pycml.py.
References CellMLToNektar.pycml.cellml_unit._cml_units_obj.
Referenced by CellMLToNektar.pycml.cellml_unit._hash_tup().
|
private |
Definition at line 3238 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_unit._set_units_element(), CellMLToNektar.pycml.cellml_unit.clone(), and CellMLToNektar.pycml.cellml_unit.get_units_element().
|
static |
Definition at line 3284 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_unit.get_multiplicative_factor().