2 research outputs found

    chaste codegen: automatic CellML to C++ code generation with fixes for singularities and automatically generated Jacobians

    Get PDF
    Hundreds of different mathematical models have been proposed for describing electrophysiology of various cell types. These models are quite complex (nonlinear systems of typically tens of ODEs and sometimes hundreds of parameters) and software packages such as the Cancer, Heart and Soft Tissue Environment (Chaste) C++ library have been designed to run simulations with these models in isolation or coupled to form a tissue simulation. The complexity of many of these models makes sharing and translating them to new simulation environments difficult. CellML is an XML format that offers a solution to this problem and has been widely-adopted. This paper specifically describes the capabilities of chaste_codegen, a Python-based CellML to C++ converter based on the new cellmlmanip Python library for reading and manipulating CellML models. While chaste_codegen is a Python 3 redevelopment of a previous Python 2 tool (called PyCML) it has some additional new features that this paper describes. Most notably, chaste_codegen has the ability to generate analytic Jacobians without the use of proprietary software, and also to find singularities occurring in equations and automatically generate and apply linear approximations to prevent numerical problems at these points

    cellmlmanip and chaste_codegen: automatic CellML to C++ code generation with fixes for singularities and automatically generated Jacobians

    Get PDF
    Hundreds of different mathematical models have been proposed for describing electrophysiology of various cell types. These models are quite complex (nonlinear systems of typically tens of ODEs and sometimes hundreds of parameters) and software packages such as the Cancer, Heart and Soft Tissue Environment (Chaste) C++ library have been designed to run simulations with these models in isolation or coupled to form a tissue simulation. The complexity of many of these models makes sharing and translating them to new simulation environments difficult. CellML is an XML format that offers a widely-adopted solution to this problem. This paper specifically describes the capabilities of two new Python tools: the cellmlmanip library for reading and manipulating CellML models; and chaste_codegen, a CellML to C++ converter. These tools provide a Python 3 replacement for a previous Python 2 tool (called PyCML) and they also provide additional new features that this paper describes. Most notably, they can generate analytic Jacobians without the use of proprietary software, and also find singularities occurring in equations and automatically generate and apply linear approximations to prevent numerical problems at these points
    corecore