CellML Discussion List

Text archives Help


[[cellml-discussion] ] enable c calls to cellML ?


Chronological Thread 
  • From: <hans.dierckx AT ugent.be>
  • To: cellml-discussion AT lists.cellml.org
  • Subject: [[cellml-discussion] ] enable c calls to cellML ?
  • Date: Wed, 16 Apr 2014 10:59:31 +1200 (NZST)

Hi all,

Inspired by Herbert Sauro's suggestion in this week's CellML workshop, I'd
like to ask whether cellML currently has possibilities to make simple c calls.
If not, can they be included in the near future?

As many researchers in cardiac modeling, I use my own code to solve the
reaction-diffusion equations. I know there's much advantage in using 'big'
software packages, but so is there in code which you fully control and
understand. It would be great for users like me if we could import cellML
models to use as a black box to give correct/verified reaction kinetics.

In c-language, I would be looking for calls like

#include "cellMLimports.h"
/ / to enable imports

void import_cellMLmodel(char[] modelname);
/ / specify the model to be imported by a string or char array (by some cellML
identifier or URL)

void give_reactionterm(double** u, double* Fu);
/ / **u is a pointer to an array of state variables in one point of the
domain
/ / *Fu is an array containing the corresponding reaction term in du/dt =
F(u) to which the result is written

void update_state(double** u, double dt);
/ / **u is a pointer to an array of state variables in one point
/ / dt is a time interval over which du/dt=F(u) is integrated at a time
resolution needed by the model; the resulting state vector is returned to u

void stimulate_point(double **u, double I_amp, double dt, double voxelvolume);
/ / to apply a current stimulus (in physical units)

double give_resting_state(int whichvariable);
/ / to return the resting potential and equilibrium values for state variables

I only mention the c-example as it applies to me, but similar arguments apply
also to calls from other languages (fortran, python, matlab, …). A useful
extension may be to support also parallel calls, e.g. in openMP.

Many thanks in advance to discuss the possibility,


Hans Dierckx

(I am a postdoc in Ghent University, Belgium, currently visiting the Auckland
Bioengineering Institute.)




Archive powered by MHonArc 2.6.18.

Top of page