Nektar++
|
Public Member Functions | |
def | __init__ |
def | ignore_component_name |
def | parent |
def | get_units_by_name |
def | add_units |
def | get_all_units |
def | get_variable_by_name |
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 Member Functions | |
def | create_new |
Public Attributes | |
name | |
Public Attributes inherited from CellMLToNektar.pycml.element_base | |
xml_attributes | |
Private Member Functions | |
def | _clear_hierarchy |
def | _set_parent_component |
def | _add_child_component |
def | _has_child_components |
def | _build_units_dictionary |
def | _add_variable |
def | _del_variable |
Private Attributes | |
_cml_parents | |
_cml_children | |
_cml_units | |
_cml_created_by_pe | |
Specialised component class, with additional helper methods.
|
private |
Add child to our list of children in the relationship hierarchy indexed by reln_key.
Definition at line 1566 of file pycml.py.
References CellMLToNektar.pycml.cellml_component._cml_children.
|
private |
Add a variable to this component.
Definition at line 1622 of file pycml.py.
References CellMLToNektar.pycml.cellml_component.name.
|
private |
Create a dictionary mapping units names to objects, for all units definitions in this element.
Definition at line 1577 of file pycml.py.
References CellMLToNektar.pycml.cellml_model._cml_units, CellMLToNektar.pycml.cellml_component._cml_units, CellMLToNektar.pycml.cellml_component.name, and CellMLToNektar.pycml.cellml_model.validation_error().
Referenced by CellMLToNektar.pycml.cellml_component.add_units(), CellMLToNektar.pycml.cellml_component.get_all_units(), and CellMLToNektar.pycml.cellml_component.get_units_by_name().
|
private |
Unset our parent & children in the given hierarchy.
Definition at line 1546 of file pycml.py.
References CellMLToNektar.pycml.cellml_component._cml_children, and CellMLToNektar.pycml.cellml_component._cml_parents.
|
private |
Remove a variable from this component.
Definition at line 1629 of file pycml.py.
References CellMLToNektar.pycml.cellml_component.name.
|
private |
Determine whether we have any children in the given relationship hierarchy.
Definition at line 1572 of file pycml.py.
|
private |
Set the parent of this component in the relationship hierarchy indexed by reln_key to parent. Trigger a validation error if we already have a parent in this hierarchy. Also add ourselves to parent's children.
Definition at line 1551 of file pycml.py.
References CellMLToNektar.pycml.cellml_component._cml_parents, and CellMLToNektar.pycml.cellml_component.name.
def CellMLToNektar.pycml.cellml_component.add_units | ( | self, | |
name, | |||
units | |||
) |
Add an entry in our units dictionary for units named `name' with element object `units'.
Definition at line 1604 of file pycml.py.
References CellMLToNektar.pycml.cellml_model._build_units_dictionary(), CellMLToNektar.pycml.cellml_component._build_units_dictionary(), CellMLToNektar.pycml.cellml_model._cml_units, and CellMLToNektar.pycml.cellml_component._cml_units.
|
static |
def CellMLToNektar.pycml.cellml_component.get_all_units | ( | self | ) |
Get a list of all units objects defined in this component.
Definition at line 1612 of file pycml.py.
References CellMLToNektar.pycml.cellml_model._build_units_dictionary(), CellMLToNektar.pycml.cellml_component._build_units_dictionary(), CellMLToNektar.pycml.cellml_model._cml_units, and CellMLToNektar.pycml.cellml_component._cml_units.
def CellMLToNektar.pycml.cellml_component.get_units_by_name | ( | self, | |
uname | |||
) |
Return an object representing the element that defines the units named `uname'.
Definition at line 1594 of file pycml.py.
References CellMLToNektar.pycml.cellml_model._build_units_dictionary(), CellMLToNektar.pycml.cellml_component._build_units_dictionary(), CellMLToNektar.pycml.cellml_model._cml_units, and CellMLToNektar.pycml.cellml_component._cml_units.
def CellMLToNektar.pycml.cellml_component.get_variable_by_name | ( | self, | |
varname | |||
) |
Return the variable object with name `varname' in this component.
Definition at line 1618 of file pycml.py.
References CellMLToNektar.pycml.cellml_component.name.
def CellMLToNektar.pycml.cellml_component.ignore_component_name | ( | self | ) |
Whether to not include the component name in the full names of contained variables.
Definition at line 1522 of file pycml.py.
def CellMLToNektar.pycml.cellml_component.parent | ( | self, | |
relationship = u'encapsulation' , |
|||
namespace = None , |
|||
name = None , |
|||
reln_key = None |
|||
) |
Find the parent of this component in the given hierarchy. We default to the encapsulation hierarchy. relationship gives the type of the hierarchy. If it is not one of the CellML types (i.e. encapsulation or containment) then the namespace URI must be specified. Multiple non-encapsulation hierarchies of the same type can be specified by giving the name argument. Results are cached for efficiency.
Definition at line 1527 of file pycml.py.
References CellMLToNektar.pycml.cellml_component._cml_parents.
|
private |
Definition at line 1517 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_component._add_child_component(), and CellMLToNektar.pycml.cellml_component._clear_hierarchy().
|
private |
|
private |
Definition at line 1516 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_component._clear_hierarchy(), CellMLToNektar.pycml.cellml_component._set_parent_component(), and CellMLToNektar.pycml.cellml_component.parent().
|
private |
Definition at line 1518 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_component._build_units_dictionary(), CellMLToNektar.pycml.mathml_apply._set_in_units(), CellMLToNektar.pycml.mathml_piecewise._set_in_units(), CellMLToNektar.pycml.cellml_component.add_units(), CellMLToNektar.pycml.cellml_component.get_all_units(), CellMLToNektar.pycml.mathml_ci.get_units(), CellMLToNektar.pycml.mathml_apply.get_units(), CellMLToNektar.pycml.mathml_piecewise.get_units(), and CellMLToNektar.pycml.cellml_component.get_units_by_name().
CellMLToNektar.pycml.cellml_component.name |
Definition at line 1524 of file pycml.py.
Referenced by CellMLToNektar.pycml.cellml_units.__repr__(), CellMLToNektar.pycml.cellml_component._add_variable(), CellMLToNektar.pycml.cellml_component._build_units_dictionary(), CellMLToNektar.pycml.cellml_component._del_variable(), CellMLToNektar.pycml.cellml_units._hash_tuple(), CellMLToNektar.pycml.cellml_component._set_parent_component(), CellMLToNektar.pycml.cellml_variable.fullname(), and CellMLToNektar.pycml.cellml_component.get_variable_by_name().