A list for the developers of CellML tools

Text archives Help


[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


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • 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 16:58:37 +1300

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;
> + }
> +
>
>
>





Archive powered by MHonArc 2.6.18.

Top of page