Nektar++
|
Classes | |
class | NameAlreadyRegistered |
Static Public Member Functions | |
def | generate_interface |
Static Public Attributes | |
dictionary | translators = {} |
string | STMT_END = ';' |
Various language tokens #. More... | |
string | EQ_ASSIGN = ' = ' |
string | COMMENT_START = '// ' |
string | DOXYGEN_COMMENT_START = '//! ' |
string | TYPE_DOUBLE = 'NekDouble ' |
string | TYPE_VOID = 'void ' |
string | TYPE_CONST_DOUBLE = 'const NekDouble ' |
string | TYPE_CONST_UNSIGNED = 'const unsigned ' |
string | TRUE = 'true' |
string | FALSE = 'false' |
string | PI = 'M_PI' |
string | E = 'M_E' |
string | NOT_A_NUMBER = 'NAN' |
USES_SUBSIDIARY_FILE = False | |
dictionary | FILE_EXTENSIONS |
dictionary | function_map |
dictionary | recip_trig |
dictionary | nary_ops |
dictionary | binary_ops |
dictionary | special_roots = {2: 'sqrt', 3: 'cbrt'} |
Private Member Functions | |
def | _vars_in |
Private Attributes | |
_main_output_to_subsidiary | |
_original_out | |
Base class for translators from CellML to programming languages. Provides various methods & attributes that can be overridden to achieve the desired output language and style. Also contains a registration system for subclasses, so the command-line client can know what translators are available. See the register method for more information.
Definition at line 98 of file translators.py.
def CellMLToNektar.translators.CellMLTranslator.__init__ | ( | self, | |
add_timestamp = True , |
|||
options = None |
|||
) |
Create a translator.
Definition at line 167 of file translators.py.
|
private |
Return a set of variable objects used in the given expression. Will include state variables. If the expression includes a derivative, the defining equation for that derivative will be included in the set. Also if an expression is being replaced by a lookup table, this will only include the table key variable.
Definition at line 928 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.translators.CellMLTranslator.free_vars, CellMLToNektar.translators.CellMLTranslator.is_lookup_table(), CellMLToNektar.translators.CellMLTranslator.use_lookup_tables, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.use_lookup_tables, and CellMLToNektar.translators.CellMLTranslator.varobj().
Referenced by CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics().
def CellMLToNektar.translators.CellMLTranslator.calculate_extended_dependencies | ( | self, | |
nodes, | |||
prune = [] , |
|||
prune_deps = [] |
|||
) |
Dependency related methods #.
Method moved to cellml_model.
Definition at line 899 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations_grl(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.capture_output | ( | self | ) |
Make subsequent output operations write to a string buffer.
Definition at line 405 of file translators.py.
def CellMLToNektar.translators.CellMLTranslator.close_block | ( | self, | |
blank_line = True , |
|||
kwargs | |||
) |
Close a code block and decrease indent.
Definition at line 885 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.set_indent(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_intracellular_calcium(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_serialize_method(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.close_paren | ( | self, | |
paren | |||
) |
Definition at line 878 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_log(), CellMLToNektar.translators.CellMLTranslator.output_nary_operator(), CellMLToNektar.translators.CellMLTranslator.output_piecewise(), and CellMLToNektar.translators.CellMLTranslator.output_unary_operator().
def CellMLToNektar.translators.CellMLTranslator.code_name | ( | self, | |
var, | |||
ode = False , |
|||
prefix = None |
|||
) |
Return the full name of var in a form suitable for inclusion in a source file. If ode is True then return the name of the derivative of var instead. We go directly to the source variable in this case, rather than including intermediate assignment statements as is done for connections.
Definition at line 442 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply(), CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate(), CellMLToNektar.translators.CellMLTranslator.output_lhs(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate(), and CellMLToNektar.translators.CellMLTranslator.output_variable().
def CellMLToNektar.translators.CellMLTranslator.config | ( | self | ) |
Get the current document's configuration store.
Definition at line 198 of file translators.py.
References Nektar::LibUtilities::H5DataSource.doc, CellMLToNektar.optimize.PartialEvaluator.doc, CellMLToNektar.translators.CellMLTranslator.doc, CellMLToNektar.optimize.LookupTableAnalyser.doc, and CellMLToNektar.translators.CellMLTranslator.translate().
def CellMLToNektar.translators.CellMLTranslator.contained_table_indices | ( | self, | |
node | |||
) |
Return all lookup tables used directly in computing this node. If this is an expression node, checks all its children for table lookups, and returns the set of table indices used.
Definition at line 1220 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.contained_table_indices(), and CellMLToNektar.translators.CellMLTranslator.is_lookup_table().
Referenced by CellMLToNektar.translators.CellMLTranslator.contained_table_indices(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.error | ( | self, | |
lines, | |||
xml = None |
|||
) |
Raise a translation error. lines is a list of strings describing what went wrong. A TranslationError with that message will be raised. If xml is given, it should be an element, which will be pretty-printed and included in the error.
Definition at line 183 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply(), CellMLToNektar.translators.CellMLTranslator.output_binary_operator(), CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.writeln().
def CellMLToNektar.translators.CellMLTranslator.eval_number | ( | self, | |
expr | |||
) |
Evaluate a number. If a (unicode) string, convert to float. If a cn element, call its evaluate method.
Definition at line 697 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_number().
def CellMLToNektar.translators.CellMLTranslator.final_configuration_hook | ( | self | ) |
A hook for subclasses to do some final configuration.
Definition at line 320 of file translators.py.
|
static |
Generate an interface component connecting the model to whatever will use it. Stub method that subclasses can override to implement this functionality.
Definition at line 131 of file translators.py.
def CellMLToNektar.translators.CellMLTranslator.get_captured_output | ( | self | ) |
Stop capturing output, and return what was captured as a string.
Definition at line 410 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator._original_out, CellMLToNektar.translators.CellMLTranslator.out, and Nektar::NekMeshUtils::DelaunayTriangle.out.
def CellMLToNektar.translators.CellMLTranslator.include_guard | ( | self | ) |
Get the include guard (for C/C++ output) for this cell model, based on the class name.
Definition at line 488 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.is_lookup_table | ( | self, | |
expr | |||
) |
Return True iff expr can be replaced by a lookup table. Uses annotations from a previous analysis.
Definition at line 1214 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.translators.CellMLTranslator.contained_table_indices(), and CellMLToNektar.translators.CellMLTranslator.output_expr().
def CellMLToNektar.translators.CellMLTranslator.lut_access_code | ( | self, | |
table_index, | |||
table_name, | |||
i | |||
) |
Get the code for accessing the i'th element of the given table.
Definition at line 1062 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), and CellMLToNektar.translators.CellMLTranslator.output_single_lookup().
def CellMLToNektar.translators.CellMLTranslator.lut_factor | ( | self, | |
idx, | |||
include_comma = False , |
|||
include_type = False |
|||
) |
Return code for any extra factor needed to do a table lookup. Will return the empty string unless linear interpolation is being used.
Definition at line 1235 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.TYPE_DOUBLE, and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_DOUBLE.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), and CellMLToNektar.translators.CellMLTranslator.output_table_lookup().
def CellMLToNektar.translators.CellMLTranslator.lut_parameters | ( | self, | |
key | |||
) |
Get the bounds and step size for a particular table. key should be a key into self.lookup_table_indices. Returns (min, max, step, step_inverse) suitable for putting in generated code.
Definition at line 1067 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code().
def CellMLToNektar.translators.CellMLTranslator.lut_size_calculation | ( | self, | |
min, | |||
max, | |||
step | |||
) |
Return the equivalent of '1 + (unsigned)((max-min)/step+0.5)'.
Definition at line 1075 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_generation().
def CellMLToNektar.translators.CellMLTranslator.open_block | ( | self, | |
kwargs | |||
) |
Open a new code block and increase indent.
Definition at line 881 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.set_indent(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_intracellular_calcium(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_serialize_method(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_verify_state_variables().
def CellMLToNektar.translators.CellMLTranslator.open_paren | ( | self, | |
paren | |||
) |
Definition at line 876 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_log(), CellMLToNektar.translators.CellMLTranslator.output_nary_operator(), CellMLToNektar.translators.CellMLTranslator.output_piecewise(), and CellMLToNektar.translators.CellMLTranslator.output_unary_operator().
def CellMLToNektar.translators.CellMLTranslator.output_apply | ( | self, | |
expr, | |||
paren | |||
) |
Output an <apply> expression. paren is True if the context has requested parentheses.
Definition at line 731 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.binary_ops, CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.error(), CellMLToNektar.translators.CellMLTranslator.function_map, CellMLToNektar.translators.CellMLTranslator.nary_ops, CellMLToNektar.translators.CellMLTranslator.output_binary_operator(), CellMLToNektar.translators.CellMLTranslator.output_function(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_function(), CellMLToNektar.translators.CellMLTranslator.output_log(), CellMLToNektar.translators.CellMLTranslator.output_minus(), CellMLToNektar.translators.CellMLTranslator.output_nary_operator(), CellMLToNektar.translators.CellMLTranslator.output_root(), CellMLToNektar.translators.CellMLTranslator.recip_trig, and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
def CellMLToNektar.translators.CellMLTranslator.output_assignment | ( | self, | |
expr | |||
) |
Output an assignment expression.
Definition at line 592 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.pycml.description(), CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_lhs(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lhs(), CellMLToNektar.translators.CellMLTranslator.output_number(), CellMLToNektar.translators.CellMLTranslator.STMT_END, CellMLToNektar.translators.CellMLTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.translators.CellMLTranslator.write(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_equations(), and CellMLToNektar.translators.CellMLTranslator.output_mathematics().
def CellMLToNektar.translators.CellMLTranslator.output_binary_operator | ( | self, | |
operator, | |||
operands, | |||
paren, | |||
expr | |||
) |
Output a binary operator. As output_nary_operator, but checks that len(list(operands)) == 2.
Definition at line 802 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.error(), and CellMLToNektar.translators.CellMLTranslator.output_nary_operator().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply(), and CellMLToNektar.translators.CellMLTranslator.output_minus().
def CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate | ( | self | ) |
Output bottom boilerplate
Definition at line 580 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.set_indent(), CellMLToNektar.translators.CellMLTranslator.state_vars, and CellMLToNektar.translators.CellMLTranslator.writeln().
def CellMLToNektar.translators.CellMLTranslator.output_comment | ( | self, | |
args, | |||
kwargs | |||
) |
Output a (multi-line) string as a comment.
Definition at line 416 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.COMMENT_START, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations_grl(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.translators.CellMLTranslator.output_doxygen(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.translators.CellMLTranslator.output_lut_declarations(), CellMLToNektar.translators.CellMLTranslator.output_lut_indices(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_memory(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_serialize_method(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_doxygen | ( | self, | |
args, | |||
kwargs | |||
) |
Output a (multi-line) string as a Doxygen comment.
Definition at line 426 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.DOXYGEN_COMMENT_START, and CellMLToNektar.translators.CellMLTranslator.output_comment().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_includes().
def CellMLToNektar.translators.CellMLTranslator.output_equations | ( | self, | |
nodeset | |||
) |
Output the mathematics described by nodeset. nodeset represents a subset of the assignments in the model. Output assignments in the order given by a topological sort, but only include those in nodeset. Since a set of assignments is given, this method does not check whether variables are used - it is assumed that only assignments that are actually wanted are given in nodeset.
Definition at line 913 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_assignment(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.output_expr | ( | self, | |
expr, | |||
paren | |||
) |
Output the expression expr. If paren is True then the context has requested parentheses around the output; if expr requires them then they will be added.
Definition at line 646 of file translators.py.
References CellMLToNektar.pycml.child_i(), CellMLToNektar.translators.CellMLTranslator.E, CellMLToNektar.translators.CellMLTranslator.error(), CellMLToNektar.translators.CellMLTranslator.FALSE, CellMLToNektar.translators.CellMLTranslator.is_lookup_table(), CellMLToNektar.translators.CellMLTranslator.output_apply(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_number(), CellMLToNektar.translators.CellMLTranslator.output_piecewise(), CellMLToNektar.translators.CellMLTranslator.output_table_lookup(), CellMLToNektar.translators.CellMLTranslator.output_variable(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_variable(), CellMLToNektar.translators.CellMLTranslator.PI, CellMLToNektar.translators.CellMLTranslator.TRUE, CellMLToNektar.translators.CellMLTranslator.use_lookup_tables, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.use_lookup_tables, and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_function(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.translators.CellMLTranslator.output_log(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_nary_operator(), CellMLToNektar.translators.CellMLTranslator.output_piecewise(), CellMLToNektar.translators.CellMLTranslator.output_root(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), and CellMLToNektar.translators.CellMLTranslator.output_unary_operator().
def CellMLToNektar.translators.CellMLTranslator.output_file_name | ( | self, | |
model_filename | |||
) |
Generate a name for our output file, based on the input file.
Definition at line 324 of file translators.py.
def CellMLToNektar.translators.CellMLTranslator.output_function | ( | self, | |
func_name, | |||
args, | |||
paren, | |||
reciprocal = False |
|||
) |
Output a function call with name func_name and arguments args. Parentheses are not required so paren is ignored. If reciprocal is True then pass the reciprocal of each arg to func_name.
Definition at line 762 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply(), CellMLToNektar.translators.CellMLTranslator.output_log(), and CellMLToNektar.translators.CellMLTranslator.output_root().
def CellMLToNektar.translators.CellMLTranslator.output_lhs | ( | self, | |
expr | |||
) |
Output the left hand side of an assignment expression.
Definition at line 635 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.output_variable(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_variable(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_assignment().
def CellMLToNektar.translators.CellMLTranslator.output_log | ( | self, | |
expr, | |||
paren | |||
) |
Output a logarithm to the given base, which defaults to base 10.
Definition at line 833 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_paren(), CellMLToNektar.translators.CellMLTranslator.open_paren(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_function(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_function(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
def CellMLToNektar.translators.CellMLTranslator.output_lut_declarations | ( | self | ) |
Output declarations for the lookup tables.
Definition at line 1126 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.STMT_END, CellMLToNektar.translators.CellMLTranslator.TYPE_DOUBLE, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_DOUBLE, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_lut_deletion | ( | self, | |
only_index = None |
|||
) |
Output code to delete memory allocated for lookup tables.
Definition at line 1116 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.STMT_END, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_lut_generation | ( | self, | |
only_index = None |
|||
) |
Output code to generate lookup tables. There should be a list of suitable expressions available as self.doc.lookup_tables, to save having to search the whole model. If only_index is given, only generate tables using the given table index key.
Definition at line 1079 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.translators.CellMLTranslator.lut_access_code(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.lut_size_calculation(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.STMT_END, CellMLToNektar.translators.CellMLTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.translators.CellMLTranslator.TYPE_CONST_UNSIGNED, CellMLToNektar.translators.CellMLTranslator.use_lookup_tables, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.use_lookup_tables, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations | ( | self, | |
idx | |||
) |
Output declarations the variables used to index this table.
Definition at line 1135 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.translators.CellMLTranslator.row_lookup_method, CellMLToNektar.translators.CellMLTranslator.STMT_END, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_indices().
def CellMLToNektar.translators.CellMLTranslator.output_lut_indices | ( | self | ) |
Output declarations for the lookup table indices.
Definition at line 1144 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations(), and CellMLToNektar.translators.CellMLTranslator.writeln().
def CellMLToNektar.translators.CellMLTranslator.output_lut_methods | ( | self | ) |
Output the methods which look up values from lookup tables.
Definition at line 1151 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), CellMLToNektar.translators.CellMLTranslator.row_lookup_method, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_memory | ( | self | ) |
Output declarations for the memory used by the row lookup methods.
Definition at line 1204 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_comment(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class().
def CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods | ( | self | ) |
Write methods that return a whole row of a lookup table. Note: assumes that table names are numbered sequentially from 0.
Definition at line 1183 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_methods().
def CellMLToNektar.translators.CellMLTranslator.output_mathematics | ( | self | ) |
Output the mathematics in this model.
Definition at line 566 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.COMMENT_START, CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), and CellMLToNektar.translators.CellMLTranslator.writeln().
def CellMLToNektar.translators.CellMLTranslator.output_minus | ( | self, | |
expr, | |||
paren | |||
) |
Output either a unary or binary minus. Which is chosen depends on the number of operands.
Definition at line 848 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_binary_operator(), and CellMLToNektar.translators.CellMLTranslator.output_unary_operator().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
def CellMLToNektar.translators.CellMLTranslator.output_nary_operator | ( | self, | |
operator, | |||
operands, | |||
paren | |||
) |
Output an n-ary operator (using infix notation). If paren is True, enclose the output in parentheses.
Definition at line 781 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_paren(), CellMLToNektar.translators.CellMLTranslator.open_paren(), CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply(), and CellMLToNektar.translators.CellMLTranslator.output_binary_operator().
def CellMLToNektar.translators.CellMLTranslator.output_number | ( | self, | |
expr | |||
) |
Output the plain number expr. We make all constants parse as doubles to avoid problems with integer division or numbers too large for the int type. Negative numbers will be prefixed by a space to avoid unwanted decrement operations.
Definition at line 680 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.eval_number(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_assignment(), and CellMLToNektar.translators.CellMLTranslator.output_expr().
def CellMLToNektar.translators.CellMLTranslator.output_piecewise | ( | self, | |
expr, | |||
paren | |||
) |
Output the piecewise expression expr. We use a cascading ternary if expression for simplicity.
Definition at line 859 of file translators.py.
References CellMLToNektar.pycml.child_i(), CellMLToNektar.translators.CellMLTranslator.close_paren(), CellMLToNektar.translators.CellMLTranslator.NOT_A_NUMBER, CellMLToNektar.translators.CellMLTranslator.open_paren(), CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
def CellMLToNektar.translators.CellMLTranslator.output_root | ( | self, | |
expr, | |||
paren | |||
) |
Output a root taken to some degree. If a degree qualifier element is not provided, uses default 2.
Definition at line 814 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_function(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_function(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
def CellMLToNektar.translators.CellMLTranslator.output_single_lookup | ( | self, | |
tidx, | |||
tname, | |||
result | |||
) |
Write the lookup calculation for a single entry. Used by output_lut_row_lookup_methods and output_lut_methods.
Definition at line 1169 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.translators.CellMLTranslator.lut_access_code(), CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.translators.CellMLTranslator.STMT_END, CellMLToNektar.translators.CellMLTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_CONST_DOUBLE, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), and CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods().
def CellMLToNektar.translators.CellMLTranslator.output_table_index_checking | ( | self, | |
key, | |||
idx | |||
) |
Check whether a table index is out of bounds.
Definition at line 1302 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.constrain_table_indices, CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.STMT_END, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.output_table_index_generation | ( | self, | |
time_name, | |||
nodeset = set() |
|||
) |
Output code to calculate indexes into any lookup tables. If time_name is given and table bounds are being checked, the time value will be included in the error message. Note that we need to pass it in, since in some contexts the free variable is not defined. If nodeset is given, then filter the table indices calculated so that only those needed to compute the nodes in nodeset are defined. A nodeset is required if any table indices are computed variables rather than state variables. In this case, we use the equations within nodeset to calculate the values of the indices, and return a set containing just those nodes used, so we can avoid recalculating them later.
Definition at line 1258 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.calculate_extended_dependencies(), CellMLToNektar.pycml.cellml_model.calculate_extended_dependencies(), CellMLToNektar.translators.CellMLTranslator.contained_table_indices(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_equations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_equations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.var_display_name(), and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.calculate_lookup_table_indices(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code | ( | self, | |
key, | |||
idx | |||
) |
Method called by output_table_index_generation to output the code for a single table.
Definition at line 1320 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.EQ_ASSIGN, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.lookup_method_prefix, CellMLToNektar.translators.CellMLTranslator.lookup_method_prefix, CellMLToNektar.translators.CellMLTranslator.lt_index_uses_floor, CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.lut_parameters(), CellMLToNektar.translators.CellMLTranslator.row_lookup_method, CellMLToNektar.translators.CellMLTranslator.STMT_END, CellMLToNektar.translators.CellMLTranslator.TYPE_CONST_DOUBLE, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.TYPE_CONST_DOUBLE, and CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.output_table_lookup | ( | self, | |
expr, | |||
paren | |||
) |
Output code to look up expr in the appropriate table.
Definition at line 1248 of file translators.py.
References CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.lookup_method_prefix, CellMLToNektar.translators.CellMLTranslator.lookup_method_prefix, CellMLToNektar.translators.CellMLTranslator.lut_factor(), CellMLToNektar.translators.CellMLTranslator.row_lookup_method, and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
def CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate | ( | self | ) |
Output top boilerplate.
Definition at line 495 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.add_timestamp, CellMLToNektar.translators.CellMLTranslator.class_name, CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.translators.CellMLTranslator.free_vars, CellMLToNektar.translators.CellMLTranslator.include_guard(), CellMLToNektar.translators.CellMLTranslator.NOT_A_NUMBER, CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.translators.CellMLTranslator.output_lut_declarations(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation(), CellMLToNektar.translators.CellMLTranslator.set_indent(), CellMLToNektar.translators.CellMLTranslator.state_vars, CellMLToNektar.translators.CellMLTranslator.use_lookup_tables, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.use_lookup_tables, CellMLToNektar.translators.CellMLTranslator.v_index, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.v_index, CellMLToNektar.translators.version_comment(), and CellMLToNektar.translators.CellMLTranslator.writeln().
def CellMLToNektar.translators.CellMLTranslator.output_unary_operator | ( | self, | |
operator, | |||
operand, | |||
paren | |||
) |
Output a unary operator (using prefix notation).
Definition at line 795 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.close_paren(), CellMLToNektar.translators.CellMLTranslator.open_paren(), CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_minus().
def CellMLToNektar.translators.CellMLTranslator.output_variable | ( | self, | |
ci_elt, | |||
ode = False |
|||
) |
Output a ci element, i.e. a variable lookup.
Definition at line 642 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), and CellMLToNektar.translators.CellMLTranslator.write().
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr(), and CellMLToNektar.translators.CellMLTranslator.output_lhs().
def CellMLToNektar.translators.CellMLTranslator.register | ( | cls, | |
subclass, | |||
name | |||
) |
Register a new translator subclass. Registers the subclass `subclass' with name `name' in the translators class attribute of CellMLTranslator. If the name given is already in use, raises NameAlreadyRegistered.
Definition at line 117 of file translators.py.
def CellMLToNektar.translators.CellMLTranslator.scan_for_lookup_tables | ( | self | ) |
Lookup table methods #.
Search for lookup tables used in this document. Store a list of suitable expressions on the document root. Generate a dictionary mapping tables to their index variables.
Definition at line 980 of file translators.py.
References Nektar::LibUtilities::H5DataSource.doc, CellMLToNektar.optimize.PartialEvaluator.doc, CellMLToNektar.translators.CellMLTranslator.doc, and CellMLToNektar.optimize.LookupTableAnalyser.doc.
def CellMLToNektar.translators.CellMLTranslator.send_main_output_to_subsidiary | ( | self, | |
to_subsidiary = True |
|||
) |
Set subsequent main-file writes to go to the subsidiary file instead. Supplying a False argument reverts this setting. Has no effect if not using a subsidiary file.
Definition at line 355 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator._main_output_to_subsidiary.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods().
def CellMLToNektar.translators.CellMLTranslator.set_indent | ( | self, | |
level = None , |
|||
offset = None |
|||
) |
Set the indentation level for subsequent writes. If offset is given, adjust the level by that amount, otherwise set it to an absolute value.
Definition at line 431 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.indent_level.
Referenced by CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
def CellMLToNektar.translators.CellMLTranslator.subsidiary_file_name | ( | self, | |
output_filename | |||
) |
Generate a name for the subsidiary output file, based on the main one. Returns a pair (main_output_file_name, subsidiary_file_name). This is in case the user specifies (e.g.) a .hpp file as the main output - we consider the main output to be the .cpp file.
Definition at line 328 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.FILE_EXTENSIONS, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.USES_SUBSIDIARY_FILE, and CellMLToNektar.translators.CellMLTranslator.USES_SUBSIDIARY_FILE.
def CellMLToNektar.translators.CellMLTranslator.translate | ( | self, | |
doc, | |||
model_filename, | |||
output_filename = None , |
|||
subsidiary_file_name = None , |
|||
class_name = None , |
|||
v_variable = None , |
|||
continuation = None , |
|||
lookup_method_prefix = '' , |
|||
row_lookup_method = False , |
|||
lt_index_uses_floor = True , |
|||
constrain_table_indices = False |
|||
) |
Generate code for the given model. doc should be an instance of cellml_model representing a valid CellML model, such as might be produced from a call to >>> valid, doc = validator.CellMLValidator().validate( ... model_filename, True) model_filename is the filename of the input model. The output program will by default be generated in the same folder, but with a different extension. This can be overridden by supplying the output_filename keyword argument. By default the name of the class representing the model will be derived from the model name. This can be overridden by passing an alternative as the class_name argument. The variable representing the transmembrane potential should be passed in using the v_variable argument. By default this method will perform some setup and then call self.output_top_boilerplate() self.output_mathematics() self.output_bottom_boilerplate() To alter this, pass a callable as the continuation parameter; this will then be called instead. lookup_method_prefix and row_lookup_method can be used to customise some aspects of lookup table usage. The former is used by the Chaste translator to place lookup tables within a singleton class, while the latter can improve cache performance by looking up all tables in a single call, and returning an array of the results. lt_index_uses_floor specifies whether to use the floor() function to calculate the index into the lookup tables, or just cast to unsigned. constrain_table_indices specifies whether to throw an exception if lookup table index variables go outside the bounds specified (default), or just to cap them at the bounds.
Definition at line 207 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.config().
def CellMLToNektar.translators.CellMLTranslator.var_display_name | ( | self, | |
var | |||
) |
Return a display name for the given variable. If it has an oxmeta name, uses that. Otherwise, looks first for a bqbiol:is annotation, or uses the cmeta:id if present, or the name attribute if not. If there is an interface component, strip the name of it out of the display name.
Definition at line 463 of file translators.py.
References CellMLToNektar.processors.ModelModifier.model, and CellMLToNektar.translators.CellMLTranslator.model.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation().
def CellMLToNektar.translators.CellMLTranslator.varobj | ( | self, | |
varname | |||
) |
Return the variable object that has code_name varname.
Definition at line 459 of file translators.py.
References CellMLToNektar.processors.ModelModifier.model, and CellMLToNektar.translators.CellMLTranslator.model.
Referenced by CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_variable().
def CellMLToNektar.translators.CellMLTranslator.write | ( | self, | |
args | |||
) |
Write to our output file. This variant does not indent the output, or add a newline.
Definition at line 398 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator.writeln().
Referenced by CellMLToNektar.translators.CellMLTranslator.close_paren(), CellMLToNektar.translators.CellMLTranslator.open_paren(), CellMLToNektar.translators.CellMLTranslator.output_apply(), CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_function(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.translators.CellMLTranslator.output_lhs(), CellMLToNektar.translators.CellMLTranslator.output_log(), CellMLToNektar.translators.CellMLTranslator.output_nary_operator(), CellMLToNektar.translators.CellMLTranslator.output_number(), CellMLToNektar.translators.CellMLTranslator.output_piecewise(), CellMLToNektar.translators.CellMLTranslator.output_root(), CellMLToNektar.translators.CellMLTranslator.output_table_lookup(), CellMLToNektar.translators.CellMLTranslator.output_unary_operator(), CellMLToNektar.translators.CellMLTranslator.output_variable(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_variable().
def CellMLToNektar.translators.CellMLTranslator.writeln | ( | self, | |
args, | |||
kwargs | |||
) |
Write a line to our output file. Takes any number of strings as input, and writes them out to file. Unless the keyword argument indent is given as False, then the output will be indented to the level set by self.set_indent(). Setting indent_level will override this value. Setting indent_offset will adjust the current level temporarily. If nl is set to False then a newline character will not be appended to the output. If subsidiary=True, then the line will be written to the subsidiary output file instead of the main one. An error will be raised if there is no subsidiary output file.
Definition at line 364 of file translators.py.
References CellMLToNektar.translators.CellMLTranslator._main_output_to_subsidiary, CellMLToNektar.translators.CellMLTranslator.error(), CellMLToNektar.translators.CellMLTranslator.indent_char, CellMLToNektar.translators.CellMLTranslator.indent_factor, CellMLToNektar.translators.CellMLTranslator.indent_level, CellMLToNektar.translators.CellMLTranslator.out, Nektar::NekMeshUtils::DelaunayTriangle.out, CellMLToNektar.translators.CellMLTranslator.out2, CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.USES_SUBSIDIARY_FILE, and CellMLToNektar.translators.CellMLTranslator.USES_SUBSIDIARY_FILE.
Referenced by CellMLToNektar.translators.CellMLTranslator.close_block(), CellMLToNektar.translators.CellMLTranslator.open_block(), CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_chaste_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations_grl(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_includes(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_intracellular_calcium(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_declarations(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_indices(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_memory(), CellMLToNektar.translators.CellMLTranslator.output_lut_row_lookup_methods(), CellMLToNektar.translators.CellMLTranslator.output_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_method_start(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_model_attributes(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_nonlinear_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate(), CellMLToNektar.translators.CellMLTranslator.write(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.writeln_hpp().
|
private |
Definition at line 181 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.send_main_output_to_subsidiary(), and CellMLToNektar.translators.CellMLTranslator.writeln().
|
private |
Definition at line 407 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.get_captured_output().
CellMLToNektar.translators.CellMLTranslator.add_timestamp |
Definition at line 179 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_includes(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
|
static |
Definition at line 727 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
CellMLToNektar.translators.CellMLTranslator.class_name |
Definition at line 254 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_method_start(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_serialize_method(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
|
static |
Definition at line 143 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_comment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.translators.CellMLTranslator.output_mathematics(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments().
CellMLToNektar.translators.CellMLTranslator.constrain_table_indices |
Definition at line 289 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_checking().
CellMLToNektar.translators.CellMLTranslator.doc |
Definition at line 250 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.config(), and CellMLToNektar.translators.CellMLTranslator.scan_for_lookup_tables().
|
static |
Definition at line 144 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_doxygen().
|
static |
Definition at line 156 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
|
static |
Definition at line 142 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.get_stimulus_assignment(), CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_equations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_nonlinear_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code().
|
static |
Definition at line 154 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
|
static |
Definition at line 163 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.subsidiary_file_name().
CellMLToNektar.translators.CellMLTranslator.free_vars |
Definition at line 258 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.get_stimulus_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.modifier_call(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations_grl(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
|
static |
Definition at line 710 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
CellMLToNektar.translators.CellMLTranslator.indent_char |
Definition at line 173 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.indent_factor |
Definition at line 175 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.indent_level |
Definition at line 171 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.set_indent(), and CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.lookup_method_prefix |
Definition at line 286 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), and CellMLToNektar.translators.CellMLTranslator.output_table_lookup().
CellMLToNektar.translators.CellMLTranslator.lt_index_uses_floor |
Definition at line 288 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code().
CellMLToNektar.translators.CellMLTranslator.model |
Definition at line 251 of file translators.py.
Referenced by CellMLToNektar.pycml.cellml_variable._set_source_variable(), CellMLToNektar.pycml.cellml_variable.add_rdf_annotation(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.code_name(), CellMLToNektar.pycml.cellml_variable.get_rdf_annotation(), CellMLToNektar.pycml.cellml_variable.get_rdf_annotations(), CellMLToNektar.pycml.mathml_apply.get_units(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_model_attributes(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_verify_state_variables(), CellMLToNektar.pycml.cellml_variable.remove_rdf_annotations(), CellMLToNektar.translators.CellMLTranslator.var_display_name(), and CellMLToNektar.translators.CellMLTranslator.varobj().
|
static |
Definition at line 725 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
|
static |
CellMLToNektar.translators.CellMLTranslator.options |
Definition at line 169 of file translators.py.
Referenced by CellMLToNektar.translators.ConfigurationStore.find_transmembrane_potential(), and CellMLToNektar.translators.ConfigurationStore.read_configuration_file().
CellMLToNektar.translators.CellMLTranslator.out |
Definition at line 304 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.get_captured_output(), and CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.out2 |
Definition at line 306 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.output_filename |
Definition at line 303 of file translators.py.
|
static |
Definition at line 155 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
|
static |
Definition at line 722 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_apply().
CellMLToNektar.translators.CellMLTranslator.row_lookup_method |
Definition at line 287 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.translators.CellMLTranslator.output_lut_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_generation_code(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), and CellMLToNektar.translators.CellMLTranslator.output_table_lookup().
CellMLToNektar.translators.CellMLTranslator.single_component |
Definition at line 272 of file translators.py.
|
static |
Definition at line 813 of file translators.py.
CellMLToNektar.translators.CellMLTranslator.state_vars |
Definition at line 259 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_bottom_boilerplate(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations_grl(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_evaluate_y_derivatives(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_intracellular_calcium(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
|
static |
Various language tokens #.
Definition at line 141 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.get_stimulus_assignment(), CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_backward_euler_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_constructor(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derived_quantities(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_equations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_get_i_ionic(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl_compute_partial(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_intracellular_calcium(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_class(), CellMLToNektar.translators.CellMLTranslator.output_lut_declarations(), CellMLToNektar.translators.CellMLTranslator.output_lut_deletion(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_lut_index_declarations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_lut_indexing_methods(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_method_start(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_nonlinear_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_state_assignments(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_checking(), CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.vector_create(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.vector_initialise().
CellMLToNektar.translators.CellMLTranslator.subsidiary_filename |
Definition at line 302 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_includes().
|
static |
Definition at line 110 of file translators.py.
|
static |
Definition at line 153 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_expr().
|
static |
Definition at line 149 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_assignment(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), CellMLToNektar.translators.CellMLTranslator.output_single_lookup(), and CellMLToNektar.translators.CellMLTranslator.output_table_index_generation_code().
|
static |
Definition at line 150 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_lut_generation().
|
static |
Definition at line 147 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.lut_factor(), and CellMLToNektar.translators.CellMLTranslator.output_lut_declarations().
|
static |
CellMLToNektar.translators.CellMLTranslator.use_lookup_tables |
Definition at line 177 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator._vars_in(), CellMLToNektar.translators.CellMLTranslator.output_expr(), CellMLToNektar.translators.CellMLTranslator.output_lut_generation(), and CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
|
static |
Definition at line 161 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.subsidiary_file_name(), and CellMLToNektar.translators.CellMLTranslator.writeln().
CellMLToNektar.translators.CellMLTranslator.v_index |
Definition at line 281 of file translators.py.
Referenced by CellMLToNektar.translators.CellMLTranslator.output_top_boilerplate().
CellMLToNektar.translators.CellMLTranslator.v_variable |
Definition at line 274 of file translators.py.
Referenced by CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_assignment(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_derivative_calculations(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl1_mathematics(), CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_grl2_mathematics(), and CellMLToNektar.CellMLToNektarTranslator.CellMLToNektarTranslator.output_rush_larsen_mathematics().
CellMLToNektar.translators.CellMLTranslator.v_variable_name |
Definition at line 276 of file translators.py.