Nektar++
|
Classes | |
class | Colourable |
class | NotifyHandler |
class | OnlyDebugFilter |
class | OnlyTheseSourcesFilter |
class | OnlyWarningsFilter |
# Logging # # More... | |
class | Sentinel |
class | unitary_iterator |
Functions | |
def | DEBUG |
def | LOG |
def | amara_parse |
def | element_path |
def | element_path_cmp |
def | element_xpath |
def | brief_xml |
def | call_if |
# Miscellaneous functions # # More... | |
def | max_i |
def | prid |
def | add_dicts |
def | open_output_stream |
def | close_output_stream |
Variables | |
list | __all__ |
tuple | DFS = Enum('White', 'Gray', 'Black') |
# Miscellaneous classes # # More... | |
Copyright (c) 2005-2016, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Oxford nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
def CellMLToNektar.utilities.add_dicts | ( | r, | |
ds | |||
) |
Add multiple dictionaries together. Updates the first input dictionary by adding values from subsequent inputs. Produces a dictionary with keys taken from the input dictionaries, and values being the sum of the corresponding values in all inputs. Assumes values are numeric.
Definition at line 284 of file utilities.py.
Referenced by CellMLToNektar.pycml.mathml_apply.tree_complexity(), and CellMLToNektar.pycml.mathml_piecewise.tree_complexity().
def CellMLToNektar.utilities.amara_parse | ( | source, | |
uri = None , |
|||
rules = None , |
|||
binderobj = None , |
|||
prefixes = None |
|||
) |
Convenience function for parsing XML. Works just as amara.parse, except that if source is '-' then it reads from standard input.
Definition at line 192 of file utilities.py.
Referenced by CellMLToNektar.pycml.amara_parse_cellml(), CellMLToNektar.utilities.unitary_iterator.next(), and CellMLToNektar.translators.ConfigurationStore.read_configuration_file().
def CellMLToNektar.utilities.brief_xml | ( | elt | ) |
Print a more concise version of elt.xml() that omits all attributes.
Definition at line 232 of file utilities.py.
def CellMLToNektar.utilities.call_if | ( | tf, | |
callable, | |||
args, | |||
kwargs | |||
) |
#
Miscellaneous functions # #
Call the given callable with the given arguments iff tf is True.
Definition at line 255 of file utilities.py.
Referenced by CellMLToNektar.translators.ConfigurationStore._find_transmembrane_currents_from_voltage_ode().
def CellMLToNektar.utilities.close_output_stream | ( | stream | ) |
Close the given output stream, unless it's one of the standard streams (i.e. sys.stdout or sys.stderr). Note that closing a stream multiple times is safe.
Definition at line 314 of file utilities.py.
Referenced by CellMLToNektar.validator.run(), and CellMLToNektar.translators.run().
def CellMLToNektar.utilities.DEBUG | ( | facility, | |
args | |||
) |
Log a debug message to facility. Arguments are treated as for the print statement.
Definition at line 95 of file utilities.py.
Referenced by CellMLToNektar.processors.UnitsConverter._apply_special_conversion_for_nested_expr(), CellMLToNektar.pycml.cellml_model._check_assigned_vars(), CellMLToNektar.pycml.cellml_model._check_cellml_subset(), CellMLToNektar.optimize.LinearityAnalyser._check_expr(), CellMLToNektar.processors.UnitsConverter._check_special_conversion(), CellMLToNektar.pycml.cellml_model._check_variable_mappings(), CellMLToNektar.pycml.cellml_model._classify_variables(), CellMLToNektar.pycml.cellml_variable._decrement_usage_count(), CellMLToNektar.optimize.LookupTableAnalyser._determine_unneeded_tables(), CellMLToNektar.translators.ConfigurationStore._find_transmembrane_currents_from_voltage_ode(), CellMLToNektar.pycml.cellml_variable._get_binding_time(), CellMLToNektar.pycml.mathml_eq._get_binding_time(), CellMLToNektar.pycml.mathml_ci._reduce(), CellMLToNektar.pycml.mathml_apply._reduce(), CellMLToNektar.pycml.mathml_constructor._reduce_elt(), CellMLToNektar.pycml.mathml_units_mixin._set_element_in_units(), CellMLToNektar.pycml.mathml_units_mixin_choose_nearest._set_in_units(), CellMLToNektar.pycml.cellml_model._validate_component_hierarchies(), CellMLToNektar.optimize.LinearityAnalyser.analyse_for_jacobian(), CellMLToNektar.optimize.LookupTableAnalyser.analyse_for_lut(), CellMLToNektar.processors.UnitsConverter.convert_mapping(), CellMLToNektar.translators.ConfigurationStore.expose_variables(), CellMLToNektar.translators.ConfigurationStore.find_lookup_variables(), CellMLToNektar.translators.ConfigurationStore.find_membrane_capacitance(), CellMLToNektar.translators.ConfigurationStore.find_transmembrane_potential(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_method_start(), CellMLToNektar.translators.ConfigurationStore.read_configuration_file(), CellMLToNektar.pycml.cellml_variable.remove_rdf_annotations(), CellMLToNektar.translators.run(), CellMLToNektar.validator.CellMLValidator.validate(), and CellMLToNektar.pycml.cellml_model.validate().
def CellMLToNektar.utilities.element_path | ( | elt | ) |
Find the path from the root element to this element.
Definition at line 206 of file utilities.py.
Referenced by CellMLToNektar.utilities.element_path_cmp(), and CellMLToNektar.utilities.element_xpath().
def CellMLToNektar.utilities.element_path_cmp | ( | e1, | |
e2 | |||
) |
Compare 2 elements by comparing their paths from the root element.
Definition at line 220 of file utilities.py.
References CellMLToNektar.utilities.element_path().
def CellMLToNektar.utilities.element_xpath | ( | elt | ) |
Return an xpath expression that will select this element.
Definition at line 225 of file utilities.py.
References CellMLToNektar.utilities.element_path().
Referenced by CellMLToNektar.pycml.MathsError._generate_message().
def CellMLToNektar.utilities.LOG | ( | facility, | |
level, | |||
args | |||
) |
Log a message to facility with the given level. Arguments are treated as for the print statement.
Definition at line 105 of file utilities.py.
Referenced by CellMLToNektar.translators.ConfigurationStore.find_lookup_variables().
def CellMLToNektar.utilities.max_i | ( | it | ) |
Find the maximum entry of an iterable, and return it with its index. Returns (i, m) where i is the index of m, the maximum entry of `it`.
Definition at line 261 of file utilities.py.
Referenced by CellMLToNektar.pycml.mathml_piecewise.tree_complexity().
def CellMLToNektar.utilities.open_output_stream | ( | fname | ) |
Open fname for output. fname should be a local filename, or '-' for standard output. Additionally, the names 'stdout' and 'stderr' have the usual special meanings.
Definition at line 298 of file utilities.py.
Referenced by CellMLToNektar.validator.run(), and CellMLToNektar.translators.run().
def CellMLToNektar.utilities.prid | ( | obj, | |
show_cls = False |
|||
) |
Get the id of an object as a hex string, optionally with its class/type.
Definition at line 273 of file utilities.py.
list CellMLToNektar.utilities.__all__ |
Definition at line 45 of file utilities.py.
tuple CellMLToNektar.utilities.DFS = Enum('White', 'Gray', 'Black') |