Welcome to the chaste_codegen documentation

chaste_codegen is hosted on GitHub, where you can find the code and installation instructions.

This page provides the API, or developer documentation for chaste_codegen.

API documentation

chaste_codegen Package

Main module for cardiac Chaste code generation

Functions

add_conversions(model[, use_modifiers])

load_model_with_conversions(model_file[, …])

load_template(*name)

Loads a template from the local template directory.

subs_math_func_placeholders(expr)

Substitutes the placeholder math functions in expr for their corresponding Sympy functions :param expr: sympy expression

version([formatted])

Returns the version number, as a 3-part integer (major, minor, revision).

Classes

BackwardEulerModel(model, file_name, **kwargs)

Holds template and information specific for the Backwards Euler model type

BackwardEulerOptModel(model, file_name, **kwargs)

Holds information specific for the Optimised Backward Euler model type.

ChasteModel(model, file_name, **kwargs)

Holds information about a cellml model for which chaste code is to be generated.

ChastePrinter([symbol_function, …])

Converts Sympy expressions to strings for use in Chaste code generation.

CodegenError

CvodeChasteModel(model, file_name, **kwargs)

Holds template and information specific for the CVODE model type

GeneralisedRushLarsenFirstOrderModel(model, …)

Holds template and information specific for the GeneralisedRushLarsen model type

GeneralisedRushLarsenFirstOrderModelOpt(…)

Holds template and information specific for the GeneralisedRushLarsenOpt model type

GeneralisedRushLarsenSecondOrderModel(model, …)

Holds template and information specific for the GeneralisedRushLarsen model type

GeneralisedRushLarsenSecondOrderModelOpt(…)

Holds template and information specific for the GeneralisedRushLarsenOpt model type

NormalChasteModel(model, file_name, **kwargs)

Holds template and information specific for the Normal model type

OptChasteModel(model, file_name, **kwargs)

Holds information specific for the Optimised model type.

OptCvodeChasteModel(model, file_name, **kwargs)

Holds information specific for the Cvode Optimised model type.

RealFunction(*args)

RushLarsenModel(model, file_name, **kwargs)

Holds template and information specific for the RushLarsen model type

RushLarsenOptModel(model, file_name, **kwargs)

Holds template and information specific for the RushLarsen model type

Transpiler([symbol_generator, number_generator])

Handles conversion of MathmL to Sympy exprerssions.

abs_(*args)

acos_(*args)

cos_(*args)

exp_(*args)

sin_(*args)

sqrt_(*args)