- From: alan.garny at dpag.ox.ac.uk (Alan Garny)
- Subject: [cellml-dev] r2499 - in CellML_DOM_API/trunk: CIS/sources interfaces
- Date: Mon, 28 Jul 2008 06:58:22 +0100
>
-----Original Message-----
>
From: cellml-tools-developers-bounces at cellml.org [mailto:cellml-tools-
>
developers-bounces at cellml.org] On Behalf Of Andrew Miller
>
Sent: 28 July 2008 02:43
>
To: cellml-tools-developers at cellml.org
>
Subject: Re: [cellml-dev] r2499 - in CellML_DOM_API/trunk: CIS/sources
>
interfaces
>
>
CellML Automated Notifications wrote:
>
> Author: jmar150
>
> Date: 2008-07-28 12:43:07 +1200 (Mon, 28 Jul 2008)
>
> New Revision: 2499
>
>
>
> Modified:
>
> CellML_DOM_API/trunk/CIS/sources/CISImplementation.cxx
>
> CellML_DOM_API/trunk/CIS/sources/CISImplementation.hxx
>
> CellML_DOM_API/trunk/CIS/sources/CISSolve.cxx
>
> CellML_DOM_API/trunk/interfaces/CIS.idl
>
> Log:
>
> First cut of solution to Tracker Item 31; this allows a tabulation
>
step size to
>
> be specified, and will produce results at those points. Note that the
>
interface
>
> to CIS was changed.
>
>
>
>
Hi all,
>
>
One potential problem with the code as implemented (which I'm not yet
>
entirely sure of the best way to fix) is that it is comparing floating
>
point numbers for equality, which I believe will often not work out
>
exactly with the numerical integrator codes due to finite precision,
>
except in cases where the numbers can be represented exactly.
That's also my understanding (and experience).
>
One option might be to allow time values which are within tolerance of
>
the requested one through instead of a strict equality test.
That's one possible solution. Something else that I have been using
successfully in COR (but don't know whether it could be applied here, as I
am not familiar with the code) is to have something like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n = 1;
tStep = <whatever>;
tStop = n*tStep;
tEnd = <whatever>;
repeat
n++;
tStop = n*tStep;
<do_whatever>
until tStop == tEnd;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Otherwise, something that worries me is the fact that CISSolver.cxx contains
quite a bit of code that is duplicated. I have in
"CDA_CellMLIntegrationRun::SolveODEProblemGSL" and
"CDA_CellMLIntegrationRun::SolveODEProblemCVODE" in mind. This is very much
error prone and not neat at all.
Alan
Archive powered by MHonArc 2.6.18.