From: Rainer M. <ra...@tb...> - 2007-12-06 19:24:24
|
Hi Eric, > I would like to start a solver at an arbitrary time instead of time=0, It was easier then I thought, but is so far not really tested well. CVS version has now a new public function IntegratorInstance_setInitialTime(ii, double initialtime) which however only works on fresh or freshly reset integrators with the first output time (next time step) greater then the requested initial time. An error will be issued otherwise. This first output time must have been already set via IntegratorInstance_create or _set/_reset functions, or via _setNextTimeStep called prior to _setInitialTime. This means you can now use the combination of _copyVariableState and _setInitialTime to start a new integrator from the current state of another integrator (e.g. to simulate cell proliferation and keep the time for both cells). Also _copyVariableState does now lead to resetting of the solver if the target instance had already been integrated. We should think about possible pitfalls for the functionalities of _copyVariableState and _setInitialTime. Eric, please let me know, if it does what you need and if it works as it should! And another warning: in CVS we have already switched to libSBML 3 and libSBML 3.0.2 or CVS version is recommended if not even required. Rainer |