- From: r.britten at auckland.ac.nz (Randall Britten)
- Subject: [cellml-dev] FW: r3283 - in CellML_DOM_API/trunk: CCGS CCGS/sources CeLEDS/languages tests tests/test_celeds_expected tests/test_expected tests/test_xml
- Date: Thu, 19 Mar 2009 17:03:44 +1300
Hi
Do you think it might be useful if that was added as a comment at that line?
I guess another alternative would be to have a method so you could call
"eq->shouldInitialValueBeWritten()" which simply wrapped the test and the
comment.
Regards,
Randall
>
-----Original Message-----
>
From: cellml-tools-developers-bounces at cellml.org [mailto:cellml-tools-
>
developers-bounces at cellml.org] On Behalf Of Andrew Miller
>
Sent: Thursday, 19 March 2009 4:59 p.m.
>
To: A list for the developers of CellML tools
>
Subject: Re: [cellml-dev] FW: r3283 - in CellML_DOM_API/trunk: CCGS
>
CCGS/sources CeLEDS/languages tests tests/test_celeds_expected
>
tests/test_expected tests/test_xml
>
>
Randall Britten wrote:
>
> Hi Andrew
>
>
>
> In WriteIVs,
>
> What is the following test doing?
>
> + if (eq->mMaths == NULL || eq->mLHS != NULL)
>
>
>
Hi Randall,
>
>
That test ensures we only write an initial value for variables computed
>
in a system of size greater than one, or computed in a system of size
>
one which required a non-linear solve. mMaths is only null for an
>
initial_value="variable" derived equation, and mLHS is NULL iff a
>
non-linear solve needs to be performed.
>
>
Best regards,
>
Andrew
>
>
>
>
> A bit more context below.
>
>
>
> Regards,
>
> Randall
>
>
>
> -----Original Message-----
>
> Subject: r3283 - in CellML_DOM_API/trunk: CCGS CCGS/sources
>
CeLEDS/languages
>
> tests tests/test_celeds_expected tests/test_expected tests/test_xml
>
>
>
> Author: amil082
>
> Date: 2009-03-18 18:12:36 +1300 (Wed, 18 Mar 2009)
>
> New Revision: 3283
>
>
>
> ...
>
>
>
> +void
>
> +CodeGenerationState::WriteIVs(std::list<System*>& aSystems)
>
> +{
>
> + CNumericLocale locobj;
>
> +
>
> + for (std::list<System*>::iterator i = aSystems.begin();
>
> + i != aSystems.end();
>
> + i++)
>
> + {
>
> + System* s = *i;
>
> +
>
> + if (s->mEquations.size() == 1)
>
> + {
>
> + Equation* eq = *s->mEquations.begin();
>
> + if (eq->mMaths == NULL || eq->mLHS != NULL)
>
> + continue;
>
> + }
>
> +
>
>
>
>
>
>
>
>
_______________________________________________
>
cellml-tools-developers mailing list
>
cellml-tools-developers at cellml.org
>
http://www.cellml.org/mailman/listinfo/cellml-tools-developers
Archive powered by MHonArc 2.6.18.