@@ -748,15 +748,15 @@ void Generator::GeneratorImpl::addNlaSystemsCode()
748748 && (std::find (handledNlaEquations.begin (), handledNlaEquations.end (), equation) == handledNlaEquations.end ())) {
749749 std::string methodBody;
750750 auto i = MAX_SIZE_T;
751- auto variables = libcellml::analyserVariables (equation);
751+ auto analyserVariables = libcellml::analyserVariables (equation);
752752
753- for (const auto &variable : variables ) {
754- auto arrayString = (variable ->type () == AnalyserVariable::Type::STATE) ?
753+ for (const auto &analyserVariable : analyserVariables ) {
754+ auto arrayString = (analyserVariable ->type () == AnalyserVariable::Type::STATE) ?
755755 mProfile ->ratesArrayString () :
756756 mProfile ->algebraicVariablesArrayString ();
757757
758758 methodBody += mProfile ->indentString ()
759- + arrayString + mProfile ->openArrayString () + convertToString (variable ->index ()) + mProfile ->closeArrayString ()
759+ + arrayString + mProfile ->openArrayString () + convertToString (analyserVariable ->index ()) + mProfile ->closeArrayString ()
760760 + mProfile ->equalityString ()
761761 + mProfile ->uArrayString () + mProfile ->openArrayString () + convertToString (++i) + mProfile ->closeArrayString ()
762762 + mProfile ->commandSeparatorString () + " \n " ;
@@ -793,37 +793,37 @@ void Generator::GeneratorImpl::addNlaSystemsCode()
793793
794794 i = MAX_SIZE_T;
795795
796- for (const auto &variable : variables ) {
797- auto arrayString = (variable ->type () == AnalyserVariable::Type::STATE) ?
796+ for (const auto &analyserVariable : analyserVariables ) {
797+ auto arrayString = (analyserVariable ->type () == AnalyserVariable::Type::STATE) ?
798798 mProfile ->ratesArrayString () :
799799 mProfile ->algebraicVariablesArrayString ();
800800
801801 methodBody += mProfile ->indentString ()
802802 + mProfile ->uArrayString () + mProfile ->openArrayString () + convertToString (++i) + mProfile ->closeArrayString ()
803803 + mProfile ->equalityString ()
804- + arrayString + mProfile ->openArrayString () + convertToString (variable ->index ()) + mProfile ->closeArrayString ()
804+ + arrayString + mProfile ->openArrayString () + convertToString (analyserVariable ->index ()) + mProfile ->closeArrayString ()
805805 + mProfile ->commandSeparatorString () + " \n " ;
806806 }
807807
808- auto variablesCount = variables .size ();
808+ auto analyserVariablesCount = analyserVariables .size ();
809809
810810 methodBody += newLineIfNeeded ()
811811 + mProfile ->indentString ()
812812 + replace (replace (mProfile ->nlaSolveCallString (modelHasOdes (), mModel ->hasExternalVariables ()),
813813 " [INDEX]" , convertToString (equation->nlaSystemIndex ())),
814- " [SIZE]" , convertToString (variablesCount ));
814+ " [SIZE]" , convertToString (analyserVariablesCount ));
815815
816816 methodBody += newLineIfNeeded ();
817817
818818 i = MAX_SIZE_T;
819819
820- for (const auto &variable : variables ) {
821- auto arrayString = (variable ->type () == AnalyserVariable::Type::STATE) ?
820+ for (const auto &analyserVariable : analyserVariables ) {
821+ auto arrayString = (analyserVariable ->type () == AnalyserVariable::Type::STATE) ?
822822 mProfile ->ratesArrayString () :
823823 mProfile ->algebraicVariablesArrayString ();
824824
825825 methodBody += mProfile ->indentString ()
826- + arrayString + mProfile ->openArrayString () + convertToString (variable ->index ()) + mProfile ->closeArrayString ()
826+ + arrayString + mProfile ->openArrayString () + convertToString (analyserVariable ->index ()) + mProfile ->closeArrayString ()
827827 + mProfile ->equalityString ()
828828 + mProfile ->uArrayString () + mProfile ->openArrayString () + convertToString (++i) + mProfile ->closeArrayString ()
829829 + mProfile ->commandSeparatorString () + " \n " ;
@@ -832,7 +832,7 @@ void Generator::GeneratorImpl::addNlaSystemsCode()
832832 mCode += newLineIfNeeded ()
833833 + replace (replace (replace (mProfile ->findRootMethodString (modelHasOdes (), mModel ->hasExternalVariables ()),
834834 " [INDEX]" , convertToString (equation->nlaSystemIndex ())),
835- " [SIZE]" , convertToString (variablesCount )),
835+ " [SIZE]" , convertToString (analyserVariablesCount )),
836836 " [CODE]" , generateMethodBodyCode (methodBody));
837837 }
838838 }
@@ -1922,12 +1922,12 @@ void Generator::GeneratorImpl::addImplementationComputeRatesMethodCode(std::vect
19221922 // NLA equation in case the rate is not on its own on either the LHS
19231923 // or RHS of the equation.
19241924
1925- auto variables = libcellml::analyserVariables (equation);
1925+ auto analyserVariables = libcellml::analyserVariables (equation);
19261926
19271927 if ((equation->type () == AnalyserEquation::Type::ODE)
19281928 || ((equation->type () == AnalyserEquation::Type::NLA)
1929- && (variables .size () == 1 )
1930- && (variables [0 ]->type () == AnalyserVariable::Type::STATE))) {
1929+ && (analyserVariables .size () == 1 )
1930+ && (analyserVariables [0 ]->type () == AnalyserVariable::Type::STATE))) {
19311931 methodBody += generateEquationCode (equation, remainingEquations);
19321932 }
19331933 }
@@ -2136,7 +2136,7 @@ std::string Generator::implementationCode() const
21362136std::string Generator::equationCode (const AnalyserEquationAstPtr &ast,
21372137 const GeneratorProfilePtr &generatorProfile)
21382138{
2139- GeneratorPtr generator = libcellml:: Generator::create ();
2139+ GeneratorPtr generator = Generator::create ();
21402140
21412141 if (generatorProfile != nullptr ) {
21422142 generator->setProfile (generatorProfile);
0 commit comments